GET

Obtaining list of Vip Request

It is possible to specify in several ways fields desired to be retrieved in Vip Request module through the use of some GET parameters. You are not required to use these parameters, but depending on your needs it can make your requests faster if you are dealing with many objects and you need few fields. The following fields are available for Vip Request module (hyperlinked or bold marked fields acts as foreign keys and can be expanded using __basic or __details when using fields, include or exclude GET Parameters. Hyperlinked fields points to its documentation):

Where:

  • “environmentvip” attribute is an integer that identifies the environment vip associated to the retrieved vip request.

  • “options” are the configured options vip associated to the retrieved vip request.
    • cache-group, persistence, timeout and traffic_return are some values present in the database. These values are configured to a set of restricted values.
  • “ports” are the configured ports associated to the retrieved vip request.
    • l4_protocol and l7_protocol in options and l7_rule in pools work as well as the values present in “options” discussed above.
    • “server_pool” is the identifier of the server-pool port associated to the retrieved vip request.

Obtaining list of Vip Request through id’s

URL:

/api/v3/vip-request/[vip_request_ids]/

where vip_request_ids are the identifiers of vip requests desired to be retrieved. It can use multiple id’s separated by semicolons.

Example with Parameter IDs:

One ID:

/api/v3/vip-request/1/

Many IDs:

/api/v3/vip-request/1;3;8/

Using fields GET parameter

Through fields, you can specify desired fields.

Example with field id:

fields=id

Example with fields id, name and created:

fields=id,name,created

Using kind GET parameter

The Vip Request module also accepts the kind GET parameter. Only two values are accepted by kind: basic or details. For each value it has a set of default fields. The difference between them is that in general details contains more fields than basic, and the common fields between them are more detailed for details. For example, the field ipv4 for basic will contain only the identifier and for details will contain name, the ip formated and description.

Example with basic option:

kind=basic

Response body with basic kind:

{
    "vips": [{
        "id": <integer>,
        "name": <string>,
        "ipv4": <integer>,
        "ipv6": <integer>
    }]
}

Example with details option:

kind=details

Response body with details kind:

{
    "vips": [{
        "id": <integer>,
        "name": <string>,
        "service": <string>,
        "business": <string>,
        "environmentvip": {
            "id": <integer>,
            "finalidade_txt": <string>,
            "cliente_txt": <string>,
            "ambiente_p44_txt": <string>,
            "description": <string>
        },
        "ipv4": {
            "id": <integer>,
            "ip_formated": <string>,
            "description": <string>
        },
        "ipv6": {
            "id": <integer>,
            "ip_formated": <string>,
            "description": <string>
        },
        "equipments": [{
            "id": <integer>,
            "name": <string>,
            "maintenance": <boolean>,
            "equipment_type": {
                "id": <integer>,
                "equipment_type": <string>
            },
            "model": {
                "id": <integer>,
                "name": <string>
            }
        },...],
        "default_names": [
            <string>,...
        ],
        "dscp": <integer>,
        "ports": [{
            "id": <integer>,
            "port": <integer>,
            "options": {
                "l4_protocol": {
                    "id": <integer>,
                    "tipo_opcao": <string>,
                    "nome_opcao_txt": <string>
                },
                "l7_protocol": {
                    "id": <integer>,
                    "tipo_opcao": <string>,
                    "nome_opcao_txt": <string>
                }
            },
            "pools": [{
                "id": <integer>,
                "server_pool": {
                    "id": <integer>,
                    "identifier": <string>,
                    "default_port": <integer>,
                    "environment": {
                        "id": <integer>,
                        "name": <string>
                    },
                    "servicedownaction": {
                        "id": <integer>,
                        "type": <string>,
                        "name": <string>
                    },
                    "lb_method": <string>,
                    "healthcheck": {
                        "identifier": <string>,
                        "healthcheck_type": <string>,
                        "healthcheck_request": <string>,
                        "healthcheck_expect": <string>,
                        "destination": <string>
                    },
                    "default_limit": <integer>,
                    "server_pool_members": [{
                        "id": <integer>,
                                                    "server_pool": <integer>,
                                                    "identifier": <string>,
                                                    "ip": {
                                                            "id": <integer>,
                                                            "ip_formated": <string>
                                                    },
                                                    "ipv6": {
                                                            "id": <integer>,
                                                            "ip_formated": <string>
                                                    },
                                                    "priority": <integer>,
                                                    "weight": <integer>,
                                                    "limit": <integer>,
                                                    "port_real": <integer>,
                                                    "member_status": <integer>,
                                                    "last_status_update_formated": <string>,
                                                    "equipment": {
                                                            "id": <integer>,
                                                            "name": <string>
                                                    }
                    },...],
                    "pool_created": <boolean>
                },
                "l7_rule": {
                    "id": <integer>,
                    "tipo_opcao": <string>,
                    "nome_opcao_txt": <string>
                },
                "l7_value": <integer>,
                "order": <integer>
            }]
        },...],
        "options": {
            "cache_group": {
                "id": <integer>,
                "tipo_opcao": <string>,
                "nome_opcao_txt": <string>
            },
            "traffic_return": {
                "id": <integer>,
                "tipo_opcao": <string>,
                "nome_opcao_txt": <string>
            },
            "timeout": {
                "id": <integer>,
                "tipo_opcao": <string>,
                "nome_opcao_txt": <string>
            },
            "persistence": {
                "id": <integer>,
                "tipo_opcao": <string>,
                "nome_opcao_txt": <string>
            }
        },
        "groups_permissions": [{
            "group": {
                "id": <integer>,
                "name": <string>
            },
            "read": <boolean>,
            "write": <boolean>,
            "change_config": <boolean>,
            "delete": <boolean>
        },...],
        "created": <boolean>
    },...]
}

Using fields and kind together

If fields is being used together kind, only the required fields will be retrieved instead of default.

Example with details kind and id field:

kind=details&fields=id

Default behavior without kind and fields

If neither kind nor fields are used in request, the response body will look like this:

{
    "vips": [{
        "id": <integer>,
        "name": <string>,
        "service": <string>,
        "business": <string>,
        "environmentvip": <integer>,
        "ipv4": <integer>,
        "ipv6": <integer>,
        "ports": [{
            "id": <integer>,
            "port": <integer>,
            "options": {
                "l4_protocol": <integer>,
                "l7_protocol": <integer>
            },
            "pools": [{
                "id": integer,
                "server_pool": <integer>,
                "l7_rule": <integer>,
                "l7_value": <integer>,
                "order": <integer>
            }, ...]
        }, ...],
        "options": {
            "cache_group": <integer>,
            "traffic_return": <integer>,
            "timeout": <integer>,
            "persistence": <integer>
        },
        "created": <boolean>
    },...]
}