Introduction
Welcome to the Trustie API! You can use our API to access Trustie API endpoints, which can get information on projects, repository, and users in our platform.
We have language bindings in Shell,avaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
This example API documentation page was created with Trustie. Feel free to edit it and use it as a base for your own API's documentation.
Licenses
Get All Licenses
The Licenses API returns metadata about popular open source licenses and information about a particular project's license file.
示例:
curl -X GET \
-d "name=AFL" \
http://localhost:3000/api/licenses
await octokit.request('GET /api/licenses')
HTTP Request
GET https://forgeplus.trustie.net/api/licenses.json
请求参数
| Name | Required | Type | Description |
|---|---|---|---|
| name | false | string | name of the license |
返回字段说明:
{
"licenses": [
{
"id": 57,
"name": "AFL-1.2"
},
{
"id": 76,
"name": "AFL-3.0"
},
{
"id": 214,
"name": "AFL-1.1"
},
{
"id": 326,
"name": "AFL-2.1"
},
{
"id": 350,
"name": "AFL-2.0"
}
]
}
Gitignores
gitignore模板列表
获取gitignore模板列表, 支持名称搜索过滤
示例:
curl -X GET \
-d "name=Ada" \
http://localhost:3000/api/ignores.json
await octokit.request('GET /api/ignores.json')
HTTP 请求
GET api/ignores.json
请求参数
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| name | 否 | 否 | string |
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | id |
| name | string | gitignore名称 |
返回的JSON示例:
{
"ignores": [
{
"id": 1,
"name": "Ada"
}
]
}
Users
获取当前登陆用户信息
获取当前登陆用户信息
示例:
curl -X GET http://localhost:3000/api/users/me.json
await octokit.request('GET /api/users/me.json')
HTTP 请求
GET api/users/me.json
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| user_id | int | 用户id |
| username | string | 用户名称 |
| admin | boolean | 是否为管理用户 |
| login | string | 登录名 |
| image_url | string | 用户头像 |
返回的JSON示例:
{
"username": "username",
"login": "login",
"user_id": 100000,
"image_url": "avatars/User/b",
"admin": false
}
Projects
获取项目列表
获取项目列表,也可以更加相关条件过滤搜素
示例:
curl -X GET \
-d "page=1" \
-d "limit=5" \
http://localhost:3000/api/projects | jq
await octokit.request('GET /api/projects')
HTTP 请求
GET api/projects
请求参数
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| page | false | 1 | string | 页数,第几页 |
| limit | false | 15 | string | 每页多少条数据,默认15条 |
| sort_by | false | string | 排序类型, 取值:updated_on、created_on、forked_count、praises_count; updated_on: 更新时间排序,created_on: 创建时间排序,forked_count: fork数据排序,praises_count: 点赞数量排序,默认为updated_on更新时间排序 | |
| sort_direction | false | string | 排序方式,取值为: desc、asc; desc: 降序排序, asc: 升序排序, 默认为:desc | |
| search | false | string | 按照项目名称搜索 | |
| category_id | false | int | 项目类别id | |
| language_id | false | int | 项目语言id | |
| project_type | false | string | 项目类型, 取值为:common、mirror; common:开源托管项目, mirror:开源镜像项目 |
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| total_count | int | 项目总条数 |
| id | string | 项目id |
| name | string | 项目名称 |
| description | string | 项目简介 |
| visits | int | 流量数 |
| forked_count | int | 被fork的数量 |
| praises_count | int | star数量 |
| is_public | boolean | 是否公开, true:公开,false:未公开 |
| mirror_url | string | 镜像url |
| last_update_time | int | 最后更新时间,为UNIX格式的时间戳 |
| author | object | 项目创建者 |
| -- name | string | 用户名,也是用户标识 |
| category | object | 项目类别 |
| -- id | int | 项目类型id |
| -- name | string | 项目类型名称 |
| language | object | 项目语言 |
| -- id | int | 项目语言id |
| -- name | string | 项目语言名称 |
返回的JSON示例:
{
"total_count": 3096,
"projects": [
{
"id": 1400794,
"repo_id": 1402452,
"identifier": "cscw_2021_sponsor",
"name": "Sponsor机制下的开源贡献",
"description": "CSCW 2021 sponsor机制研究",
"visits": 5,
"praises_count": 0,
"forked_count": 0,
"is_public": true,
"mirror_url": null,
"type": 0,
"last_update_time": 1611971671,
"time_ago": "2天前",
"forked_from_project_id": null,
"open_devops": false,
"platform": "forge",
"author": {
"name": "张迅晖",
"login": "Nigel",
"image_url": "images/avatars/User/3675?t=1611832880"
},
"category": {
"id": 13,
"name": "云计算和大数据"
},
"language": {
"id": 34,
"name": "Python3.6"
}
}
]
}
推荐项目
获取推荐项目列表
示例:
curl -X GET \
http://localhost:3000/api/projects/recommend | jq
await octokit.request('GET /api/projects/recommend.json')
HTTP 请求
GET api/projects/recommend
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| total_count | int | 项目总条数 |
| id | string | 项目id |
| name | string | 项目名称 |
| description | string | 项目简介 |
| visits | int | 流量数 |
| forked_count | int | 被fork的数量 |
| praises_count | int | star数量 |
| is_public | boolean | 是否公开, true:公开,false:未公开 |
| mirror_url | string | 镜像url |
| last_update_time | int | 最后更新时间,为UNIX格式的时间戳 |
| author | object | 项目创建者 |
| -- name | string | 用户名,也是用户标识 |
| category | object | 项目类别 |
| -- id | int | 项目类型id |
| -- name | string | 项目类型名称 |
| language | object | 项目语言 |
| -- id | int | 项目语言id |
| -- name | string | 项目语言名称 |
返回的JSON示例:
[
{
"id": 20,
"repo_id": 2,
"identifier": "PNAekinmH",
"name": "FNILL",
"visits": 13567,
"author": {
"name": "王一达",
"login": "wangyida",
"image_url": "avatars/User/b"
},
"category": {
"id": 8,
"name": "其他"
}
}
]
项目主页
获取项目主页信息
示例:
curl -X GET \
http://localhost:3000/api/jasder/forgeplus/about | jq
await octokit.request('GET /api/jasder/forgeplus/about')
HTTP 请求
GET api/:owner/:repo/about
请求参数
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier |
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| identifier | string | project's identifier |
| content | string | 主页内容 |
| attachments | array | 附件 |
返回的JSON示例:
{
"content": "",
"identifier": "forgeplus",
attachments: []
}
创建项目
创建项目
示例:
curl -X POST \
-d "user_id=36401" \
-d "name=hnfl_demo" \
-d "description=my first project" \
-d "repository_name=hnfl_demo" \
-d "project_category_id=1" \
-d "project_language_id=2" \
-d "ignore_id=2" \
-d "license_id=1" \
http://localhost:3000/api/projects.json
await octokit.request('GET /api/projects.json')
HTTP 请求
POST api/projects
请求参数
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| user_id | 是 | int | 用户id或者组织id | |
| name | 是 | string | 项目名称 | |
| description | 是 | string | 项目描述 | |
| repository_name | 是 | string | 仓库名称, 只含有数字、字母、下划线不能以下划线开头和结尾,且唯一 | |
| project_category_id | 是 | int | 项目类别id | |
| project_language_id | 是 | int | 项目语言id | |
| ignore_id | 否 | int | gitignore相关id | |
| license_id | 否 | int | 开源许可证id | |
| private | 否 | boolean | 项目是否私有, true:为私有,false: 公开,默认为公开 |
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | id |
| name | string | 项目名称 |
返回的JSON示例:
{
"id": 3240,
"name": "好项目"
}
创建镜像项目
创建镜像项目
示例:
curl -X POST \
-d "user_id=36408" \
-d "clone_addr=https://gitea.com/mx8090alex/golden.git" \
-d "name=golden_mirror1" \
-d "description=golden_mirror" \
-d "project_category_id=1" \
-d "project_language_id=2" \
http://localhost:3000/api/projects/migrate.json
await octokit.request('GET /api/projects/migrate.json')
HTTP 请求
POST api/projects/migrate.json
请求参数
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| user_id | 是 | int | 用户id或者组织id | |
| name | 是 | string | 项目名称 | |
| clone_addr | 是 | string | 镜像项目clone地址 | |
| description | 否 | string | 项目描述 | |
| repository_name | 是 | string | 仓库名称, 只含有数字、字母、下划线不能以下划线开头和结尾,且唯一 | |
| project_category_id | 是 | int | 项目类别id | |
| project_language_id | 是 | int | 项目语言id | |
| is_mirror | 否 | boolean | 是否设置为镜像, true:是, false:否,默认为否 | |
| auth_username | 否 | string | 镜像源仓库的登录用户名 | |
| auth_password | 否 | string | 镜像源仓库的登录秘密 | |
| private | 否 | boolean | 项目是否私有, true:为私有,false: 非私有,默认为公开 |
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | id |
| name | string | 项目名称 |
返回的JSON示例:
{
"id": 3241,
"name": "这是一个镜像项目"
}
同步镜像
手动同步镜像
示例:
curl -X POST http://localhost:3000/api/repositories/1244/sync_mirror.json
await octokit.request('POST /api/repositories/1244/sync_mirror.json')
HTTP 请求
POST api/repositories/:id/sync_mirror.json
请求参数
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| id | 是 | int | 仓库id |
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| status | int | 状态码, 0:标识请求成功 |
| message | string | 服务端返回的信息说明 |
返回的JSON示例:
{
"status": 0,
"message": "success"
}
Fork项目
fork项目
示例:
curl -X POST http://localhost:3000/api/jasder/forgeplus/forks.json
await octokit.request('POST /api/jaser/jasder_test/forks.json')
HTTP 请求
POST api/:owner/:repo/forks.json
请求参数
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier |
返回字段说明
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | 项目id |
| identifier | string | 项目标识 |
返回的JSON示例:
{
"id": 3290,
"identifier": "newadm"
}
Repositories
仓库详情
仓库详情
示例:
curl -X GET http://localhost:3000/api/jasder/jasder_test.json
await octokit.request('GET /api/jasder/jasder_test.json')
HTTP 请求
GET /api/:owner/:repo
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | id |
| name | string | 项目名称 |
| identifier | string | 项目标识 |
| is_public | boolean | 项目是否公开, true:公开,false:私有 |
| description | string | 项目简介 |
| repo_id | int | 仓库id |
| repo_identifier | string | 仓库标识 |
返回的JSON示例:
{
"name": "ni项目",
"identifier": "mirror_demo",
"is_public": true,
"description": "my first project mirror_demo",
"repo_id": 75073,
"repo_identifier": "mirror_demo"
}
仓库详情(简版)
仓库详情
示例:
curl -X GET http://localhost:3000/api/jasder/jasder_test/simple.json
await octokit.request('GET /api/jasder/jasder_test/simple.json')
HTTP 请求
GET /api/:owner/:repo/simple
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | id |
| name | string | 项目名称 |
| identifier | string | 项目标识 |
| is_public | boolean | 项目是否公开, true:公开,false:私有 |
| description | string | 项目简介 |
| repo_id | int | 仓库id |
| repo_identifier | string | 仓库标识 |
返回的JSON示例:
{
"name": "ni项目",
"identifier": "mirror_demo",
"is_public": true,
"description": "my first project mirror_demo",
"repo_id": 75073,
"repo_identifier": "mirror_demo"
}
编辑仓库信息
编辑仓库信息
示例:
curl -X GET http://localhost:3000/api/jasder/jasder_test/edit.json
await octokit.request('GET /api/jasder/jasder_test/edit.json')
HTTP 请求
GET /api/:owner/:repo/edit.json
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| identifier | string | 仓库标识 |
| project_id | int | 项目id |
| project_name | string | 项目名称 |
| project_identifier | string | 项目标识 |
| project_description | string | 项目简介 |
| project_category_id | int | 项目类别id |
| project_language_id | int | 项目语言id |
| private | boolean | 项目是否私有, true:为私有,false: 公开 |
返回的JSON示例:
{
"identifier": "project",
"project_id": 3263,
"project_name": "项目",
"project_identifier": "project identifier",
"project_description": "project description",
"project_category_id": 1,
"project_language_id": 2,
"private": false
}
修改仓库信息
修改仓库信息
示例:
curl -X PATCH \
-d "name=hnfl_demo" \
-d "description=my first project" \
-d "project_category_id=1" \
-d "project_language_id=2" \
-d "private=true" \
http://localhost:3000/api/jasder/jasder_test.json
await octokit.request('PATCH /api/jasder/jasder_test.json')
HTTP 请求
PATCH /api/:owner/:repo
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| id | 是 | int | 项目id | |
| name | 否 | string | 项目名称 | |
| description | 否 | string | 项目描述 | |
| project_category_id | 否 | int | 项目类别id | |
| project_language_id | 否 | int | 项目语言id | |
| default_branch | 否 | string | 默认分支名称 | |
| private | 否 | boolean | 项目是否私有, true:为私有,false: 公开,默认为公开 |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | id |
| identifier | string | 项目标识 |
| name | string | 项目名称 |
| description | string | 项目简介 |
| project_category_id | int | 项目类别id |
| project_language_id | int | 项目语言id |
| private | 否 | boolean |
返回的JSON示例:
{
"id": 3263,
"identifier": "project identifier",
"name": "project name",
"description": "project description",
"project_category_id": 1,
"project_language_id": 2,
"is_public": true
}
删除仓库
删除仓库
示例:
curl -X DELETE http://localhost:3000/api/jasder/jasder_test.json
await octokit.request('DELETE /api/jasder/jasder_test.json')
HTTP 请求
PATCH /api/:owner/:repo
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| status | int | 返回状态, 0: 表示操作成功 |
| message | string | 返回信息说明 |
返回的JSON示例:
{
"status": 0,
"message": "success"
}
添加仓库成员
仓库中添加成员操作
示例:
curl -X POST \
-d "user_id=12" \
http://localhost:3000/api/jasder/jasder_test/collaborators.json
await octokit.request('POST /api/jasder/jasder_test/collaborators.json')
HTTP 请求
POST /api/:owner/:repo/collaborators.json
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier | |
| user_id | 是 | int | 用户id |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| status | int | 返回状态, 0: 表示操作成功 |
| message | string | 返回信息说明 |
返回的JSON示例:
{
"status": 0,
"message": "success"
}
删除仓库成员
仓库中删除成员操作
示例:
curl -X DELETE \
-d "user_id=12" \
http://localhost:3000/api/jasder/jasder_test/collaborators.json
await octokit.request('DELETE /api/jasder/jasder_test/collaborators.json')
HTTP 请求
DELETE /api/:owner/:repo/collaborators.json
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier | |
| user_id | 是 | int | 用户id |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| status | int | 返回状态, 0: 表示操作成功 |
| message | string | 返回信息说明 |
返回的JSON示例:
{
"status": 0,
"message": "success"
}
更改仓库成员角色(权限)
更改仓库成员角色
示例:
curl -X PUT \
-d "user_id=12" \
-d "role=Developer" \
http://localhost:3000/api/jasder/jasder_test/change_role.json
await octokit.request('PUT /api/jasder/jasder_test/change_role.json')
HTTP 请求
PUT /api/:owner/:repo/change_role.json
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier | |
| user_id | 是 | int | 用户id | |
| role | 是 | string | 取值范围:"Manager", "Developer", "Reporter";分别为项目管理人员(拥有所有操作权限)、项目开发人员(只拥有读写权限)、项目报告人员(只拥有读权限) |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| status | int | 返回状态, 0: 表示操作成功 |
| message | string | 返回信息说明 |
返回的JSON示例:
{
"status": 0,
"message": "success"
}
获取仓库成员列表
获取仓库成员列表
示例:
curl -X GET \
-d "page=1" \
-d "limit=5" \
http://localhost:3000/api/jasder/jasder_test/collaborators.json
await octokit.request('GET /api/jasder/jasder_test/collaborators.json')
HTTP 请求
GET /api/:owner/:repo/collaborators.json
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier | |
| page | 否 | string | 页数,第几页 | |
| limit | 否 | string | 每页多少条数据,默认15条 |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| total_count | int | 返回记录总条数 |
| members | array | 项目成员信息 |
| -- id | int | 用户id |
| -- name | string | 用户名称 |
| -- login | string | 用户登录名/标识 |
| -- image_url | string | 用户头像 |
| -- is_owner | boolean | 是否是项目的拥有者,true:是, false:不是 |
| -- role | string | 该用户在项目中的角色, Manager: 管理员(拥有操作权限); Developer:开发人员(只拥有读写权限); Reporter:报告人员(只拥有读权限) |
返回的JSON示例:
{
"total_count": 2,
"members": [
{
"id": 36401,
"name": "name",
"login": "login",
"image_url": "avatars/User/b",
"is_owner": true,
"role": "Manager"
},
{
"id": 36399,
"name": "name",
"login": "login",
"image_url": "avatars/User/b",
"is_owner": false,
"role": "Developer"
}
]
}
获取仓库代码目录
获取仓库代码目录
示例:
curl -X GET \
-d "ref=develop" \
http://localhost:3000//api/jasder/jasder_test/entries.json
await octokit.request('GET /api/jasder/jasder_test/entries.json')
HTTP 请求
GET /api/:owner/:repo/entries.json
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier | |
| ref | 否 | string | 分支名称、tag名称或是提交记录id,默认为master分支 |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| last_commit | object | |
| -- commit | object | |
| id | int | id |
| name | string | 文件夹或文件名称 |
| path | string | 文件夹或文件相对路径 |
| type | string | 文件类型, file:文件,dir:文件目录 |
| size | int | 文件夹或文件大小 单位B |
| content | string | 文件内容 |
| target | string | 标签 |
返回的JSON示例:
{
"last_commit": {
"commit": {
"sha": "3f2de4f78d2d7050486535082cd11cdfc9f3679e",
"url": "http://localhost:3003//api/repositories/api-cloud-platform/commits/3f2de4f78d2d7050486535082cd11cdfc9f3679e",
"message": "update README.md.",
"author": {
"name": "Gitee",
"email": "noreply@gitee.com",
"date": "2020-03-02T20:23:18+08:00"
},
"committer": {
"name": "Gitee",
"email": "noreply@gitee.com",
"date": "2020-03-02T20:23:18+08:00"
},
"timestamp": 1583151798,
"time_from_now": "3个月前"
},
"author": null,
"committer": null
},
"entries": [
{
"name": "ace-gate",
"path": "ace-gate",
"sha": "c83f85fc63b14edcd6fc502eee9996f5a9993eca",
"type": "dir",
"size": 0,
"content": null,
"target": null,
"commit": {
"message": "v2.9 升级alibaba组件release版本\n",
"sha": "6117eaab86f71115f42f2a46ff1683015cda798d",
"created_at": "1970-01-01 08:00",
"time_from_now": "1年前",
"created_at_unix": null
}
}
]
}
获取仓库代码子目录或者文件
获取仓库代码子目录或者文件
示例:
curl -X GET \
-d "ref=master" \
-d "filepath=file" \
http://localhost:3000//api/jasder/jasder_test/sub_entries.json
await octokit.request('GET /api/jasder/jasder_test/sub_entries.json')
HTTP 请求
GET /api/:owner/:repo/sub_entries.json
请求参数:
| 参数 | 必选 | 默认 | 类型 | 字段说明 |
|---|---|---|---|---|
| owner | 是 | string | 用户登录名 | |
| repo | 是 | string | 项目标识identifier | |
| filepath | 是 | string | 文件夹、文件的相对路径 | |
| ref | 否 | string | 分支名称、tag名称或是提交记录id,默认为master分支 |
返回字段说明:
| 参数 | 类型 | 字段说明 |
|---|---|---|
| id | int | id |
| name | string | 文件夹或文件名称 |
| path | string | 文件夹或文件相对路径 |
| type | string | 文件类型, file:文件,dir:文件目录 |
| size | int | 文件夹或文件大小 单位KB |
| content | string | 文件内容, |
| target | string | 标签 |
| url | string | 文件访问链接,带分支 |
| html_url | string | 文件访问链接,未标识分支 |
| git_url | string | 文件夹或文件的git仓库访问链接 |
| download_url | string | 文件下载、文件内容访问链接 |
返回的JSON示例:
[
{
"name": "build.rc",
"path": "lib/build.rc",
"type": "",
"size": 1268,
"content": null,
"target": null,
"url": "http://localhost:3003/api/v1/repos/18816895620/mirror_demo/contents/lib/build.rc?ref=master",
"html_url": "http://localhost:3003/18816895620/mirror_demo/src/branch/master/lib/build.rc",
"git_url": "http://localhost:3003/api/v1/repos/18816895620/mirror_demo/git/blobs/191fcf1a63b3777e2977fcede7dd5309efdd70fe",
"download_url": null
}
]
Pulls
Issues
Organizations
Teams
Errors
The Kittn API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 403 | Forbidden -- The kitten requested is hidden for administrators only. |
| 404 | Not Found -- The specified kitten could not be found. |
| 405 | Method Not Allowed -- You tried to access a kitten with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't json. |
| 410 | Gone -- The kitten requested has been removed from our servers. |
| 418 | I'm a teapot. |
| 429 | Too Many Requests -- You're requesting too many kittens! Slow down! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |