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/clientscurl -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 clientsimplies that you would send aGETrequest to this URI:http://<host>:<port>/api/v1/clients - The documentation for the request
POST realm/transports/<name>implies that you would send aPOSTrequest to this URI:http://<host>:<port>/api/v1/realm/transports/<name>(Substitute the actual transport name for the variable <name>.)