跳到主要内容

分支:列出分支

路由 URL​

GET https://playcanvas.com/api/projects/:projectId/branches

说明​

获取项目全部未关闭分支的列表。

示例​

curl -H "Authorization: Bearer {accessToken}" "https://playcanvas.com/api/projects/{projectId}/branches"

HTTP 请求

GET https://playcanvas.com/api/projects/{projectId}/branches
Authorization: Bearer {accessToken}

参数​

名称类型说明
projectIdnumber项目 ID。

响应结构​

Status: 200
{
"result": [ {
"id": string,
"projectId": int,
"name": "Branch Name",
"createdAt": date,
"closed": bool,
"latestCheckpointId": string,
"user": {
"id": int,
"fullName": string,
"username": string
}
},, ...],
"pagination": {
"hasMore": bool
}
}

此接口使用略有不同的分页方式。响应包含 hasMore: true 时表示还有结果。将最后收到的分支 ID 作为 ?skip=branchId 查询参数,可继续按字母顺序获取分支。

错误​

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

请求限流​

此路由采用普通限流。