Tunploy
APIReferenceGroups

Change every device in a group

PATCH/groups/{external_id}

Sets the fields sent on every device in the group: renew a plan with expires_at, or end it with enabled: false. Every device is checked first, so a value that is wrong for one changes none.

Needs the devices:write scope.

Authorization

apiKey
AuthorizationBearer <token>

An API key: tp_….

In: header

Path Parameters

external_id*string

The external_id the devices share, URL-encoded.

Lengthlength <= 255

Request Body

application/json

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 PATCH "https://example.com/groups/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "external_id": "string",  "device_count": 0,  "month_usage": {    "rx_bytes": 0,    "tx_bytes": 0,    "total_bytes": 0  },  "devices": [    {      "id": 0,      "server_id": 0,      "name": "string",      "external_id": "string",      "metadata": {},      "address": "10.8.0.2",      "public_key": "string",      "client_key": true,      "enabled": true,      "status": "active",      "online": true,      "last_handshake": "2019-08-24T14:15:22Z",      "data_limit": 0,      "limit_period": "monthly",      "period_usage": {        "rx_bytes": 0,        "tx_bytes": 0,        "total_bytes": 0      },      "usage_reset_at": "2019-08-24T14:15:22Z",      "expires_at": "2019-08-24T14:15:22Z",      "speed_limit": 0,      "month_usage": {        "rx_bytes": 0,        "tx_bytes": 0,        "total_bytes": 0      },      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "config": "string"    }  ]}