跳到主要内容

资源:列出资源

路由 URL​

GET https://playcanvas.com/api/projects/:projectId/assets?branchId=:branchId&skip=:skip&limit=:limit

说明​

获取项目指定分支中全部资源的详细信息。

示例​

curl -H "Authorization: Bearer {accessToken}" "https://playcanvas.com/api/projects/{projectId}/assets?branchId={branchId}&skip={number}&limit={number}"

HTTP 请求

GET https://playcanvas.com/api/projects/{projectId}/assets?branchId={branchId}&skip={number}&limit={number}
Authorization: Bearer {accessToken}

参数​

名称类型必需说明
projectIdnumber✔️项目 ID。
branchIdstring✔️分支 ID。
skipnumber列出前跳过的资源数量,用于分页,默认为 0。
limitnumber最多列出的资源数量,默认为 16,上限为 100000。

响应结构​

Status: 200
{
"result": [{
"id": int,
"modifiedAt": date,
"createdAt": date,
"state": "ready" | "processing" | "error",
"name": string,
"type": string,
"scope":{
"type": string,
"id": int
},
"source": bool,
"sourceId": bool,
"tags": list of strings,
"preload": bool,
"file": {
"hash": string,
"filename": string,
"size": int,
"url": string
},
"parent": int
}, ...],
"pagination": {
"skip": int,
"limit": int,
"total": int,
}
}

错误​

状态码说明
401未通过身份验证
403禁止访问
404未找到项目
429请求过多

请求限流​

此路由采用普通限流。