Network ipspaces endpoint overview
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
Overview
An IPspace is an addressing domain within which each IP address is unique. The same address may appear in a different IPspace, but the matching addresses are considered to be distinct. SVMs and broadcast domains, and therefore IP interfaces and Ethernet ports, are associated with a single IPspace. This endpoint supports the following operations: GET (collection and instance), POST, PATCH, and DELETE.
Retrieving IPspace information
You can use the IPspaces GET API to retrieve all IPspaces configured in the cluster, including built-in and custom IPspaces, and specifically requested IPspaces.
Examples
Retrieving a list of the IPspaces in the cluster
The following example returns the requested list of IPspaces configured in the cluster.
# The API: /api/network/ipspaces # The call: curl -X GET "https://<mgmt-ip>/api/network/ipspaces?fields=*" -H "accept: application/hal+json" # The response: { "records": [ { "uuid": "dcc7e79c-5acc-11e8-b9de-005056b42b32", "name": "Default", "_links": { "self": { "href": "/api/network/ipspaces/dcc7e79c-5acc-11e8-b9de-005056b42b32" } } }, { "uuid": "dfd3c1b2-5acc-11e8-b9de-005056b42b32", "name": "Cluster", "_links": { "self": { "href": "/api/network/ipspaces/dfd3c1b2-5acc-11e8-b9de-005056b42b32" } } }, { "uuid": "dedec1be-5aec-1eee-beee-0eee56be2b3e", "name": "Ipspace1", "_links": { "self": { "href": "/api/network/ipspaces/dedec1be-5aec-1eee-beee-0eee56be2b3e" } } } ], "num_records": 3, "_links": { "self": { "href": "/api/network/ipspaces?fields=*" } } }
Retrieving a specific IPspace in the cluster
The following example returns the specific IPspace requested. The system returns an error if there is no IPspace with the requested UUID.
# The API: /api/network/ipspaces/{uuid} # The call: curl -X GET "https://<mgmt-ip>/api/network/ipspaces/dfd3c1b2-5acc-11e8-b9de-005056b42b32?fields=*" -H "accept: application/hal+json" # The response: { "uuid": "dcc7e79c-5acc-11e8-b9de-005056b42b32", "name": "Default", "_links": { "self": { "href": "/api/network/ipspaces/dcc7e79c-5acc-11e8-b9de-005056b42b32" } } }
Creating IPspaces
You can use the network IPspaces POST API to create IPspaces.
Example
Creating an IPspace
The following output displays the record returned after the creation of an IPspace with the name "ipspace1".
# The API: /api/network/ipspaces # The call: curl -X POST "https://<mgmt-ip>/api/network/ipspaces?return_records=true" -H "accept: application/hal+json" -d "{ \"name\": \"ipspace2\"}" # The response: { "num_records": 1, "records": [ { "uuid": "4165655e-0528-11e9-bd68-005056bb046a", "name": "ipspace2", "_links": { "self": { "href": "/api/network/ipspaces/4165655e-0528-11e9-bd68-005056bb046a" } } } ] }
Updating IPspaces
You can use the IPspaces PATCH API to update the attributes of the IPspace.
Example
Updating the name of an IPspace
The following PATCH request is used to update the name of the IPspace from "ipspace2" to "ipspace20".
# The API: /api/network/ipspaces/{uuid} # The call: curl -X PATCH "https://<mgmt-ip>/api/network/ipspaces/4165655e-0528-11e9-bd68-005056bb046a" -H "accept: application/hal+json" -d "{ \"name\": \"ipspace20\"}"
Deleting IPspaces
You can use the IPspaces DELETE API to delete an IPspace.
Example
Deleting an IPspace
The following DELETE request is used to delete an IPspace.
# The API: /api/network/ipspaces/{uuid} # The call: curl -X DELETE "https://<mgmt-ip>/api/network/ipspaces/4165655e-0528-11e9-bd68-005056bb046a" -H "accept: application/hal+json" -H "Content-Type: application/json"