GET /v2/networks
Get a paginated list of all networks.
Token scope required: networks:list
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”If true, return count of total records and current page start and count in metadata
Cursor value at which to start the results, provided in nextCursor or prevCursor of a prior request
Example
bmV4dA.eyJsb2dzLmNyZQ5iIiwiX3ZhbHVlIjo9In19Number of records to return in each page
Order in which to return results. Each endpoint sorts on its own key (for example, hosts by
name and audit logs by creation time). Matching is case-insensitive, and any value other than
desc sorts ascending.
Responses
Section titled “ Responses ”Successful operation
object
object
The ID of the Certificate Authority being used.
List of CIDR prefixes assigned to this network. IPv4-only networks have exactly one IPv4 entry. IPv6-capable networks always have an IPv6 CIDR and optionally an IPv4 CIDR.
Certificate version used by this network. Version 2 is required for IPv6 support. Known values are 1 and 2. New values may be added, so clients should accept values not listed here.
Whether this network has opted out of the managed lighthouse. When false, Defined
Networking runs a lighthouse for the network and no lighthouse of your own is required.
Cryptographic curve used by the network’s certificates. Known values are 25519 and P256. New values may be added, so clients should accept values not listed here.
object
The total number of resources existing in the account. Only present when includeCounts is true.
Is there a page of data that can be fetched using the nextCursor?
Is there a page of data that can be fetched using the prevCursor?
An opaque string that can be used to fetch the next page of results. Not provided if result set is empty.
An opaque string that can be used to fetch the previous page of results. Not provided if result set is empty.
Only present when includeCounts is true.
object
The number of results returned in the response.
The zero-based index of the first result within the overall list. For example, the first page will have a start of 0. If 25 results are fetched, and the nextCursor used to fetch a new page of results, the second request’s start will be 25.
Examples
List with both IPv4-only and IPv6-capable networks
{ "data": [ { "id": "network-ZJOW3QUQUX5ZAVPVYRHDQUAEIY", "organizationID": "org-F63A24JGCLJV3ZEUTLCBISGETA", "signingCAID": "ca-TRJSVAAAPJXTOICJMG2KZBKQEE", "name": "Network1", "description": "", "cidrs": [ "100.100.0.0/22", "fdef:c0:c0:1::/80" ], "certVersion": 2, "hostCount": 5, "lighthousesAsRelays": false, "disableManagedLighthouses": false, "curve": "25519", "createdAt": "2023-02-14T20:34:59Z" }, { "id": "network-KAOWMXZHZWCVMGGFKM22XEGYLE", "organizationID": "org-F63A24JGCLJV3ZEUTLCBISGETA", "signingCAID": "ca-TRJSVAAAPJXTOICJMG2KZBKQEE", "name": "LegacyNet", "description": "", "cidrs": [ "192.168.4.0/22" ], "certVersion": 1, "hostCount": 3, "lighthousesAsRelays": false, "disableManagedLighthouses": true, "curve": "25519", "createdAt": "2022-11-01T10:00:00Z" } ], "metadata": { "hasNextPage": false, "hasPrevPage": false }}The API key is missing, invalid or expired.
object
object
A static name for the error type
A short human readable description of the error
Describes the variable missing or malformed
The query parameter the error relates to, such as filter.targetType
Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.
object
The maximum number of resources allowed
The kind of resource the limit applies to
Example
{ "errors": [ { "code": "ERR_UNAUTHORIZED", "message": "unauthorized" } ]}The API key lacks a required scope.
object
object
A static name for the error type
A short human readable description of the error
Describes the variable missing or malformed
The query parameter the error relates to, such as filter.targetType
Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.
object
The maximum number of resources allowed
The kind of resource the limit applies to
Examples
The API key lacks a required scope.
{ "errors": [ { "code": "ERR_FORBIDDEN", "message": "api key must support the following scopes: hosts:read" } ]}The organization has exceeded its API request rate limit. Retry the request after a short delay.
object
object
A static name for the error type
A short human readable description of the error
Describes the variable missing or malformed
The query parameter the error relates to, such as filter.targetType
Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.
object
The maximum number of resources allowed
The kind of resource the limit applies to
Example
{ "errors": [ { "code": "ERR_TOO_MANY_REQUESTS", "message": "too many requests" } ]}