netgate-span API (24.02)

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

Copyright 2018-2020 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

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

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

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

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-span:span-config":
    {
    }
}

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-wrapper
object (netgate.span.SpanConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

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/span-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/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/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

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

creates netgate.span.spanconfig.SpanTable

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

Example URL

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

SPAN table.

Request Body schema: application/yang-data+json

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

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

creates or updates netgate.span.spanconfig.SpanTable

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

Example URL

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

SPAN table.

Request Body schema: application/yang-data+json

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

netgate-span:span-table-wrapper
object (netgate.span.spanconfig.SpanTableWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.span.spanconfig.SpanTable

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

Example URL

https://hostname/restconf/data/netgate-span:span-config/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/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/span-table/source

Example URL

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

Mirrored source interface.

Request Body schema: application/yang-data+json

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

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

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.span.spanconfig.spantable.Source

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

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/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/span-table/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

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

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

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

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/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-wrapper
object (netgate.span.spanconfig.spantable.SourceWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.span.spanconfig.spantable.Source

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

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/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/span-table/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/span-table/source={if-name-src}/destination-table

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/source={if-name-src}/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/span-table/source=%7Bif-name-src%7D/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

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

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

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

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/source={if-name-src}/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-table
object (netgate.span.spanconfig.spantable.source.DestinationTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

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

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

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/source={if-name-src}/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-wrapper
object (netgate.span.spanconfig.spantable.source.DestinationTableWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

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

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

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/source={if-name-src}/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/span-table/source=%7Bif-name-src%7D/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/span-table/source={if-name-src}/destination-table/destination

Example URL

https://hostname/restconf/data/netgate-span:span-config/span-table/source={if-name-src}/destination-table/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

destination
object (netgate.span.spanconfig.spantable.source.destinationtable.Destination)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

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

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

Example URL

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

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

Responses

200

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

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/span-table/source=%7Bif-name-src%7D/destination-table/destination=%7Bif-name-dst%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

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

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

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

Example URL

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

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.destinationtable.Destination to be added or updated

netgate-span:destination-wrapper
object (netgate.span.spanconfig.spantable.source.destinationtable.DestinationWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

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

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

Example URL

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

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

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/span-table/source=%7Bif-name-src%7D/destination-table/destination=%7Bif-name-dst%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))

}

span-state

returns netgate.span.SpanState

get /data/netgate-span:span-state

Example URL

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

Switched Port Analyzer (SPAN) state.

Responses

200

netgate.span.SpanState

400

Internal error

Request samples

Copy
package main

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

func main() {

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

	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-span:span-state-wrapper":
    {
    }
}

returns netgate.span.spanstate.SpanTable

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

Example URL

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

SPAN table.

Responses

200

netgate.span.spanstate.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-state/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

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

returns netgate.span.spanstate.spantable.Source

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

Example URL

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

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Responses

200

netgate.span.spanstate.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-state/span-table/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

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

returns netgate.span.spanstate.spantable.source.DestinationTable

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

Example URL

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

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Responses

200

netgate.span.spanstate.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-state/span-table/source=%7Bif-name-src%7D/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

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

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

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

Example URL

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

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

Responses

200

netgate.span.spanstate.spantable.source.destinationtable.Destination

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-state/span-table/source=%7Bif-name-src%7D/destination-table/destination=%7Bif-name-dst%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

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