探索文件:list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
擷取此端點支援的 API 清單。立即試用。
discovery.apis.list 方法會傳回 Google API 探索服務支援的所有 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 |
固定字串 found#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 。 |
|
動手操作
請使用下方的 Explorer,針對即時資料呼叫這個方法並查看回應。
或者,您也可以嘗試使用獨立的探索工具。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-07-27 (世界標準時間)。
[null,null,["上次更新時間:2022-07-27 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003ediscovery.apis.list\u003c/code\u003e endpoint retrieves a list of all APIs supported by the Google APIs Discovery Service.\u003c/p\u003e\n"],["\u003cp\u003eEach API and its versions are represented as individual entries in the response.\u003c/p\u003e\n"],["\u003cp\u003eYou can filter results using optional parameters like \u003ccode\u003ename\u003c/code\u003e to include specific APIs or \u003ccode\u003epreferred\u003c/code\u003e to return only preferred versions.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides comprehensive information about each API, including its ID, name, version, description, documentation link, and icons.\u003c/p\u003e\n"]]],[],null,["# Discovery Document: list\n\nRetrieve the list of APIs supported at this endpoint.\n\n\nThe `discovery.apis.list` method returns the list of all APIs supported by the\nGoogle APIs Discovery Service. The data for each entry is a subset of the Discovery Document\nfor that API, and the list provides a directory of supported APIs. If a specific API\nhas multiple versions, each of the versions has its own entry in the list.\n\nRequest\n-------\n\n### HTTP Request\n\n```\nGET https://discovery.googleapis.com/discovery/v1/apis\n```\n\n### Parameters\n\n| Parameter Name | Value | Description |\n|----------------|-----------|--------------------------------------------------------------------|\n| **Optional Parameters** |||\n| `name` | `string` | Only include APIs with the given name. |\n| `preferred` | `boolean` | Return only the preferred version of an API. \"`false`\" by default. |\n\n### Request Body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"kind\": \"discovery#directoryList\",\n \"discoveryVersion\": \"v1\",\n \"items\": [\n {\n \"kind\": \"discovery#directoryItem\",\n \"id\": string,\n \"name\": string,\n \"version\": string,\n \"title\": string,\n \"description\": string,\n \"discoveryRestUrl\": string,\n \"discoveryLink\": string,\n \"icons\": {\n \"x16\": string,\n \"x32\": string\n },\n \"documentationLink\": string,\n \"labels\": [\n string\n ],\n \"preferred\": boolean\n }\n ]\n}\n```\n\n| Property Name | Value | Description |\n|-----------------------------|-----------|------------------------------------------------------------------------------------|\n| `kind` | `string` | The fixed string discovery#directoryList |\n| `discoveryVersion` | `string` | Indicate the version of the Discovery API used to generate this doc. |\n| `items[]` | `list` | The individual directory entries. One entry per API/version pair. |\n| items[].`kind` | `string` | The kind for this response. |\n| items[].`id` | `string` | The ID of this API. |\n| items[].`name` | `string` | The name of the API. |\n| items[].`version` | `string` | The version of the API. |\n| items[].`title` | `string` | The title of this API. |\n| items[].`description` | `string` | The description of this API. |\n| items[].`discoveryRestUrl` | `string` | The url for the discovery REST document. |\n| items[].`discoveryLink` | `string` | A link to the discovery document. |\n| items[].`icons` | `object` | Links to 16x16 and 32x32 icons representing the API. |\n| items[].icons.`x16` | `string` | The url of the 16x16 icon. |\n| items[].icons.`x32` | `string` | The url of the 32x32 icon. |\n| items[].`documentationLink` | `string` | A link to human readable documentation for the API. |\n| items[].`labels[]` | `list` | Labels for the status of this API, such as `limited_availability` or `deprecated`. |\n| items[].`preferred` | `boolean` | `true` if this version is the preferred version to use. |"]]