List networks
GET /v1/networks
Get a paginated list of networks.
Currently, there is a limit of one network per Defined Networking account.
Token scope required: networks:list
Request
Query Parameters
- includeCounts boolean
If true, return count of total records and current page start and count in metadata
- cursor string
Cursor value at which to start the results, provided in
nextCursor
orprevCursor
of a prior requestExample: bmV4dA.eyJsb2dzLmNyZQ5iIiwiX3ZhbHVlIjo9In19 - pageSize integer
Possible values:
<= 500
Default value:
25
Number of records to return in each page
- 200
Successful operation
- application/json
- Schema
- Example (from schema)
- noParams
- includeCounts
Schema
data object[]
Array [id stringcidr ipv4/cidrorganizationID stringsigningCAID stringThe ID of the Certificate Authority being used.
createdAt date-timename stringDefault value:
Network1
lighthousesAsRelays boolean]metadata object
totalCount integerThe total number of resources existing in the account
hasNextPage booleanIs there a page of data that can be fetched using the
nextCursor
?hasPrevPage booleanIs there a page of data that can be fetched using the
prevCursor
?nextCursor stringAn opaque string that can be used to fetch the next page of results. Not provided if result set is empty.
prevCursor stringAn opaque string that can be used to fetch the next page of results. Not provided if result set is empty.
page object
count integer requiredThe number of results returned in the response.
start integer requiredThe zero-based index of the first result within the overall list. For example, the first page will have a
start
of0
. If 25 results are fetched, and thenextCursor
used to fetch a new page of results, the second request'sstart
will be25
.
{
"data": [
{
"id": "string",
"cidr": "string",
"organizationID": "string",
"signingCAID": "string",
"createdAt": "2023-05-25T18:45:02.257Z",
"name": "Network1",
"lighthousesAsRelays": true
}
],
"metadata": {
"totalCount": 0,
"hasNextPage": true,
"hasPrevPage": true,
"nextCursor": "string",
"prevCursor": "string",
"page": {
"count": 0,
"start": 0
}
}
}
When includeCounts
parameter is not set to true
{
"data": [
{
"cidr": "100.100.0.0/22",
"id": "network-ZJOW3QUQUX5ZAVPVYRHDQUAEIY",
"organizationID": "org-F63A24JGCLJV3ZEUTLCBISGETA",
"signingCAID": "ca-TRJSVAAAPJXTOICJMG2KZBKQEE",
"name": "Network1",
"lighthousesAsRelays": false,
"createdAt": "2023-02-14T20:34:59Z"
}
],
"metadata": {
"hasNextPage": true,
"hasPrevPage": true,
"nextCursor": "bmV4dA.bHVlIjoieGJVS0UvYkRjQmZsY1pUbGJCc",
"prevCursor": "cHJldg.SI6ImIiLCJfdmFsdWUiOiI0dDVuREQreU"
}
}
Metadata returned when including request params for includeCounts=true
, pageSize=1
, and cursor="somevalue"
.
{
"data": [
{
"cidr": "100.100.0.0/22",
"id": "network-ZJOW3QUQUX5ZAVPVYRHDQUAEIY",
"organizationID": "org-F63A24JGCLJV3ZEUTLCBISGETA",
"signingCAID": "ca-TRJSVAAAPJXTOICJMG2KZBKQEE",
"name": "Network1",
"lighthousesAsRelays": false,
"createdAt": "2023-02-14T20:34:59Z"
}
],
"metadata": {
"totalCount": 500,
"hasNextPage": true,
"hasPrevPage": true,
"nextCursor": "bmV4dA.bHVlIjoieGJVS0UvYkRjQmZsY1pUbGJCc",
"prevCursor": "cHJldg.SI6ImIiLCJfdmFsdWUiOiI0dDVuREQreU",
"page": {
"count": 1,
"start": 5
}
}
}