Open Platform API Documentation

Base Path

/

Endpoints

Application Management

Get Applications List

GET /apps

List created applications, excluding the internal system application. The returned tokens arrays are empty.

Create Application

POST /apps

Request Body

{
  name?: string,      // Application name (cannot be 'system')
  scopes?: string[]   // Permission scopes
}

Update Application

PUT /apps

Request Body

{
  id: number,       // Application ID
  name?: string,     // Application name
  scopes?: string[]  // Permission scopes
}

Delete Applications

DELETE /apps

Request Body

number[]  // Array of application IDs

Reset Application Secret

PUT /apps/:id/reset-secret

Reset the application secret and invalidate its existing tokens. Clients must obtain a new token using the new secret.

Authentication

Get Access Token

GET /auth/token

Query Parameters

{
  client_id: string,     // Client ID
  client_secret: string  // Client Secret
}

Error Handling

  • All endpoints follow unified error handling mechanism
  • Successful responses return { code: 200, data: ... }
  • Error logging is handled by Winston logger

Notes

  • Parameter validation using celebrate/Joi
  • Application name cannot use reserved word 'system'
  • Supports batch deletion of applications
  • Secret reset operation is irreversible