{
    "title": "List connections request v1",
    "description": "List all broadband connections. Supports pagination, sorting and filtering.",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://api.nextpertise.nl/schemas/broadband/list_connections_request_v1.json",
    "type": "object",
    "properties": {
        "pagination": {
            "title": "Request Pagination Object",
            "description": "Used to limit the amount of items returned.",
            "type": "object",
            "properties": {
                "per_page": {
                    "description": "Amount of items per page. '0' means 'all' on some endpoints.",
                    "type": "integer",
                    "maximum": 10000,
                    "minimum": 0
                },
                "page": {
                    "description": "The requested page-index, starts at 1.",
                    "type": "integer",
                    "minimum": 1
                }
            },
            "required": [
                "per_page",
                "page"
            ]
        },
        "filter": {
            "description": "Select relevant connections by using one or more of the filter properties.",
            "type": "object",
            "properties": {
                "nid": {
                    "description": "Connection (carrier/circuit) nid",
                    "type": "string"
                },
                "carrier_nid": {
                    "description": "Connection carrier nid",
                    "type": "string"
                },
                "circuit_nid": {
                    "description": "Connection circuit nid",
                    "type": "string"
                },
                "carrier_tags": {
                    "description": "Connection carrier tag",
                    "type": "string"
                },
                "circuit_tags": {
                    "description": "Connection circuit tag",
                    "type": "string"
                },
                "state": {
                    "type": "array",
                    "description": "The status of the broadband connections must have one of the given values.",
                    "items": {
                        "type": "string",
                        "enum": [
                            "PROCESSING",
                            "ACTIVE",
                            "TERMINATED",
                            "CANCELLED"
                        ],
                        "description": "Enum options:<pre class=\"empty-params-pre\">PROCESSING|ACTIVE|TERMINATED|CANCELLED</pre>. undefined"
                    },
                    "uniqueItems": true
                },
                "street": {
                    "description": "Select connections where (part of) the street name matches the given value.",
                    "type": "string"
                },
                "housenr": {
                    "description": "Select connections where (part of) the house number matches the given value.",
                    "type": "string"
                },
                "housenrext": {
                    "description": "Select connections where (part of) the house number extension matches the given value.",
                    "type": "string"
                },
                "zipcode": {
                    "description": "Select connections where (part of) the zipcode matches the given value.",
                    "type": "string"
                },
                "city": {
                    "description": "Select connections where (part of) the city name matches the given value.",
                    "type": "string"
                },
                "auth_user": {
                    "description": "Select connections where (part of) the RADIUS user name matches the given value.",
                    "type": "string"
                },
                "ipv4": {
                    "description": "Select connections where (part of) the IPv4 address matches the given value.",
                    "type": "string"
                },
                "sla": {
                    "description": "Select connections where (part of) the SLA name matches the given value.",
                    "type": "string"
                },
                "supplier": {
                    "description": "Select connections where (part of) the supplier name matches the given value.",
                    "type": "string"
                },
                "base_technology": {
                    "description": "Select connections where (part of) the base technology name matches the given value.",
                    "type": "string"
                },
                "data_technology": {
                    "description": "Select connections where (part of) the data technology name matches the given value.",
                    "type": "string"
                },
                "online": {
                    "description": "Enum options:<pre class=\"empty-params-pre\">online|offline|unknown</pre>. Select connections where the online status matches one or more of the array elements.",
                    "type": "string",
                    "enum": [
                        "online",
                        "offline",
                        "unknown"
                    ]
                },
                "active": {
                    "description": "Select connections which are administratively active.",
                    "type": "boolean"
                },
                "username": {
                    "description": "Select connections which username (login or authentication username)",
                    "type": "string"
                },
                "ip": {
                    "description": "Check if IP equal last_ipv4 or present in one of the IP range: primary_ipv4, routed_ipv4",
                    "type": "string"
                },
                "serviceid": {
                    "description": "Search on KPNWBA serviceid.",
                    "type": "string"
                },
                "enduser_uuid": {
                    "description": "Filter on enduser UUID.",
                    "type": "string"
                },
                "has_end_of_life_date": {
                    "description": "Select connections with an end of life date set.",
                    "type": "boolean"
                },
                "end_of_life_date": {
                    "description": "Prefix filter on end of life date.",
                    "type": "string",
                    "pattern": "^[0-9-]+$"
                },
                "end_of_life_reason": {
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "sort": {
            "type": "object",
            "properties": {
                "state": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "street": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "housenr": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "housenrext": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "zipcode": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "city": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "primary_ipv4": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "sla": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "supplier": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "base_technology": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "data_technology": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "active": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "online": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "end_of_life_date": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "last_username": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false
}