Dependencies API Documentation

Base Path

/dependencies

Endpoints

Get Dependencies List

GET /

Get list of all dependencies.

Create Dependencies

POST /

Request Body

[
  {
    name: string,    // Dependency name
    type: number,    // Dependency type
    remark: string   // Remark (optional)
  }
]

Update Dependency

PUT /

Request Body

{
  id: number,      // Dependency ID
  name: string,    // Dependency name
  type: number,    // Dependency type
  remark: string   // Remark (optional)
}

Delete Dependencies

DELETE /

Request Body

number[]  // Array of dependency IDs

Force Delete Dependencies

DELETE /force

Request Body

number[]  // Array of dependency IDs

Get Single Dependency

GET /:id

Get details of specified dependency ID.

Reinstall Dependencies

PUT /reinstall

Request Body

number[]  // Array of dependency IDs

Cancel Installation

PUT /cancel

Request Body

number[]  // Array of dependency IDs

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
  • Supports batch operations (delete, reinstall, cancel, etc.)