📢 Release 1.1.1(2026-09-29)现已推出
Arcadia

添加依赖

POST
/dependency/v1/create

支持单个或批量添加,名称与已有依赖重复或为平台保留依赖时添加失败,添加成功的依赖处于未安装状态。

授权

Token
headerapi-token<token>

32位令牌,在控制面板《个人设置 - 令牌管理》页面获取

请求主体

application/json
  1. body

添加依赖请求体

name*|array<string>

依赖名称(单个或数组,支持批量添加,可包含版本表达式)

ecosystem*DependencyEcosystem

包管理生态

值于"npm""pnpm""pip""apt""luarocks""gem"
remark?string

备注

响应主体

返回添加后的依赖信息,批量添加时返回成功添加的数量

application/json
  1. response

依赖完整记录(响应数据)

id*integer

唯一标识

name*string

依赖名称

ecosystem*DependencyEcosystem

包管理生态

值于"npm""pnpm""pip""apt""luarocks""gem"
installed_ver*string

已安装版本,未安装时为空字符串

status*DependencyStatus

安装状态,0 未安装、1 安装中、2 已安装、3 安装失败、4 卸载中

值于01234
last_error*string

最近一次操作的错误信息,无错误时为空字符串

remark*string

备注

create_time*string

创建时间

格式date-time
update_time*string

更新时间

格式date-time
curl -X POST "https://example.com/dependency/v1/create" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "ecosystem": "npm"  }'
{  "id": 0,  "name": "string",  "ecosystem": "npm",  "installed_ver": "string",  "status": 0,  "last_error": "string",  "remark": "string",  "create_time": "2019-08-24T14:15:22Z",  "update_time": "2019-08-24T14:15:22Z"}