Virtual Routers Firewall Filters

Allowed HTTP methods

Method

Description

GET

get / list object/s

POST

create new object/s

DELETE

delete object/s

List single filter

GET /vrfwfilters/{vrfwfilter_uuid}/

Gets detailed information on a filter identified by vrfwfilter_uuid.

statuscode 200:

no error

Example request:

GET /api/2.0/vrfwfilters/5f54bebd-3763-47cd-a9b6-ee390e5f465f/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

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

{
    "action": "deny",
    "action_queue": null,
    "dst": "10.0.0.22",
    "dst_addr_op": true,
    "dst_port": "22",
    "dst_port_op": true,
    "icmp_type": null,
    "jobs": [
        {
            "resource_uri": "/api/2.0/jobs/afbb7e32-5c45-4e1f-a3ef-9baa91c5f359/",
            "uuid": "afbb7e32-5c45-4e1f-a3ef-9baa91c5f359"
        }
    ],
    "log": false,
    "order": 1,
    "protocol": "tcp",
    "resource_uri": "/api/2.0/vrfwfilters/5f54bebd-3763-47cd-a9b6-ee390e5f465f/",
    "src": "10.0.0.22",
    "src_addr_op": true,
    "src_port": "",
    "src_port_op": true,
    "uuid": "5f54bebd-3763-47cd-a9b6-ee390e5f465f"
}

Creating

POST /vrfwfilters/

Creates a new virtual router firewall filter.

Status Codes:

Example request:

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

{
    "objects": [
        {
            "action": "deny",
            "dst": "10.0.0.22",
            "dst_addr_op": "=",
            "dst_port": "22",
            "dst_port_op": "=",
            "log": false,
            "order": 1,
            "policy": "906abae3-b533-4c5d-8d98-c459195b6230",
            "protocol": "tcp",
            "src": "10.0.0.22",
            "src_addr_op": "=",
            "src_port": "",
            "src_port_op": "="
        }
    ]
}

Example response:

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

{
    "objects": [
        {
            "action": "deny",
            "action_queue": null,
            "dst": "10.0.0.22",
            "dst_addr_op": true,
            "dst_port": "22",
            "dst_port_op": true,
            "icmp_type": null,
            "jobs": [
                {
                    "resource_uri": "/api/2.0/jobs/afbb7e32-5c45-4e1f-a3ef-9baa91c5f359/",
                    "uuid": "afbb7e32-5c45-4e1f-a3ef-9baa91c5f359"
                }
            ],
            "log": false,
            "order": 1,
            "policy": "906abae3-b533-4c5d-8d98-c459195b6230",
            "protocol": "tcp",
            "resource_uri": "/api/2.0/vrfwfilters/5f54bebd-3763-47cd-a9b6-ee390e5f465f/",
            "src": "10.0.0.22",
            "src_addr_op": true,
            "src_port": "",
            "src_port_op": true,
            "uuid": "5f54bebd-3763-47cd-a9b6-ee390e5f465f"
        }
    ]
}

Deleting

DELETE /vrfwfilters/{vrfwfilter_uuid}/

Deletes a single virtual router firewall filter.

Status Codes:

Example request:

DELETE /api/2.0/vrfwfilters/5f54bebd-3763-47cd-a9b6-ee390e5f465f/ 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/356d8de2-0396-41fa-a1ae-f2f4adca6827/",
        "uuid": "356d8de2-0396-41fa-a1ae-f2f4adca6827"
    },
    "uuid": "5f54bebd-3763-47cd-a9b6-ee390e5f465f"
}

Enable Filter Logging

POST /vrfwfilters/{vrfwfilter_uuid}/action/?do=enable_logging

Enables the filter logging on a filter identified by vrfwfilter_uuid.

Status Codes:

Example request:

POST /api/2.0/vrfwfilters/5f54bebd-3763-47cd-a9b6-ee390e5f465f/action/?do=enable_logging HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

{}

Example response:

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

{
    "action": "enable_logging",
    "result": "success",
    "uuid": "5f54bebd-3763-47cd-a9b6-ee390e5f465f"
}

Disable Filter Logging

POST /vrfwfilters/{vrfwfilter_uuid}/action/?do=disable_logging

Disables the filter logging on a filter identified by vrfwfilter_uuid.

Status Codes:

Example request:

POST /api/2.0/vrfwfilters/5f54bebd-3763-47cd-a9b6-ee390e5f465f/action/?do=disable_logging HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

{}

Example response:

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

{
    "action": "disable_logging",
    "result": "success",
    "uuid": "5f54bebd-3763-47cd-a9b6-ee390e5f465f"
}

Schema

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

{
    "allowed_detail_http_methods": [
        "get",
        "post",
        "delete",
        "put"
    ],
    "allowed_list_http_methods": [
        "get",
        "post",
        "delete",
        "put"
    ],
    "default_format": "application/json",
    "default_limit": 20,
    "fields": {
        "action": {
            "choices": [
                "allow",
                "deny"
            ],
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": false,
            "type": "string"
        },
        "action_queue": {
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": false,
            "type": "string"
        },
        "dst": {
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": false,
            "type": "string"
        },
        "dst_addr_op": {
            "default": true,
            "help_text": "Boolean data. Ex: True",
            "readonly": false,
            "required": true,
            "type": "boolean"
        },
        "dst_port": {
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": true,
            "type": "string"
        },
        "dst_port_op": {
            "default": true,
            "help_text": "Boolean data. Ex: True",
            "readonly": false,
            "required": true,
            "type": "boolean"
        },
        "icmp_type": {
            "choices": [
                "Redirect",
                "Time exceeded",
                "Time-stamp request",
                "Parameter unintelligible",
                "Information request",
                "Time-stamp reply",
                "Address mask request",
                "Information reply",
                "Address mask reply",
                "Echo reply",
                "Destination unreachable",
                "Any",
                "Source quench",
                "Echo request"
            ],
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": false,
            "type": "string"
        },
        "jobs": {
            "default": "No default provided.",
            "help_text": "Background jobs related to this resource",
            "readonly": true,
            "required": true,
            "type": "related"
        },
        "log": {
            "default": false,
            "help_text": "Boolean data. Ex: True",
            "readonly": false,
            "required": false,
            "type": "boolean"
        },
        "order": {
            "default": null,
            "help_text": "Integer data. Ex: 2673",
            "readonly": false,
            "required": true,
            "type": "integer"
        },
        "protocol": {
            "choices": [
                "tcp",
                "udp",
                "icmp"
            ],
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": true,
            "type": "string"
        },
        "resource_uri": {
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": true,
            "required": true,
            "type": "string"
        },
        "src": {
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": false,
            "type": "string"
        },
        "src_addr_op": {
            "default": true,
            "help_text": "Boolean data. Ex: True",
            "readonly": false,
            "required": true,
            "type": "boolean"
        },
        "src_port": {
            "default": null,
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "readonly": false,
            "required": true,
            "type": "string"
        },
        "src_port_op": {
            "default": true,
            "help_text": "Boolean data. Ex: True",
            "readonly": false,
            "required": true,
            "type": "boolean"
        },
        "uuid": {
            "default": null,
            "help_text": "UUID of the Firewall Filter",
            "readonly": true,
            "required": true,
            "type": "string"
        }
    },
    "filtering": {
        "name": "exact",
        "name__contains": "exact",
        "tag": "exact",
        "uuid": "exact"
    },
    "ordering": [
        "uuid",
        "name"
    ]
}