Discovery API는 머신이 읽을 수 있는 각 API의 '탐색 문서' 메타데이터를 검색하기 위한 Google API의 목록을 제공합니다.
이 문서는 Google API와 상호작용하기 위해 클라이언트 라이브러리, IDE 플러그인, 기타 도구를 작성하려는 개발자를 대상으로 합니다.
탐색 서비스 배경
개념
Google API 탐색 서비스는 두 가지 기본 개념을 기반으로 합니다.
API 디렉터리: API 탐색 서비스에서 지원하는 모든 API의 목록입니다. 각 디렉터리 항목에는 이름, 기능에 대한 간단한 설명, 문서 링크 등 지원되는 API에 대한 세부정보가 표시됩니다. API에는 지원되는 버전마다 하나씩 여러 개의 디렉터리 항목이 있을 수 있습니다.
탐색 문서: 특정 API에 대한 머신에서 읽을 수 있는 설명입니다.
탐색 문서에서는 API의 특정 버전에 대한 노출 영역을 설명합니다. 이 문서에서는 RESTful HTTP 호출을 통해 각 API의 다양한 메서드에 액세스하는 방법을 자세히 설명합니다. 탐색 문서에는 API와 관련된 데이터 및 메서드 설명과 사용 가능한 OAuth 범위에 대한 정보, 스키마, 메서드, 매개변수, 사용 가능한 매개변수 값에 대한 설명이 포함되어 있습니다.
데이터 모델
리소스는 고유 식별자를 갖는 개별 데이터 항목입니다. Google API 탐색 서비스는 위의 개념을 기반으로 두 가지 유형의 리소스를 기반으로 작동합니다.
API 디렉터리 목록: API 목록
각 디렉터리 항목에는 다음 정보가 있는 API 이름/버전 쌍이 포함됩니다.
식별 및 설명 정보: 이름, 버전, 제목, 설명
문서 정보: 아이콘 및 문서 링크
상태 정보: 상태 라벨 및 선호하는 API 버전인지 여부를 표시
탐색 문서 링크: API에 대한 탐색 문서의 URI(전체 URL로 제공됨. 예: https://serviceusage.googleapis.com/$discovery/rest?version=v1)
탐색 문서 리소스: 특정 API에 대한 머신에서 읽을 수 있는 설명
탐색 문서에는 API 디렉터리에 제공되는 정보 외에도 다음 항목이 포함됩니다.
스키마: 각 API에서 액세스할 수 있는 데이터를 설명하는 API 리소스 스키마 목록입니다. Google API 탐색 서비스 스키마는 JSON 스키마를 기반으로 합니다.
메서드: API 메서드 목록과 각 메서드에 사용 가능한 매개변수 목록이 포함됩니다.
OAuth 범위: 이 API에 사용할 수 있는 OAuth 범위 목록을 식별합니다.
인라인 문서: 스키마, 메서드, 매개변수, 사용 가능한 매개변수 값에 대한 간략한 설명을 제공합니다.
단일 디렉터리 컬렉션은 단일 API 디렉터리 리소스의 개념 컨테이너이며 지원되는 각 API에 대한 탐색 문서 리소스입니다.
작업
다음 표에 설명된 대로 Google API 탐색 서비스의 컬렉션 및 리소스에 대해 두 가지 메서드를 호출할 수 있습니다.
작업
설명
REST HTTP 매핑
list
지원되는 모든 API를 나열합니다.
디렉터리 리소스 URI에 대한 GET 권한입니다.
호출 스타일
REST
지원되는 Google API 탐색 서비스 작업은 작업의 설명대로 REST HTTP GET 동사에 직접 매핑됩니다.
Google API 탐색 서비스 URI의 구체적인 형식은 다음과 같습니다.
https://API/$discovery/rest?version=VERSION
여기서 API는 탐색 문서 리소스의 식별자이고, VERSION은 API의 특정 버전의 식별자입니다.
다음은 Google API 탐색 서비스의 작동 방식에 대한 몇 가지 예시입니다.
모든 Google API 탐색 서비스 지원 API를 나열합니다.
GET https://discovery.googleapis.com/discovery/v1/apis
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eThe Google Discovery API provides machine-readable metadata ("Discovery documents") for various Google APIs, aiding developers in building client libraries and tools.\u003c/p\u003e\n"],["\u003cp\u003eThe service relies on an APIs Directory, listing available APIs, and Discovery documents detailing each API's structure, methods, and schemas.\u003c/p\u003e\n"],["\u003cp\u003eDiscovery documents employ JSON Schema to describe data structures and offer inline documentation for better understanding.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the APIs Directory or a specific API's Discovery document through simple RESTful HTTP GET requests.\u003c/p\u003e\n"],["\u003cp\u003eThe service is publicly accessible for general API discovery, though private APIs may require authentication.\u003c/p\u003e\n"]]],[],null,["# Overview of the Discovery API\n\nThe Discovery API provides a list of Google APIs for retrieving a machine-readable \"Discovery\ndocument\" metadata for each API.\n\n\nThis document is intended for developers who want to write client libraries, IDE plugins, and\nother tools for interacting with Google APIs.\n\nDiscovery Service Background\n----------------------------\n\n### Concepts\n\nThe Google APIs Discovery Service is built upon two basic concepts:\n\n- **APIs Directory** : A list of all APIs that are supported by the APIs Discovery Service. Each directory entry shows details about a supported API, including its *name* , a brief *description* of what it does, and a *documentation\n link*. An API can have multiple Directory entries, one for each of its supported versions.\n- **Discovery document**: A machine-readable description of a particular API. The Discovery document describes the surface for a particular version of an API. The document provides details on how to access the various methods of each API via RESTful HTTP calls. A Discovery document includes descriptions of the data and methods associated with the API, as well as information about available OAuth scopes, and descriptions of schemas, methods, parameters and available parameter values.\n\n### Data model\n\n\nA resource is an individual data entity with a unique identifier. The Google APIs Discovery Service operates on\ntwo types of resources, based on the above concepts.\n\n#### APIs Directory List: A list of APIs\n\n\nEach directory entry contains an API **name** /**version** pair with the\nfollowing information:\n\n- **Identification and description information,**: name, version, title, and description.\n- **Documentation information**: icons and a documentation link.\n- **Status information**, including status labels, and an indication as to whether or not this is the preferred version of the API.\n- **Discovery document link** , the URI of the discovery document for this API (given as a full URL---for example, `https://serviceusage.googleapis.com/$discovery/rest?version=v1`).\n\n#### Discovery Document resource: A machine-readable description of a particular API\n\n\nIn addition to the information provided in the APIs Directory, a Discovery document also\nincludes:\n\n- **Schemas** , which is a list of API resource schemas that describe the data you have access to in each API; the Google APIs Discovery Service schemas are based on [JSON Schema](https://json-schema.org/).\n- **Methods**, including a list of API methods and available parameters for each method.\n- **OAuth scopes**, which identifies the list of OAuth scopes available for this API.\n- **Inline documentation**, which provides brief descriptions of schemas, methods, parameters and available parameter values.\n\n\nThe single Directory Collection is the conceptual container of the single APIs Directory\nresource, and the Discovery Document resources for each supported API.\n\n### Operations\n\n\nYou can invoke two different methods on collections and resources in the Google APIs Discovery Service, as\ndescribed in the following table.\n\n| Operation | Description | REST HTTP mappings |\n|-----------|---------------------------|--------------------------------------|\n| list | Lists all supported APIs. | `GET` on the Directory resource URI. |\n\nCalling style\n-------------\n\n| **Note:** Public APIs *do not* need authentication. Private APIs require an [API key](https://cloud.google.com/docs/authentication/api-keys).\n\n### REST\n\n\nThe supported Google APIs Discovery Service operations map directly to the [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer) HTTP\n`GET` verb, as described in [Operations](#background-operations).\n\nThe specific format for Google APIs Discovery Service URIs are: \n\n```\nhttps://API/$discovery/rest?version=VERSION\n```\n\n\nwhere \u003cvar translate=\"no\"\u003eAPI\u003c/var\u003e is the identifier for a Discovery Document resource, and\n\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e is the identifier of the particular version of the API.\n\nHere are a couple of examples of how this works in the Google APIs Discovery Service.\n\nList all the Google APIs Discovery Service supported APIs: \n\n```\nGET https://discovery.googleapis.com/discovery/v1/apis\n```\n\n\n[Try it now in APIs Explorer!](//developers.google.com/apis-explorer/#p/discovery/v1/discovery.apis.list)\n\nGet the Discovery document for Service Usage API, version 1: \n\n```\nGET https://serviceusage.googleapis.com/$discovery/rest?version=v1\n```"]]