Skip to content
Справочник APIConsumerConsumer.devices

Advertise CIDRs from a device as exit routes

Эта страница пока доступна только на английском языке. Руководства переведены; автоматически генерируемый справочник API публикуется на английском.

PUT
/consumer/v1/devices/{id}/advertised-routes

Replaces the device's advertised CIDR set and moves the device into the pending exit-node lifecycle state. An account owner / admin must then call POST /v1/devices/{id}/exit-node/approve before the device can be selected as an exit hop.

Authorization

bearer_auth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Device ID

Formatuuid

Header Parameters

X-Project-Id*string

UUID of the project that scopes consumer accounts, devices, sessions, and VSpaces for the request.

Formatuuid

Request Body

application/json

Up to 16 IPv4/IPv6 CIDRs to advertise from the device.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/consumer/v1/devices/55555555-5555-5555-5555-555555555555/advertised-routes" \  -H "X-Project-Id: 11111111-1111-1111-1111-111111111111" \  -H "Content-Type: application/json" \  -d '{    "routes": [      "10.0.0.0/24",      "192.168.7.0/24"    ]  }'
{  "advertise_capability": "kernel",  "advertised_routes": [    "0.0.0.0/0",    "::/0"  ],  "approved_routes": null,  "device_id": "55555555-5555-5555-5555-555555555555",  "exit_node_status": "pending",  "platform": "linux"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}