Virtual Routers Routes

Allowed HTTP methods

Method

Description

GET

get / list object/s

POST

create new object/s

DELETE

delete object/s

List single route

GET /routes/{route_uuid}/

Gets detailed information on a route identified by route_uuid.

statuscode 200:

no error

Example request:

GET /api/2.0/routes/6251235d-c5a6-4422-a9e5-f6b4308f4f4a/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "gateway": "91.92.71.129",
    "inet": "inet",
    "jobs": [
        {
            "resource_uri": "/api/2.0/jobs/9e9a97ec-2a84-4938-a390-0a08a40d3fb7/",
            "uuid": "9e9a97ec-2a84-4938-a390-0a08a40d3fb7"
        }
    ],
    "network": "default",
    "resource_uri": "/api/2.0/routes/6251235d-c5a6-4422-a9e5-f6b4308f4f4a/",
    "uuid": "6251235d-c5a6-4422-a9e5-f6b4308f4f4a",
    "virtual_router": "13292e1f-0c3e-458d-a6d0-ed2ee2baa0b2"
}

Creating

POST /routes/

Creates a new virtual router route.

Status Codes:

Example request:

POST /api/2.0/routes/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

{
    "objects": [
        {
            "gateway": "91.92.71.129",
            "inet": "inet",
            "network": "default",
            "uuid": "8979c468-dd08-45d9-803a-86a9e870b8dc",
            "virtual_router": "13292e1f-0c3e-458d-a6d0-ed2ee2baa0b2"
        }
    ]
}

Example response:

HTTP/1.1 202 ACCEPTED
Content-Type: application/json; charset=utf-8

{
    "objects": [
        {
            "gateway": "91.92.71.129",
            "inet": "inet",
            "jobs": [
                {
                    "resource_uri": "/api/2.0/jobs/9e9a97ec-2a84-4938-a390-0a08a40d3fb7/",
                    "uuid": "9e9a97ec-2a84-4938-a390-0a08a40d3fb7"
                }
            ],
            "network": "default",
            "resource_uri": "/api/2.0/routes/8979c468-dd08-45d9-803a-86a9e870b8dc/",
            "uuid": "6251235d-c5a6-4422-a9e5-f6b4308f4f4a",
            "virtual_router": "13292e1f-0c3e-458d-a6d0-ed2ee2baa0b2"
        }
    ]
}

Deleting

DELETE /routes/{route_uuid}/

Deletes a single virtual router route.

Status Codes:

Example request:

DELETE /api/2.0/routes/8979c468-dd08-45d9-803a-86a9e870b8dc/ 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/0c0da23b-9a15-4c1a-8d6e-8a406862ce7e/",
        "uuid": "0c0da23b-9a15-4c1a-8d6e-8a406862ce7e"
    },
    "uuid": "8979c468-dd08-45d9-803a-86a9e870b8dc"
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get",
        "put",
        "post",
        "delete"
    ],
    "allowed_list_http_methods": [
        "get",
        "put",
        "post",
        "delete"
    ],
    "default_format": "application/json",
    "default_limit": 20,
    "fields": {
        "gateway": {
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": false,
            "type": "string"
        },
        "inet": {
            "choices": [
                "inet6",
                "inet"
            ],
            "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"
        },
        "network": {
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": false,
            "type": "string"
        },
        "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 virtual router route",
            "readonly": true,
            "required": true,
            "type": "string"
        },
        "virtual_router": {
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": true,
            "type": "string"
        }
    },
    "filtering": {
        "name": "exact",
        "name__contains": "exact",
        "tag": "exact",
        "uuid": "exact"
    },
    "ordering": [
        "uuid",
        "name"
    ]
}