Tài liệu khám phá: danh sách
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Truy xuất danh sách API được hỗ trợ tại điểm cuối này.
Thử ngay.
Phương thức Discovery.apis.list trả về danh sách tất cả các API mà Dịch vụ khám phá của API Google hỗ trợ. Dữ liệu của mỗi mục là tập hợp con của Tài liệu khám phá dành cho API đó và danh sách này cung cấp một thư mục các API được hỗ trợ. Nếu một API cụ thể có nhiều phiên bản, thì mỗi phiên bản sẽ có một mục riêng trong danh sách.
Yêu cầu
Yêu cầu HTTP
GET https://discovery.googleapis.com/discovery/v1/apis
Các thông số
Tên thông số |
Giá trị |
Mô tả |
Tham số không bắt buộc |
name |
string |
Chỉ bao gồm các API có tên cụ thể.
|
preferred |
boolean |
Chỉ trả về phiên bản API bạn muốn. "false " theo mặc định.
|
Nội dung yêu cầu
Đừng cung cấp nội dung yêu cầu bằng phương thức này.
Phản hồi
Nếu thành công, phương thức này sẽ trả về nội dung phản hồi với cấu trúc sau:
{
"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
}
]
}
Tên thuộc tính |
Giá trị |
Mô tả |
Lưu ý |
kind |
string |
mặt hàng phát hiện chuỗi cố định#directoryList |
|
discoveryVersion |
string |
Cho biết phiên bản API Khám phá được dùng để tạo tài liệu này. |
|
items[] |
list |
Mỗi mục trong thư mục riêng lẻ. Một mục cho mỗi cặp API/phiên bản. |
|
items[].kind |
string |
Loại cho phản hồi này. |
|
items[].id |
string |
Giá trị nhận dạng của API này. |
|
items[].name |
string |
Tên API. |
|
items[].version |
string |
Phiên bản của API. |
|
items[].title |
string |
Tiêu đề của API này. |
|
items[].description |
string |
Thông tin mô tả về API này. |
|
items[].discoveryRestUrl |
string |
URL cho tài liệu REST khám phá. |
|
items[].discoveryLink |
string |
Đường liên kết đến tài liệu khám phá. |
|
items[].icons |
object |
Đường liên kết đến biểu tượng 16x16 và 32x32 biểu thị API. |
|
items[].icons.x16 |
string |
URL của biểu tượng 16x16. |
|
items[].icons.x32 |
string |
URL của biểu tượng 32x32. |
|
items[].documentationLink |
string |
Đường liên kết đến tài liệu mà con người có thể đọc được cho API. |
|
items[].labels[] |
list |
Các nhãn cho trạng thái của API này, chẳng hạn như limited_availability hoặc deprecated . |
|
items[].preferred |
boolean |
true nếu phiên bản này là phiên bản ưu tiên cần sử dụng. |
|
Hãy thử xem!
Hãy sử dụng trình khám phá bên dưới để gọi phương thức này trên dữ liệu trực tiếp và xem phản hồi.
Ngoài ra, hãy thử
trình khám phá
độc lập.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2022-07-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2022-07-27 UTC."],[[["\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. |"]]