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.)

Permissions and filters

The full base path is /open/dependencies; applications require the dependencies scope. List queries accept optional searchValue, type and status URL parameters.

Dependency type: 0 for Node.js, 1 for Python3 and 2 for Linux packages. Use numeric types in create/update bodies. Creation accepts an array of objects; updates require id/name/type.

For list filters, type uses the enum names nodejs, python3 or linux, unlike the numeric values in create/update bodies. status accepts comma-separated values, such as "2,5".

status: 0 installing, 1 installed, 2 installation failed, 3 removing, 4 removed, 5 removal failed, 6 queued and 7 cancelled. An accepted create/reinstall request does not mean installation has finished; check status and installation logs.

ql dependency list --query '{"type":"nodejs","status":"2"}' --json