Skip to content

Files

Latest commit

e145c7d · Apr 14, 2025

History

History

dev-console-api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 5, 2024
Apr 14, 2025
Nov 5, 2024
Sep 16, 2022
Mar 27, 2024
Sep 16, 2022
Mar 7, 2025
May 9, 2024
May 15, 2024
Oct 20, 2022
Aug 31, 2022
May 15, 2024
Sep 16, 2022

README.md

Apillon Developer console API

This API is consumed by Apillon Developer Console web application (frontend).

Table of Contents

  1. Getting Started
  2. Configuration
  3. Environments
  4. Requests
  5. Authentication and authorization
  6. Deployment
  7. License

Getting Started

Please read Development and Debug and Test documentation. These instructions will help you set up the development environment and run the API locally.

Configuration

Environment variables that have to be set:

  /************************************************************
   * DEV-CONSOLE-API -Apillon Developer Console API
   ************************************************************/
  DEV_CONSOLE_API_MYSQL_HOST: string;
  DEV_CONSOLE_API_MYSQL_PORT: number;
  DEV_CONSOLE_API_MYSQL_USER: string;
  DEV_CONSOLE_API_MYSQL_PASSWORD: string;
  DEV_CONSOLE_API_MYSQL_DEPLOY_USER: string;
  DEV_CONSOLE_API_MYSQL_DEPLOY_PASSWORD: string;
  DEV_CONSOLE_API_MYSQL_DATABASE: string;

  DEV_CONSOLE_API_MYSQL_HOST_TEST: string;
  DEV_CONSOLE_API_MYSQL_PORT_TEST: number;
  DEV_CONSOLE_API_MYSQL_USER_TEST: string;
  DEV_CONSOLE_API_MYSQL_PASSWORD_TEST: string;
  DEV_CONSOLE_API_MYSQL_DATABASE_TEST: string;

  DEV_CONSOLE_API_HOST: string;
  DEV_CONSOLE_API_PORT: number;

  DEV_CONSOLE_API_HOST_TEST: string;
  DEV_CONSOLE_API_PORT_TEST: number;

  /************************************************************
   * ADMIN_CONSOLE-API - Apillon Admin Console API
   ************************************************************/
  ADMIN_CONSOLE_API_PORT: number;
  ADMIN_CONSOLE_API_HOST: string;
  ADMIN_CONSOLE_API_PORT_TEST: number;
  ADMIN_CONSOLE_API_HOST_TEST: string;

For the test database, it is recommended to use a local database and instead of localhost use the string 127.0.0.1

Environments

Environment API URL Frontend URL
Production https://console-api.apillon.io/ https://app.apillon.io/

Requests

The server speaks JSON. It is recommended that every call to the server includes a Content-Type header set to application/json;.

Authentication and authorization

AuthGuard middleware performs authentication and authorization checks.

Except for the login and reset routes, API routes restrict public access and require authentication. Requests must include a bearer token. This token can be recieved with call to (/users/login) endpoint.

Authorization is checked at the endpoint level in controller. Required permissions are defined with @Permissions decorator. Example:

@Permissions(
  { role: DefaultUserRole.PROJECT_OWNER },
  { role: DefaultUserRole.PROJECT_ADMIN },
  { role: DefaultUserRole.PROJECT_USER },
)
@UseGuards(AuthGuard)

Deployment

Please read Deployment documentation.

License

Copyright (c) Apillon - all rights reserved.