Skip to content

Reference

Proxies

REST API reference for Proxies: manage the proxies that give external access to services of an instance. 5 operations.

Reference3 min read

For the base URL, authentication and errors, see the REST API overview.

GET /v1/proxies ​

  • Request: GET /v1/proxies
  • Operation: ListProxies
  • Operation ID: Proxy_ListProxies
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Example request

bash
curl 'https://YOUR_SERVER/v1/proxies' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200)

json
[
  {
    "created": 1792263090786,
    "description": "Served at https://grafana.<server hostname>: the proxy id is the subdomain, and it needs a wildcard certificate",
    "enabled": true,
    "modified": 1792263090786,
    "name": "Grafana",
    "proxy": "grafana"
  },
  {
    "created": 1792263090786,
    "description": "TCP Proxy Description",
    "enabled": true,
    "modified": 1792263090786,
    "name": "TCP Proxy Name",
    "proxy": "tcp_proxy_id"
  },
  {
    "created": 1792263090786,
    "description": "TCP Proxy Description",
    "enabled": true,
    "modified": 1792263090786,
    "name": "TCP Proxy Name",
    "proxy": "tcp_proxy_id"
  },
  {
    "created": 1792263090786,
    "description": "UDP Proxy Description",
    "enabled": true,
    "modified": 1792263090786,
    "name": "UDP Proxy Name",
    "proxy": "udp_proxy_id"
  },
  {
    "created": 1792263090786,
    "description": "UDP Proxy Description",
    "enabled": true,
    "modified": 1792263090786,
    "name": "UDP Proxy Name",
    "proxy": "udp_proxy_id"
  }
]

POST /v1/proxies ​

  • Request: POST /v1/proxies
  • Operation: CreateProxy
  • Operation ID: Proxy_Create
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
configobjectyesprotocol: tcp, udp, tcp_iotmp or http_iotmp. source: {port (number), secure (TLS), routing: port | subdomain (the proxy id becomes the subdomain of the server hostname), allowed_ips (IOTMP)}. target: {type: address | plugin, address, plugin: {user, name}, port (number), secure, timeout (seconds, default 10)}; IOTMP protocols also take target.user and target.device. options.timeout_minutes expires sessions. port_management (default true) opens ports on Thinger-hosted servers. Creating or updating starts the listener right away; an update with a partial config replaces the stored config.
descriptionstringno
enabledbooleanno
namestringyes
proxystringyesPattern: ^[a-zA-Z0-9-_]{1,32}$

Example request: HTTPS Subdomain to Plugin

bash
curl -X POST 'https://YOUR_SERVER/v1/proxies' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "config": {
    "protocol": "tcp",
    "source": {
      "routing": "subdomain",
      "secure": true
    },
    "target": {
      "plugin": {
        "name": "grafana",
        "user": "user_id"
      },
      "port": 3000,
      "secure": false,
      "type": "plugin"
    }
  },
  "description": "Served at https://grafana.<server hostname>: the proxy id is the subdomain, and it needs a wildcard certificate",
  "enabled": true,
  "name": "Grafana",
  "proxy": "grafana"
}'

Example body: TCP Proxy to Host

json
{
  "config": {
    "protocol": "tcp",
    "source": {
      "port": 8090,
      "secure": true
    },
    "target": {
      "address": "localhost",
      "port": 8086,
      "secure": false,
      "type": "address"
    }
  },
  "description": "TCP Proxy Description",
  "enabled": true,
  "name": "TCP Proxy Name",
  "proxy": "tcp_proxy_id"
}

Example body: TCP Proxy to Plugin

json
{
  "config": {
    "protocol": "tcp",
    "source": {
      "port": 8090,
      "secure": true
    },
    "target": {
      "plugin": {
        "name": "plugin_id",
        "user": "user_id"
      },
      "port": 8086,
      "secure": false,
      "type": "plugin"
    }
  },
  "description": "TCP Proxy Description",
  "enabled": true,
  "name": "TCP Proxy Name",
  "proxy": "tcp_proxy_id"
}

Example body: UDP Proxy to Host

json
{
  "config": {
    "protocol": "udp",
    "source": {
      "port": 9000
    },
    "target": {
      "address": "localhost",
      "port": 9000,
      "type": "address"
    }
  },
  "description": "UDP Proxy Description",
  "enabled": true,
  "name": "UDP Proxy Name",
  "proxy": "udp_proxy_id"
}

Example body: UDP Proxy to Plugin

