netgate-packet-trace API (23.06)

This YANG module provides a Netgate-defined data-model for tracing packets using Classifier filters.

Copyright 2020 Rubicon Communications, LLC.

packet-trace-config

returns netgate.packet.trace.PacketTraceConfig

get /data/netgate-packet-trace:packet-trace-config

Example URL

https://hostname/restconf/data/netgate-packet-trace:packet-trace-config

Configuration for packet tracing filters.

Responses

200

netgate.packet.trace.PacketTraceConfig

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-packet-trace:packet-trace-config-wrapper":
    {
    }
}

creates netgate.packet.trace.PacketTraceConfig

post /data/netgate-packet-trace:packet-trace-config

Example URL

https://hostname/restconf/data/netgate-packet-trace:packet-trace-config

Configuration for packet tracing filters.

Request Body schema: application/yang-data+json

netgate.packet.trace.PacketTraceConfig to be added to list

netgate-packet-trace:packet-trace-config
object (netgate.packet.trace.PacketTraceConfig)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-packet-trace:packet-trace-config":
    {
    }
}

creates or updates netgate.packet.trace.PacketTraceConfig

put /data/netgate-packet-trace:packet-trace-config

Example URL

https://hostname/restconf/data/netgate-packet-trace:packet-trace-config

Configuration for packet tracing filters.

Request Body schema: application/yang-data+json

netgate.packet.trace.PacketTraceConfig to be added or updated

netgate-packet-trace:packet-trace-config-wrapper
object (netgate.packet.trace.PacketTraceConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-packet-trace:packet-trace-config-wrapper":
    {
    }
}

removes netgate.packet.trace.PacketTraceConfig

delete /data/netgate-packet-trace:packet-trace-config

Example URL

https://hostname/restconf/data/netgate-packet-trace:packet-trace-config

Configuration for packet tracing filters.

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.trace.packettraceconfig.Filters

get /data/netgate-packet-trace:packet-trace-config/filters

Example URL

https://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters

Table of filters that select traced packets.

Responses

200

netgate.packet.trace.packettraceconfig.Filters

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-packet-trace:filters-wrapper":
    {
    }
}

creates netgate.packet.trace.packettraceconfig.Filters

post /data/netgate-packet-trace:packet-trace-config/filters

Example URL

https://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters

Table of filters that select traced packets.

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.Filters to be added to list

filters
object (netgate.packet.trace.packettraceconfig.Filters)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "filters":
    {
    }
}

creates or updates netgate.packet.trace.packettraceconfig.Filters

put /data/netgate-packet-trace:packet-trace-config/filters

Example URL

https://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters

Table of filters that select traced packets.

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.Filters to be added or updated

netgate-packet-trace:filters-wrapper
object (netgate.packet.trace.packettraceconfig.FiltersWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-packet-trace:filters-wrapper":
    {