跳到主要内容

资源:获取资源

路由 URL​

GET https://playcanvas.com/api/assets/:assetId?branchId=:branchId

说明​

获取单个资源的详细信息。

示例​

curl -H "Authorization: Bearer {accessToken}" https://playcanvas.com/api/assets/{assetId}?branchId={branchId}

HTTP 请求

GET https://playcanvas.com/api/assets/{assetId}?branchId={branchId}
Authorization: Bearer {accessToken}

参数​

名称类型必需说明
assetIdnumber✔️资源 ID。
branchIdstring✔️分支 ID。

响应结构​

Status: 200
{
"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
}

错误​

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

请求限流​

此路由采用普通限流。