Hosted gateway

Save a resource to one gateway's inventory

POST
/v1/public/account/workspace/deployments/resources

Signed account session, current workspace ADMIN or OWNER and verified email; same-site JSON is mandatory. Saves to the gateway deployment_id names, else the primary; an id the workspace does not hold is 404 GATEWAY_NOT_FOUND. Saving never activates routing; a repeat returns the saved resource. At most 50 resources per gateway.

Authorization

AccountSessionCookie
decionis_account_session<token>

The signed HttpOnly account session the web app holds after sign-in (also accepted as a Bearer acct_ token).

In: cookie

Query Parameters

deployment_id?string

One of the current workspace's gateways; omitted, the workspace's primary. The organization always comes from the session, never from a parameter.

Formatuuid

Request Body

application/json

resource*string
Length1 <= length <= 2048
type*string

Value in

  • "url"
  • "tcp_ip"
  • "hostname"
label*string
Length1 <= length <= 100

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/public/account/workspace/deployments/resources" \  -H "Content-Type: application/json" \  -d '{    "resource": "string",    "type": "url",    "label": "string"  }'
{  "resources": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "url",      "resource": "string",      "label": "string",      "created_at": "2019-08-24T14:15:22Z",      "status": "connected",      "status_message": "string",      "tcp": {        "route_id": "dd833dbc-f3c5-44d9-98a2-7ba12ebc8160",        "generation": 1,        "state": "provisioning",        "gateway_url": "http://example.com",        "connector_online": true,        "last_seen_at": "2019-08-24T14:15:22Z",        "credentials_available": true,        "message": "string"      }    }  ],  "resource_limit": 50,  "tcp_enabled": true,  "resource": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "type": "url",    "resource": "string",    "label": "string",    "created_at": "2019-08-24T14:15:22Z",    "status": "connected",    "status_message": "string",    "tcp": {      "route_id": "dd833dbc-f3c5-44d9-98a2-7ba12ebc8160",      "generation": 1,      "state": "provisioning",      "gateway_url": "http://example.com",      "connector_online": true,      "last_seen_at": "2019-08-24T14:15:22Z",      "credentials_available": true,      "message": "string"    }  },  "created": true}