API Docs
Links to API Documentation


Latest API Docs

API Docs

v1.0.556

https://app.swaggerhub.com/apis-docs/johnnydevpanel/dev-panel_api/1.0.556

v1.0.554

https://app.swaggerhub.com/apis-docs/johnnydevpanel/dev-panel_api/v1.0.554#/

How to use the API

The following documentation describes how to use the API. We have created some simple scripts to demonstrate the use of the APIs... these scripts are for demonstration only. Create your own scripts for your purposes as needed.

We are aware that these scripts have hard coded values... they are there for demo only.

The code and output below has been edited and sanitized and is therefore slightly different than actual input and output.

List examples

Create examples

Run commands

The command API lets you run arbitrary code in any branch's container... This is very handy as you can use it to do almost action you like on a branch using an API.

Here's is how the API is structured...

 https://api.site.devpanel.com/dev-v1/sites/<site-id>/branches/<branch-id>/commands' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'auth-mode: cognito' \
  -H "$AUTH_HEADER" \
  -H "$ORGANIZATION_HEADER" \
  --data-raw '{ "commands": ["arg1", "arg2", "etc."] }' | jq -r ".result"

In the above code segments, note that you need both <site-id> and <branch-id> for this API. Plus, note that you need to break up the command in an array as "commands": ["arg1", "arg2", "etc."]. The std-out that will be returned by this API will need to be parsed and formatted using the jq command as well.

Get Logs/Stats

Clear & Reset