The REST APIs provide programmatic access to read and write YAKjs data. Responses are in JSON format and a status code 200 will be returned on success.

The latest major version of the API is v1.

How to use the API

To use the API you need to build a HTTP request using

  • the documented method (GET, POST, PUT, DELETE)
  • the host and port (http://localhost:8790/)
  • the API version (/v1/)
  • the API path (/instances)
  • optional an resource ID

This example uses the linux command line tool curl to get the help store item.

$ curl http://localhost:8790/v1/storeItems/help

For PUTand POSTHTPP request the body shall contain a JSON object.

This example sends a POST request to add a new value to the internal store.

$ curl -X POST -H "Content-Type: application/json" -d '{"storeItem": {"key": "hello", "value": "YAKjs"}}' http://localhost:8790/v1/storeItems


Below are some pages that will help you get going with the REST APIs