IP Aliases
Allowed HTTP methods
Method |
Description |
|---|---|
GET |
get / list object/s |
POST |
create new object/s |
DELETE |
delete object/s |
List single IP alias
- GET /ipaliases/{ipalias_uuid}/
Gets information on an IP Alias identified by ipalias_uuid.
- statuscode 200:
no error
Example request:
GET /api/2.0/ipaliases/f317b570-1693-4002-95fe-172cd4327cb2/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"interface": "9b183b90-84cf-46fb-b3d8-12d2e5383eae",
"ip_address": "10.0.22.1",
"jobs": [
{
"resource_uri": "/api/2.0/jobs/9b293ff2-cf38-4b5f-837d-ac676a107993/",
"uuid": "9b293ff2-cf38-4b5f-837d-ac676a107993"
}
],
"resource_uri": "/api/2.0/ipaliases/f317b570-1693-4002-95fe-172cd4327cb2/",
"uuid": "f317b570-1693-4002-95fe-172cd4327cb2"
}
Creating
- POST /ipaliases/
Creates a new IP Alias.
- statuscode 201:
object created
Example request:
POST /api/2.0/ipaliases/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop
{
"objects": [
{
"interface": "9b183b90-84cf-46fb-b3d8-12d2e5383eae",
"ip_address": "10.0.22.1"
}
]
}
Example response:
HTTP/1.1 202 ACCEPTED
Content-Type: application/json; charset=utf-8
{
"objects": [
{
"interface": "9b183b90-84cf-46fb-b3d8-12d2e5383eae",
"ip_address": "10.0.22.1",
"jobs": [
{
"resource_uri": "/api/2.0/jobs/9b293ff2-cf38-4b5f-837d-ac676a107993/",
"uuid": "9b293ff2-cf38-4b5f-837d-ac676a107993"
}
],
"resource_uri": "/api/2.0/ipaliases/f317b570-1693-4002-95fe-172cd4327cb2/",
"uuid": "f317b570-1693-4002-95fe-172cd4327cb2"
}
]
}
Deleting
- DELETE /ipaliases/{ipalias_uuid}/
Deletes a single IP Alias identified by ipalias_uuid.
- statuscode 204:
No content, object deletion started.
Example request:
DELETE /api/2.0/ipaliases/f317b570-1693-4002-95fe-172cd4327cb2/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop
Example response:
HTTP/1.1 202 ACCEPTED
Content-Type: application/json; charset=utf-8
{
"job": {
"resource_uri": "/api/2.0/jobs/aa44571e-9dba-4f49-a553-2d4425a5a65a/",
"uuid": "aa44571e-9dba-4f49-a553-2d4425a5a65a"
},
"uuid": "f317b570-1693-4002-95fe-172cd4327cb2"
}
Schema
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"allowed_detail_http_methods": [
"get",
"post",
"delete"
],
"allowed_list_http_methods": [
"get",
"post",
"delete"
],
"default_format": "application/json",
"default_limit": 20,
"fields": {
"interface": {
"default": null,
"help_text": "UUID of the LAN interface",
"readonly": false,
"required": false,
"type": "string"
},
"ip_address": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": true,
"type": "string"
},
"jobs": {
"default": "No default provided.",
"help_text": "Background jobs related to this resource",
"readonly": true,
"required": true,
"type": "related"
},
"resource_uri": {
"default": "No default provided.",
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": true,
"required": true,
"type": "string"
},
"uuid": {
"default": null,
"help_text": "UUID of the IP Alias",
"readonly": true,
"required": false,
"type": "string"
}
},
"filtering": {
"name": "exact",
"name__contains": "exact",
"tag": "exact",
"uuid": "exact"
},
"ordering": [
"uuid",
"name"
]
}