探索文件:清單

擷取這個端點支援的 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[].icons object 代表 API 的 16x16 和 32x32 圖示連結。
items[].icons.x16 string 16x16 圖示的網址。
items[].icons.x32 string 32x32 圖示的網址。
items[].labels[] list 這個 API 的狀態標籤,例如 limited_availabilitydeprecated
items[].preferred boolean true,如果這個版本是偏好的版本。