Skip to content

Resources API

Resources endpoints 用于管理 delivery resources 和 external setup flow。

GET /api/v2/resources

返回 resources。

参数:

参数位置说明
workspaceQuery可选 workspace fullname 过滤器。
projectQuery可选 project fullname 过滤器。

Payload: 无。

响应:ResourceView[]

GET /api/v2/resources/:fullname

返回一个 resource。

参数:

参数位置说明
fullnamePathResource fullname。

Payload: 无。

响应:ResourceView

PUT /api/v2/resources/:fullname

创建或更新 resource。

参数:

参数位置说明
fullnamePathResource fullname。必须与 payload.fullname 一致。

Payload:

字段必填说明
nameResource 名称。
fullnameResource fullname。
workspaceWorkspace fullname。
project如果 resource 绑定到 project,则为 project fullname。
blueprint定义 setup/action behavior 的 blueprint fullname。
dataResource-specific data。
tagsTags。
labelsLabels。
meta.title可见标题。

响应:ResourceView

DELETE /api/v2/resources/:fullname

删除 resource。

参数:

参数位置说明
fullnamePathResource fullname。

Payload: 无。

响应:OperationResult

GET /api/v2/resources/external/:token

通过 token 打开 external resource setup。

参数:

参数位置说明
tokenPathExternal setup token。

Payload: 无。

响应:ExternalResourceView

POST /api/v2/resources/external/:token

发送 external resource setup payload。

参数:

参数位置说明
tokenPathExternal setup token。

Payload:

字段必填说明
transform对象或 null,resource/app-specific transform/setup result。

响应:OperationResult