RESTful

Create/Update a Region

Request

  • Method: PUT

  • URL: https://<host:port>/regions/<namespace>/<name>

  • Header: Content-Type: application/json

  • Body:

    {
      "internalPort": <port>,
      "externalAddr": "<host>:<port>"
    }

    View Use → for detailed description of each field.

Response

  • OK
    • StatusCode: 200
    • Body: {"msg": "OK"}
  • Invalid
    • StatusCode: 400
    • Body: {"msg": "<validation error>"}
  • Unprocessable
    • StatusCode: 422
    • Body: {"msg": "<error>"}

Get a Region

Request

  • Method: GET
  • URL: https://<host:port>/regions/<namespace>/<name>

Response

  • OK

    • StatusCode: 200
    • Body:
    {
      "ns": "<namespace>",
      "name": "<name>",
      "internalPort": <port>,
      "externalAddr": "<host>:<port>",
    }
  • Not Found

    • StatusCode: 404
    • Body: {"msg":"not found"}
  • Unprocessable

    • StatusCode: 422
    • Body: {"msg": "<error>"}

Delete a Region

Request

  • Method: DELETE
  • URL: https://<host:port>/regions/<namespace>/<name>

Response

  • OK
    • StatusCode: 200
    • Body: {"msg": "OK"}
  • Not Found
    Same as OK.
  • Unprocessable
    • StatusCode: 422
    • Body: {"msg": "<error>"}

Create/Update a Destination

Request

  • Method: PUT

  • URL: https://<host:port>/dsts/<namespace>/<name>

  • Header: Content-Type: application/json

  • Body:

    {
      "internalPort": <port>,
      "dstRegion": "<ns>/<name>",
      "dstAddr": "<host>:<port>"
    }

    View Use → for detailed description of each field.

Response

  • OK
    • StatusCode: 200
    • Body: {"msg": "OK"}
  • Invalid
    • StatusCode: 400
    • Body: {"msg": "<validation error>"}
  • Unprocessable
    • StatusCode: 422
    • Body: {"msg": "<error>"}

Get a Destination

Request

  • Method: GET
  • URL: https://<host:port>/dsts/<namespace>/<name>

Response

  • OK

    • StatusCode: 200
    • Body:
    {
      "ns": "<namespace>",
      "name": "<name>",
      "internalPort": <port>,
      "dstRegion": "<ns>/<name>",
      "dstAddr": "<host>:<port>"
    }
  • Not Found

    • StatusCode: 404
    • Body: {"msg":"not found"}
  • Unprocessable

    • StatusCode: 422
    • Body: {"msg": "<error>"}

Delete a Destination

Request

  • Method: DELETE
  • URL: https://<host:port>/dsts/<namespace>/<name>

Response

  • OK
    • StatusCode: 200
    • Body: {"msg": "OK"}
  • Not Found
    Same as OK.
  • Unprocessable
    • StatusCode: 422
    • Body: {"msg": "<error>"}

Host:Port

<xts-dns-name>:<port>.
<xts-dns-name> is the DNS name generated by K8S for XTS,
and defaults to xts.<namespace>.svc.cluster.local,
and can be abbreviated to xts.<namespace>,
and can be abbreviated to xts if the service which sends the request is deployed in the same namespace as XTS.
<port> defaults to 1060.

Mutual TLS Authentication

XTS and client authenticate each other during TLS handshake.

Defend Against DDoS Attacks

XTS limits max number of concurrent requests. Configurable at deployment time.

See also Secure HTTP Server →