HTTP Request Addressing

Request addresses depend on the host and port of the FTL server.

When sending REST-style HTTP requests using the FTL server web API, address them to URIs with one of these prefixes:

http://<host>:<port>/api/v1/
https://<host>:<port>/api/v1/
  • <host>:<port> is the FTL server's port (from its configuration file).
  • v1 denotes the version of the FTL server web API. This version number could change in subsequent releases.

For example, using the curl utility:

curl -X GET http://<host>:<port>/api/v1/clients
curl -X POST http://<host>:<port>/api/v1/server --data '{"cmd":"shutdown"}'

For brevity, this document omits the prefix, but you must supply it. For example:

  • The documentation for the request GET clients implies that you would send a GET request to this URI:
    http://<host>:<port>/api/v1/clients
  • The documentation for the request POST realm/transports/<name> implies that you would send a POST request to this URI:
    http://<host>:<port>/api/v1/realm/transports/<name>
    (Substitute the actual transport name for the variable <name>.)