netgate-span API (19.02)

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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

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