This API is consumed by Apillon Developer Console web application (frontend).
- Getting Started
- Configuration
- Environments
- Requests
- Authentication and authorization
- Deployment
- License
Please read Development and Debug and Test documentation. These instructions will help you set up the development environment and run the API locally.
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
Environment | API URL | Frontend URL |
---|---|---|
Production | https://console-api.apillon.io/ | https://app.apillon.io/ |
The server speaks JSON. It is recommended that every call to the server includes a Content-Type
header set to application/json;
.
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)
Please read Deployment documentation.
Copyright (c) Apillon - all rights reserved.