Related resources are grouped in collections. To fetch all resources in a collection, a GET request is sent to the collection endpoint. To create a resource, a POST request is sent to the collection endpoint. The body of the POST request will be a resource (JSON) containing at least the minimum required fields for creating the desired resource.
Use the pagination query parameters offset
and limit
to
determine which and how many resources will be returned in a single response. Refer to
Pagination for more information.
Common collection fields
-
count
- (number) The number of resources returned in the collection. -
_links
- (object) URI links to the previous and next page of resources in the collection. If nooffset
is set and the number of resources returned is less than thelimit
, this property can be omitted. -
data
- (array) An array of the resources returned.
Request
GET http://{Address_Manager_IP}/api/v2/networks?limit=3&offset=5
Authorization: Basic {basicAuthenticationCredentials}
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json
{
"count": 3,
"_links": {
"prev": {
"href": "/api/v2/blocks/101115/networks?offset=2&limit=3"
},
"next": {
"href": "/api/v2/blocks/101115/networks?offset=8&limit=3"
}
},
"data": [
{
"id": 101126,
"type": "IPv4Network",
"name": null,
"configuration": {
"id": 100881,
"type": "Configuration",
"name": "config-1",
"_links": {
"self": {
"href": "/api/v2/configurations/100881"
}
}
},
"range": "10.0.5.0/24",
...
"_links": {
"self": {
"href": "/api/v2/networks/101126"
},
"collection": {
"href": "/api/v2/blocks/101115/networks"
},
"up": {
"href": "/api/v2/blocks/101115"
},
"addresses": {
"href": "/api/v2/networks/101126/addresses"
},
"defaultZones": {
"href": "/api/v2/networks/101126/defaultZones"
},
...
}
},
{
"id": 101128,
"type": "IPv4Network",
"name": null,
"configuration": {
"id": 100881,
"type": "Configuration",
"name": "config-1",
"_links": {
"self": {
"href": "/api/v2/configurations/100881"
}
}
},
"range": "10.0.6.0/24",
...
"_links": {
"self": {
"href": "/api/v2/networks/101128"
},
"collection": {
"href": "/api/v2/blocks/101115/networks"
},
"up": {
"href": "/api/v2/blocks/101115"
},
"addresses": {
"href": "/api/v2/networks/101128/addresses"
},
"defaultZones": {
"href": "/api/v2/networks/101128/defaultZones"
},
...
}
},
{
"id": 101130,
"type": "IPv4Network",
"name": null,
"configuration": {
"id": 100881,
"type": "Configuration",
"name": "config-1",
"_links": {
"self": {
"href": "/api/v2/configurations/100881"
}
}
},
"range": "10.0.7.0/24",
...
"_links": {
"self": {
"href": "/api/v2/networks/101130"
},
"collection": {
"href": "/api/v2/blocks/101115/networks"
},
"up": {
"href": "/api/v2/blocks/101115"
},
"addresses": {
"href": "/api/v2/networks/101130/addresses"
},
"defaultZones": {
"href": "/api/v2/networks/101130/defaultZones"
},
...
}
}
]
}