Request method and URL
POST <API URL>/config/vips
A request body can contain settings listed in the table below.
Parameter | Type (format) | Required | Default value | Description |
---|---|---|---|---|
| String (ipv4) | Yes | — | Listen IP address for client requests |
| String | Yes, if you need to specify a traffic route that includes the listen IP address | — | IPv4 address and destination network in CIDR notation |
| String (ipv4) | Yes, if you need to specify a traffic route that includes the listen IP address | — | IPv4 address of a gateway used for traffic routing |
Response to a request
If an IP address is successfully added, the service will return a response with code 201 and list all the IP address settings.
A response body contains the parameters listed in the table below.
Parameter | Type (format) | Description |
---|---|---|
| String (uuid) | Identifier of a listen IP address |
| String (ipv4) | Listen IP address for client requests |
| Double | Last time the listen IP address was modified in PT AF |
| Array | List of routes |
| String (ipv4) | IPv4 address of a gateway used for traffic routing |
| String | IPv4 address and destination network in the CIDR notation. You can also use |
If the system failed to add an IP address, the service will return an error message.
Error code | Value | Example |
---|---|---|
401 | Invalid token |
|
403 | Access denied |
|
422 | A listen IP address setting is incorrect, or a required parameter in the request body is missing |
|
Example
Request:
JSON structure of a request body to add a listen IP address:
{ "routes": [ { "gateway": "10.120.9.1", "destination": "0.0.0.0/0" } ], "address": "10.120.9.133" }
Response:
{ "id": "edf66a2a-b193-4150-8c0a-5284e715dfbc", "last_modified": 1612349982, "address": "10.120.9.133", "routes": [ { "gateway": "10.120.9.1", "destination": "0.0.0.0/0" } ] }