Skip to Content
Services

Create a Service

POST
/accounts/{account_id}/services

Authorization

headerAuthorizationBearer <token>

qlt_… Access token (kind api)

Path Parameters

account_id*string

Request Body

application/json
  1. body
name*string
Match^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
kind*string
Value in"web""tcp"
device_id*string
target*string
ports?array<>
identity_headers?boolean
Defaultfalse
allowed?

Who. A shorthand that creates or updates the Service's own Access rule.

Response Body

Created

application/json
  1. response
id*string
name*string

Service name, unique among Services and Devices

kind*string
Value in"web""tcp"
device_id*string
target*string
ports?array<integer>

tcp only; empty = the target port

url*string

the one to open: the HTTPS name once its certificate is valid, else short_url

short_url?string

web: http://, which keeps working; tcp: :

https?|

web, while HTTPS for Web Services is on (ADR 0005)

address?|

Service address (tcp only)

identity_headers?boolean

web only

allowed*

Who. A shorthand that creates or updates the Service's own Access rule.

health?
Example Request
curl -X POST 'https://tiltas.openpanel.sh/api/v1/accounts/string/services' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "kind": "web",  "device_id": "string",  "target": "string"}'
Example Response
{  "id": "string",  "name": "string",  "kind": "web",  "device_id": "string",  "target": "string",  "ports": [    0  ],  "url": "string",  "short_url": "string",  "https": {    "url": "string",    "status": "pending",    "error": "string"  },  "address": "string",  "identity_headers": true,  "allowed": {    "everyone": true,    "members": [      "string"    ],    "groups": [      "string"    ],    "devices": [      "string"    ]  },  "health": {    "ok": true,    "checked_at": "2019-08-24T14:15:22Z"  }}