Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.96 KB

File metadata and controls

57 lines (41 loc) · 1.96 KB

Alt4.dev API

This is the REST API serving alt4 apps.

Local Setup

  • Setup the core private repo as described here: https://github.com/alt4dev/core
  • Create a .env file at the root of your project for building the docker image locally. The file should have:
    • GITHUB_PAT Github access token that can access the core repo
    • GITHUB_USER The github access token the token belongs to

Routes

Applications

  • GET:/applications Returns a list of all applications accessible by the user

  • POST:/application Creates a new application belonging to the current user

  • PUT:/application/<app_id> Update an application

Application Users

  • GET:/application/<app_id>/users Returns a list of all the users in an application, or the current user object if the user doesn't have permission to access or edit other users

  • POST:/application/<app_id>/user Creates a new application user.

  • PUT:/application/<app_id>/user/<user_id> Update an application user, the current user must have users write permission.

Application Keys

  • GET:/application/<app_id>/user/<user_id>/keys Returns a list of all the keys owned by the user.

  • GET:/application/<app_id>/user/<user_id>/key/<key_id>/tokens Get a list of all tokens that belong to a specific key.

  • POST:/application/<app_id>/key Create a new key, the key will be created for the authorized application user.

Application Key Tokens
  • POST:/application/<app_id>/key/<key_id>/token Create a new token for the provided key. This operation only happens for the authorized user.

  • GET:/application/<app_id>/key/<key_id>/tokens Returns a list of tokens that belong to the given key.

  • PUT:/application/<app_id>/key/<key_id>/token/<token_id> Update a token. NB A token can only be deactivated or archived not updated.

Application Logs

  • GET:/application/<application_id>/logs Query debug logs from an application