获取团队所有项目
/v1/teams/:team_id/projects-
URL
https://api.worktile.com/v1/teams/:team_id/projects
-
HTTP请求方式
GET
-
支持格式
JSON
Header参数
{ "Content-Type":"application/json", "access_token":"xxx" }
示例
curl -l https://api.worktile.com/v1/teams/1111/projects?access_token=xxx
-
HTTP请求参数
参数 必选 类型 说明 team_id true string 团队team_id access_token true string OAuth授权后获得,请求时可放在header中 -
返回数据
示例
HTTP/1.1 200 ok
[ { "pid":"eda54f766b7f457ea7cdb5a93c6d892e", "name":"Worktile 开发", "desc":"", "archived":0, "pic":"icon-github", "bg":"#5d8d0b", "visibility":2, "is_star":0, "pos":65536.5, "member_count":20, "curr_role":1, "permission":31 }, { "pid":"5f689c8ff5a449b291719f71bddd5f38", "name":"Worktile Web ", "desc":"", "archived":0, "pic":"icon-dribbble", "bg":"#15945f", "visibility":2, "is_star":0, "pos":65536.5, "member_count":20, "curr_role":1, "permission":31 } ]
返回值字段 类型 说明 pid string 项目pid name string 项目名称 desc string 项目说明 archived number 是否存档,0:未存档,1:已存档 pic string 项目图标 bg string 项目背景颜色 visibility number 项目类型, 1:私有项目,2:团队项目,3:公开项目 is_star number 是否常用项目,0:非常用项目,1:常用项目 pos number 位置 member_count number 成员数量 curr_role number 当前用户角色: 1:管理员,2:成员,3:访客,4:来宾,公开项目可以访问 permission number 当前用户权限: 31:管理员,15:成员,7:访客,5:来宾,0:无法操作 -
异常结果
示例
HTTP/1.1 401 Unauthorized
{ "error_code":100005, "error_message":"没授权,请授权后再操作", "request":"/v1/teams/:team_id/members" }
错误码(error_code) 错误信息(error_message) http状态码(statusCode) 100005 没授权,请授权后再操作 401 100006 access_token不正确 400 300003 team_id不能为空 400 3000004 团队不存在 404 300006 获取团队项目失败 500