json
{
  "config": {
    "protocol": "udp",
    "source": {
      "port": 9000
    },
    "target": {
      "plugin": {
        "name": "plugin_id",
        "user": "user_id"
      },
      "port": 9000,
      "type": "plugin"
    }
  },
  "description": "UDP Proxy Description",
  "enabled": true,
  "name": "UDP Proxy Name",
  "proxy": "udp_proxy_id"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/proxies/{proxy} ​

  • Request: GET /v1/proxies/
  • Operation: ReadProxyConfig
  • Operation ID: Proxy_ReadConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
proxypathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/proxies/YOUR_PROXY' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200, HTTPS Subdomain to Plugin)

json
{
  "config": {
    "protocol": "tcp",
    "source": {
      "routing": "subdomain",
      "secure": true
    },
    "target": {
      "plugin": {
        "name": "grafana",
        "user": "user_id"
      },
      "port": 3000,
      "secure": false,
      "type": "plugin"
    }
  },
  "created": 1792263090786,
  "description": "Served at https://grafana.<server hostname>: the proxy id is the subdomain, and it needs a wildcard certificate",
  "enabled": true,
  "modified": 1792263090786,
  "name": "Grafana",
  "proxy": "grafana"
}

Response example (200, TCP Proxy to Host)

json
{
  "config": {
    "protocol": "tcp",
    "source": {
      "port": 8090,
      "secure": true
    },
    "target": {
      "address": "localhost",
      "port": 8086,
      "secure": false,
      "type": "address"
    }
  },
  "created": 1792263090786,
  "description": "TCP Proxy Description",
  "enabled": true,
  "modified": 1792263090786,
  "name": "TCP Proxy Name",
  "proxy": "tcp_proxy_id"
}

Response example (200, TCP Proxy to Plugin)

json
{
  "config": {
    "protocol": "tcp",
    "source": {
      "port": 8090,
      "secure": true
    },
    "target": {
      "plugin": {
        "name": "plugin_id",
        "user": "user_id"
      },
      "port": 8086,
      "secure": false,
      "type": "plugin"
    }
  },
  "created": 1792263090786,
  "description": "TCP Proxy Description",
  "enabled": true,
  "modified": 1792263090786,
  "name": "TCP Proxy Name",
  "proxy": "tcp_proxy_id"
}

Response example (200, UDP Proxy to Host)

json
{
  "config": {
    "protocol": "udp",
    "source": {
      "port": 9000
    },
    "target": {
      "address": "localhost",
      "port": 9000,
      "type": "address"
    }
  },
  "created": 1792263090786,
  "description": "UDP Proxy Description",
  "enabled": true,
  "modified": 1792263090786,
  "name": "UDP Proxy Name",
  "proxy": "udp_proxy_id"
}

Response example (200, UDP Proxy to Plugin)

json
{
  "config": {
    "protocol": "udp",
    "source": {
      "port": 9000
    },
    "target": {
      "plugin": {
        "name": "plugin_id",
        "user": "user_id"
      },
      "port": 9000,
      "type": "plugin"
    }
  },
  "created": 1792263090786,
  "description": "UDP Proxy Description",
  "enabled": true,
  "modified": 1792263090786,
  "name": "UDP Proxy Name",
  "proxy": "udp_proxy_id"
}

PUT /v1/proxies/{proxy} ​

  • Request: PUT /v1/proxies/
  • Operation: UpdateProxy
  • Operation ID: Proxy_Update
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
proxypathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
configobjectno
descriptionstringno
enabledbooleanno
namestringno

Example request: Full Update

bash
curl -X PUT 'https://YOUR_SERVER/v1/proxies/YOUR_PROXY' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "config": {
    "protocol": "tcp",
    "source": {
      "routing": "subdomain",
      "secure": true
    },
    "target": {
      "plugin": {
        "name": "grafana",
        "user": "user_id"
      },
      "port": 3000,
      "secure": false,
      "type": "plugin"
    }
  },
  "description": "Served at https://grafana.<server hostname>: the proxy id is the subdomain, and it needs a wildcard certificate",
  "enabled": true,
  "name": "Grafana",
  "proxy": "grafana"
}'

Example body: Update 'config'

json
{
  "config": {
    "protocol": "tcp",
    "source": {
      "routing": "subdomain",
      "secure": true
    },
    "target": {
      "plugin": {
        "name": "grafana",
        "user": "user_id"
      },
      "port": 3000,
      "secure": false,
      "type": "plugin"
    }
  }
}

Example body: Update 'description'

json
{
  "description": "Served at https://grafana.<server hostname>: the proxy id is the subdomain, and it needs a wildcard certificate"
}

Example body: Update 'enabled'

json
{
  "enabled": true
}

Example body: Update 'name'

json
{
  "name": "Grafana"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/proxies/{proxy} ​

  • Request: DELETE /v1/proxies/
  • Operation: DeleteProxy
  • Operation ID: Proxy_Delete
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
proxypathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/proxies/YOUR_PROXY' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden