Skip to content

REST API

Drew Perry edited this page Feb 27, 2022 · 1 revision

We've aimed to keep the API extensive and useful but very simple.

At the heart of Kards is a single Javascript object we refer to as 'config' in both the background.js but also the various renderer processes. This one object determines everything about the app.

The server runs on port 8321

GET /

Will return the full config object.

GET Specific parts of config

You can also do things like /alteka/gradient which will just return that one setting. This is true for the whole object. So for example /notFilledCard/bounds will tell you if bounds are turned on.

GET /screens

Returns an array of the available screens, all the information about them and their IDs. This is useful should you want to set the screen to a different ID for example.

GET /audioDevices

Returns an array of the available audio devices, including their ID and the name. This can then be used to configure the audio testing or audioSync card.

PUT requests

Setting all configuration is made as a PUT request to / and a JSON body in the same format as the config object. Any subset of the config can be passed in. For example the body could be: {"alteka":{"gradient": false}}

Clone this wiki locally