netgate-span API (19.05)

This YANG module provides a Netgate-defined data-model for SPAN data.

Copyright 2018-2019 Rubicon Communications, LLC.

span-config

returns netgate.span.SpanConfig

get /data/netgate-span:span-config

Example URL

https://hostname/restconf/data/netgate-span:span-config

Switched Port Analyzer (SPAN) configuration.

Responses

200

netgate.span.SpanConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:span-config":
    {
    }
}

creates netgate.span.SpanConfig

post /data/netgate-span:span-config

Example URL

https://hostname/restconf/data/netgate-span:span-config

Switched Port Analyzer (SPAN) configuration.

Request Body schema: application/yang-data+json

netgate.span.SpanConfig to be added to list

span-table
object (netgate.span.spanconfig.SpanTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "span-table":
    {
    }
}

creates or updates netgate.span.SpanConfig

put /data/netgate-span:span-config

Example URL

https://hostname/restconf/data/netgate-span:span-config

Switched Port Analyzer (SPAN) configuration.

Request Body schema: application/yang-data+json

netgate.span.SpanConfig to be added or updated

netgate-span:span-config
object (netgate.span.SpanConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:span-config":
    {
    }
}

removes netgate.span.SpanConfig

delete /data/netgate-span:span-config

Example URL

https://hostname/restconf/data/netgate-span:span-config

Switched Port Analyzer (SPAN) configuration.

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-span:span-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.span.spanconfig.SpanTable

get /data/netgate-span:span-config/netgate-span:span-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table

SPAN table.

Responses

200

netgate.span.spanconfig.SpanTable

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table"

	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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:span-table":
    {
    }
}

creates netgate.span.spanconfig.SpanTable

post /data/netgate-span:span-config/netgate-span:span-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table

SPAN table.

Request Body schema: application/yang-data+json

netgate.span.spanconfig.SpanTable to be added to list

source
Array of objects (netgate.span.spanconfig.spantable.Source)

Mirrored source interface.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "source":
    [
    ]
}

creates or updates netgate.span.spanconfig.SpanTable

put /data/netgate-span:span-config/netgate-span:span-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table

SPAN table.

Request Body schema: application/yang-data+json

netgate.span.spanconfig.SpanTable to be added or updated

netgate-span:span-table
object (netgate.span.spanconfig.SpanTable)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:span-table":
    {
    }
}

removes netgate.span.spanconfig.SpanTable

delete /data/netgate-span:span-config/netgate-span:span-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table

SPAN table.

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-span:span-config/netgate-span:span-table"

	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))

}

creates netgate.span.spanconfig.spantable.Source

post /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source

Mirrored source interface.

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.Source to be added to list

if-name-src
string

The source interface that will be mirrored.

destination-table
object (netgate.span.spanconfig.spantable.source.DestinationTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "if-name-src": "string",
  • "destination-table":
    {
    }
}

returns netgate.span.spanconfig.spantable.Source

get /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Responses

200

netgate.span.spanconfig.spantable.Source

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source=%7Bif-name-src%7D"

	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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:source":
    {
    }
}

creates netgate.span.spanconfig.spantable.Source

post /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.Source to be added to list

if-name-src
string

The source interface that will be mirrored.

destination-table
object (netgate.span.spanconfig.spantable.source.DestinationTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "if-name-src": "string",
  • "destination-table":
    {
    }
}

creates or updates netgate.span.spanconfig.spantable.Source

put /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.Source to be added or updated

netgate-span:source
object (netgate.span.spanconfig.spantable.Source)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:source":
    {
    }
}

removes netgate.span.spanconfig.spantable.Source

delete /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

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-span:span-config/netgate-span:span-table/netgate-span:source=%7Bif-name-src%7D"

	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.span.spanconfig.spantable.source.DestinationTable

get /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Responses

200

netgate.span.spanconfig.spantable.source.DestinationTable

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source=%7Bif-name-src%7D/netgate-span:destination-table"

	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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:destination-table":
    {
    }
}

creates netgate.span.spanconfig.spantable.source.DestinationTable

post /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.DestinationTable to be added to list

destination
Array of objects (netgate.span.spanconfig.spantable.source.destinationtable.Destination)

The destination interface.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "destination":
    [
    ]
}

creates or updates netgate.span.spanconfig.spantable.source.DestinationTable

put /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.DestinationTable to be added or updated

netgate-span:destination-table
object (netgate.span.spanconfig.spantable.source.DestinationTable)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-span:destination-table":
    {
    }
}

removes netgate.span.spanconfig.spantable.source.DestinationTable

delete /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

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-span:span-config/netgate-span:span-table/netgate-span:source=%7Bif-name-src%7D/netgate-span:destination-table"

	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))

}

creates netgate.span.spanconfig.spantable.source.destinationtable.Destination

post /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table/netgate-span:destination

Example URL

https://hostname/restconf/data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table/netgate-span:destination

The destination interface.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.destinationtable.Destination to be added to list

if-name-dst
string

The destination interface receiving mirrored packets.

state
object (netgate.span.SpanState)
layer
string (netgate.span.SpanLayer)
Enum:"hw" "l2"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "if-name-dst": "string",
  • "state":
    {
    },
  • "layer": "hw"
}

returns netgate.span.spanconfig.spantable.source.destinationtable.Destination

get /data/netgate-span:span-config/netgate-span:span-table/netgate-span:source={if-name-src}/netgate-span:destination-table/netgate-span:destination={if-name-dst}