Retrieve all Subnets

View as Markdown

Retrieve all Subnets for the org

Org must have a Tenant entity. User must have authorization role with TENANT_ADMIN suffix.

Authentication

AuthorizationBearer
``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current ```

Path parameters

orgstringRequired
Name of the Org

Query parameters

siteIdstringOptionalformat: "uuid"
Filter subnets by Site, required if the vpcId query parameter is not specified
vpcIdstringOptionalformat: "uuid"
Filter subnets by VPC
statusstringOptional
Filter Subnets by Status
querystringOptional
Search for matches across all Subnets. Input will be matched against name, description, and status fields
includeRelationenumOptional
Related entity to expand
Allowed values:
includeUsageStatsbooleanOptional
When true, each Subnet object includes usage statistics using the same structure as IP Block usage. Prefix and IP usage data is derived by evaluating associated Ethernet interfaces. Each Interface associated with a Subnet consumes a single IP. In addition, one gateway and one broadcast IP address are reserved per Subnet.
pageNumberintegerOptional>=1Defaults to 1
Page number for pagination query
pageSizeintegerOptional1-100
Page size for pagination query
orderByenumOptional
Ordering for pagination query

Response headers

X-Paginationstring
Pagination result in JSON format

Response

OK
idstringRead-onlyformat: "uuid"
Unique UUID v4 identifier for the Subnet
namestring2-256 characters
Name of the Subnet
descriptionstring or null
Description of the Subnet
siteIdstringformat: "uuid"
ID of the Site containing the Subnet
vpcIdstringformat: "uuid"
ID of the VPC containing the Subnet
controllerNetworkSegmentIdstring or nullformat: "uuid"
ID of the Site Controller network segment corresponding to the Subnet
ipv4Prefixstring or nullformat: "ipv4"
The prefix that gets assigned to the subnet if ipv4 block is chosen
ipv4BlockIdstring or nullformat: "uuid"
ID of the derived Tenant IPv4 Block from an Allocation
ipv4Gatewaystring or nullformat: "ipv4"
Address of the IPv4 gateway in the Subnet
ipv6Prefixstring or nullformat: "ipv6"
Prefix of the network in CIDR notation
ipv6BlockIdstring or nullformat: "uuid"
ID of the derived Tenant IPv6 Block from an Allocation
ipv6Gatewaystring or nullformat: "ipv6"
Address of the IPv6 gateway in the Subnet
mtuintegerRead-only

Maximum Transmission Unit size in bytes. This property is system-determined and read-only.

prefixLengthinteger
Max value depends on prefix length of parent IP Block
routingTypeenum
Routing type of the Subnet
statusenum
Status of the Subnet
usageStatsobject

Present when query parameter includeUsageStats=true. Prefix and IP usage data is derived by evaluating associated Ethernet interfaces. Each Interface associated with a Subnet consumes a single IP. In addition, one gateway and one broadcast IP address are reserved per Subnet.

statusHistorylist of objectsRead-only
Chronological status history for the Subnet
createddatetimeRead-only

Date/time when the Subnet was created

updateddatetimeRead-only

Date/time when the Subnet was last updated

Errors

403
Forbidden Error