Skip to content

App service documentation

Gábor Pintér edited this page Nov 10, 2017 · 5 revisions

Create and manage apps within Stash Backend. Each app will be represented with its own schema in Postgres.

Action Method URL App auth required
Create application POST /apps No
Auth application POST /apps/authenticate No
Get application GET /apps Yes
Delete application DELETE /apps Yes

Create application

  • Call: POST /apps
  • Creates a Stash Backend App
  • This endpoint can be closed within the configuration file
  • appId is used to identify the app and to log in to Dashboard
  • masterEmail is used to log in to Dashboard and authenticate a Master
  • masterPasswordHash is used to log in to Dashboard and authenticate a Master

Request body

Property Type Mandatory
appId String true
appSecret String true
masterEmail String true
masterPasswordHash String true
appName String false
appDescription String false

Authenticate application

  • Call: POST /apps/authenticate
  • Returns an App Authentication Token
  • Use this token alongside with your appId to authenticate your App calls

Required headers for App authenticaton

{
  "X-Auth-App-Id": "12345",
  "X-Auth-App-Token": "123456789"
}

Request body

Property Type Mandatory
appId String true
appSecret String true

Get application

  • Call: GET /apps
  • App Authentication required
  • Returns authenticated app object

Delete application

  • Call: DELETE /apps
  • App Authentication required
  • Deletes authenticated app