检索此端点支持的 API 列表。立即尝试。
discovery.apis.list 方法会返回 Google API Discovery Service 支持的所有 API 的列表。每个条目的数据都是该 API 的发现文档的子集,并且该列表提供了一个受支持的 API 目录。如果特定 API 有多个版本,则每个版本在列表中都有自己的条目。
请求
HTTP 请求
GET https://discovery.googleapis.com/discovery/v1/apis
参数
参数名称 | 值 | 说明 |
---|---|---|
可选参数 | ||
name |
string |
仅添加具有给定名称的 API。 |
preferred |
boolean |
仅返回首选 API 版本。。”false ”。
|
请求正文
使用此方法时请勿提供请求正文。
响应
如果成功,此方法将返回采用以下结构的响应正文:
{
"kind": "discovery#directoryList",
"discoveryVersion": "v1",
"items": [
{
"kind": "discovery#directoryItem",
"id":string ,
"name":string ,
"version":string ,
"title":string ,
"description":string ,
"discoveryRestUrl":string ,
"discoveryLink":string ,
"icons": {
"x16":string ,
"x32":string
},
"documentationLink":string ,
"labels": [
string
],
"preferred":boolean
}
]
}
物业名称 | 值 | 说明 | 备注 |
---|---|---|---|
kind |
string |
固定字符串 Discovery#directoryList | |
discoveryVersion |
string |
指明用于生成此文档的 Discovery API 版本。 | |
items[] |
list |
各个目录条目。每个 API/版本对对应一个条目。 | |
items[].kind |
string |
此响应的类型。 | |
items[].id |
string |
此 API 的 ID。 | |
items[].name |
string |
API 的名称。 | |
items[].version |
string |
API 的版本。 | |
items[].title |
string |
此 API 的标题。 | |
items[].description |
string |
此 API 的说明。 | |
items[].discoveryRestUrl |
string |
发现 REST 文档的网址。 | |
items[].discoveryLink |
string |
指向发现文档的链接。 | |
items[].icons |
object |
指向代表 API 的 16x16 和 32x32 图标的链接。 | |
items[].icons.x16 |
string |
16x16 图标的网址。 | |
items[].icons.x32 |
string |
32x32 图标的网址。 | |
items[].documentationLink |
string |
直观易懂的 API 文档的链接。 | |
items[].labels[] |
list |
此 API 的状态标签,例如 limited_availability 或 deprecated 。 |
|
items[].preferred |
boolean |
如果要使用的版本是此版本,则为 true 。 |