HTTP API Gateway Specification Reference
Bondy HTTP API Gateway acts as a reverse proxy by accepting incoming REST API actions and translating them into WAMP actions over a Realm's procedures and topics.
Learn how to load an API Gateway Specification using the HTTP Admin API.
Loading an API you have defined using the API Gateway Specification is very easy you just need to know the location of your file and use the HTTP Admin API.
The following instructions assume the following:
my_api.json
id
property has the value com.example.my_api
localhost
on port 18081
Host and Port
The above assumption means the bondy.conf
file which you use to start Bondy contains the following configuration options:
admin_api.http.enabled = on
admin_api.http.port = 18081
The following command will load the API Specification, validate it and if successful it will be compiled and activate it.
curl -X "POST" "http://localhost:18081/services/load_api_spec" \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Accept: application/json; charset=utf-8' \
--data-binary "@my_api.json"
Cluster deployments
If this node is part of a Bondy cluster, the API will be automatically replicated and activated in all nodes.
If the previous command didn't fail the API has been loaded and activated. However, to be entirely sure you can use the following command which should retrieve the API Specification.
curl -X "GET" "http://localhost:18081/api_specs/com.example.my_api"