元数据
Meta API 返回关于 GitHub Enterprise Server 的元信息,包括 GitHub Enterprise Server 服务的 IP 地址。
GitHub API Root
使用 GitHub Apps
代码示例
get/
curl \
-H "Accept: application/vnd.github.v3+json" \
http(s)://HOSTNAME/api/v3/
Response
Status: 200
Get GitHub Enterprise Server meta information
使用 GitHub Apps
HTTP 响应状态代码
状态代码 | 描述 |
---|---|
200 | OK |
304 | Not modified |
代码示例
get/meta
curl \
-H "Accept: application/vnd.github.v3+json" \
http(s)://HOSTNAME/api/v3/meta
Response
Status: 200
{
"verifiable_password_authentication": true,
"packages": [
"192.30.252.0/22"
],
"dependabot": [
"54.158.161.132"
],
"installed_version": "3.2.0"
}
Get Octocat
使用 GitHub Apps
Get the octocat as ASCII art
参数
标头 |
---|
名称, 类型, 描述 |
accept stringSetting to |
查询参数 |
名称, 类型, 描述 |
s stringThe words to show in Octocat's speech bubble |
HTTP 响应状态代码
状态代码 | 描述 |
---|---|
200 | OK |
代码示例
get/octocat
curl \
-H "Accept: application/vnd.github.v3+json" \
http(s)://HOSTNAME/api/v3/octocat
Response
Status: 200
Get the Zen of GitHub
使用 GitHub Apps
代码示例
get/zen
curl \
-H "Accept: application/vnd.github.v3+json" \
http(s)://HOSTNAME/api/v3/zen
Response
Status: 200