Discovery Document

Discovery documents are available for specific versions of most APIs. Each API's Discovery Document describes the surface of the API, how to access the API and how API requests and responses are structured. The information provided by the discovery document includes API-level properties such as an API description, resource schemas, authentication scopes, and methods.

Methods

The Discovery document focuses on the RESTful method of invoking an API. The discovery.apis.list method returns the list of all APIs supported by the Google APIs Discovery Service including the urls for retrieving the REST-based discovery documents.

list
Retrieve the list of APIs supported at this endpoint.

Resource Representations

{
  "kind": "discovery#restDescription",
  "discoveryVersion": "v1",
  "id": string,
  "name": string,
  "canonicalName": string,
  "version": string,
  "revision": string,
  "title": string,
  "description": string,
  "icons": {
    "x16": string,
    "x32": string
  },
  "documentationLink": string,
  "labels": [
    string
  ],
  "protocol": "rest",
  "baseUrl": string,
  "basePath": string,
  "rootUrl": string,
  "servicePath": string,
  "batchPath": "batch",
  "endpoints": [
    {
      "endpointUrl": string,
      "location": string,
      "deprecated": boolean,
      "description": string
    }
  ],
  "parameters": {
    (key): {
      "id": string,
      "type": string,
      "$ref": string,
      "description": string,
      "default": string,
      "required": boolean,
      "format": string,
      "pattern": string,
      "minimum": string,
      "maximum": string,
      "enum": [
        string
      ],
      "enumDescriptions": [
        string
      ],
      "repeated": boolean,
      "location": string,
      "properties": {
        (key): (JsonSchema)
      },
      "additionalProperties": (JsonSchema),
      "items": (JsonSchema),
      "annotations": {
        "required": [
          string
        ]
      }
    }
  },
  "auth": {
    "oauth2": {
      "scopes": {
        (key): {
          "description": string
        }
      }
    }
  },
  "features": [
    string
  ],
  "schemas": {
    (key): {
      "id": string,
      "type": string,
      "$ref": string,
      "description": string,
      "default": string,
      "required": boolean,
      "deprecated": boolean,
      "format": string,
      "pattern": string,
      "minimum": string,
      "maximum": string,
      "enum": [
        string
      ],
      "enumDescriptions": [
        string
      ],
      "enumDeprecated": [
        boolean
      ],
      "repeated": boolean,
      "location": string,
      "properties": {
        (key): (JsonSchema)
      },
      "additionalProperties": (JsonSchema),
      "items": (JsonSchema),
      "annotations": {
        "required": [
          string
        ]
      }
    }
  },
  "methods": {
    (key): {
      "id": string,
      "path": string,
      "httpMethod": string,
      "description": string,
      "deprecated": boolean,
      "parameters": {
        (key): {
          "id": string,
          "type": string,
          "$ref": string,
          "description": string,
          "default": string,
          "required": boolean,
          "deprecated": boolean,
          "format": string,
          "pattern": string,
          "minimum": string,
          "maximum": string,
          "enum": [
            string
          ],
          "enumDescriptions": [
            string
          ],
          "enumDeprecated": [
            boolean
          ],
          "repeated": boolean,
          "location": string,
          "properties": {
            (key): (JsonSchema)
          },
          "additionalProperties": (JsonSchema),
          "items": (JsonSchema),
          "annotations": {
            "required": [
              string
            ]
          }
        }
      },
      "parameterOrder": [
        string
      ],
      "request": {
        "$ref": string
      },
      "response": {
        "$ref": string
      },
      "scopes": [
        (value)
      ],
      "supportsMediaDownload": boolean,
      "supportsMediaUpload": boolean,
      "mediaUpload": {
        "accept": [
          string
        ],
        "maxSize": string,
        "protocols": {
          "simple": {
            "multipart": true,
            "path": string
          },
          "resumable": {
            "multipart": true,
            "path": string
          }
        }
      },
      "supportsSubscription": boolean
    }
  },
  "resources": {
    (key): {
      "methods": {
        (key): {
          "id": string,
          "path": string,
          "httpMethod": string,
          "description": string,
          "deprecated": boolean,
          "parameters": {
            (key): {
              "id": string,
              "type": string,
              "$ref": string,
              "description": string,
              "default": string,
              "required": boolean,
              "deprecated": boolean,
              "format": string,
              "pattern": string,
              "minimum": string,
              "maximum": string,
              "enum": [
                string
              ],
              "enumDescriptions": [
                string
              ],
              "enumDeprecated": [
                boolean
              ],
              "repeated": boolean,
              "location": string,
              "properties": {
                (key): (JsonSchema)
              },
              "additionalProperties": (JsonSchema),
              "items": (JsonSchema),
              "annotations": {
                "required": [
                  string
                ]
              }
            }
          },
          "parameterOrder": [
            string
          ],
          "request": {
            "$ref": string
          },
          "response": {
            "$ref": string
          },
          "scopes": [
            (value)
          ],
          "supportsMediaDownload": boolean,
          "supportsMediaUpload": boolean,
          "mediaUpload": {
            "accept": [
              string
            ],
            "maxSize": string,
            "protocols": {
              "simple": {
                "multipart": true,
                "path": string
              },
              "resumable": {
                "multipart": true,
                "path": string
              }
            }
          },
          "supportsSubscription": boolean
        }
      },
      "deprecated": boolean,
      "resources": {
        (key): (RestResource)
      }
    }
  }
}
Property NameValueDescription
kindstringThe kind for this response. The fixed string discovery#restDescription.
discoveryVersionstringIndicate the version of the Discovery API used to generate this doc.
idstringThe ID of the Discovery document for the API. For example, urlshortener:v1.
namestringThe name of the API. For example, urlshortener.
canonicalNamestringThe canonical name of the API. For example, Url Shortener.
versionstringThe version of the API. For example, v1.
revisionstringThe revision of the API.
titlestringThe title of the API. For example, "Google Url Shortener API".
descriptionstringThe description of this API.
iconsobjectLinks to 16x16 and 32x32 icons representing the API.
icons.x16stringThe URL of the 16x16 icon.
icons.x32stringThe URL of the 32x32 icon.
labels[]listLabels for the status of this API. Valid values include limited_availability or deprecated.
protocolstringThe protocol described by the document. For example, REST.
rootUrlstringThe root url under which all API services live.
endpoints[]listA list of location-based endpoint objects for this API. Each object contains the endpoint URL, location, description and deprecation status.
endpoints[].endpointUrlstringThe URL of the endpoint target host.
endpoints[].locationstringThe location of the endpoint.
endpoints[].descriptionstringA string describing the host designated by the URL.
endpoints[].deprecatedbooleanWhether this endpoint is deprecated.
parametersobjectCommon parameters that apply across all apis.
parameters.(key)nested objectDescription of a single parameter.
parameters.(key).idstringUnique identifier for this schema.
parameters.(key).typestringThe value type for this schema. A list of values can be found at the "type" section in the JSON Schema.
parameters.(key).$refstringA reference to another schema. The value of this property is the ID of another schema.
parameters.(key).descriptionstringA description of this object.
parameters.(key).defaultstringThe default value of this property (if one exists).
parameters.(key).requiredbooleanWhether the parameter is required.
parameters.(key).formatstringAn additional regular expression or key that helps constrain the value. For more details, see the type and format summary.
parameters.(key).patternstringThe regular expression this parameter must conform to.
parameters.(key).minimumstringThe minimum value of this parameter.
parameters.(key).maximumstringThe maximum value of this parameter.
parameters.(key).enum[]listValues this parameter may take (if it is an enum).
parameters.(key).enumDescriptions[]listThe descriptions for the enums. Each position maps to the corresponding value in the enum array.
parameters.(key).repeatedbooleanWhether this parameter may appear multiple times.
parameters.(key).locationstringWhether this parameter goes in the query or the path for REST requests.
parameters.(key).propertiesobjectIf this is a schema for an object, list the schema for each property of this object.
parameters.(key).properties.(key)nested objectA single property of this object. The value is itself a JSON Schema object describing this property.
parameters.(key).additionalPropertiesnested objectIf this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.
parameters.(key).itemsnested objectIf this is a schema for an array, this property is the schema for each element in the array.
parameters.(key).annotationsobjectAdditional information about this property.
parameters.(key).annotations.required[]listA list of methods that require this property on requests.
authobjectAuthentication information.
auth.oauth2objectOAuth 2.0 authentication information.
auth.oauth2.scopesobjectAvailable OAuth 2.0 scopes.
auth.oauth2.scopes.(key)objectThe scope value.
auth.oauth2.scopes.(key).descriptionstringDescription of scope.
features[]listA list of supported features for this API.
schemasobjectThe schemas for this API.
schemas.(key)nested objectAn individual schema description.
schemas.(key).idstringUnique identifier for this schema. Example: URL
schemas.(key).typestringThe value type for this schema. A list of values can be found at the "type" section in the JSON Schema.
schemas.(key).$refstringA reference to another schema. The value of this property is the ID of another schema.
schemas.(key).descriptionstringA description of this object.
schemas.(key).defaultstringThe default value of this property (if one exists).
schemas.(key).requiredbooleanWhether the parameter is required.
schemas.(key).deprecatedbooleanWhether this schema is deprecated.
schemas.(key).formatstringAn additional regular expression or key that helps constrain the value. For more details, see the type and format summary.
schemas.(key).patternstringThe regular expression this parameter must conform to.
schemas.(key).minimumstringThe minimum value of this parameter.
schemas.(key).maximumstringThe maximum value of this parameter.
schemas.(key).enum[]listValues this parameter may take (if it is an enum).
schemas.(key).enumDescriptions[]listThe descriptions for the enums. Each position maps to the corresponding value in the enum array.
schemas.(key).enumDeprecated[]listThe deprecation status for the enums. Each position maps to the corresponding value in the enum array.
schemas.(key).repeatedbooleanWhether this parameter may appear multiple times.
schemas.(key).locationstringWhether this parameter goes in the query or the path for REST requests.
schemas.(key).propertiesobjectIf this is a schema for an object, list the schema for each property of this object.
schemas.(key).properties.(key)nested objectA single property of this object. The value is itself a JSON Schema object describing this property.
schemas.(key).additionalPropertiesnested objectIf this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.
schemas.(key).itemsnested objectIf this is a schema for an array, this property is the schema for each element in the array.
schemas.(key).annotationsobjectAdditional information about this property.
schemas.(key).annotations.required[]listA list of methods that require this property on requests.
methodsobjectAPI-level methods for this API.
methods.(key)nested objectAn individual method description.
methods.(key).idstringA unique ID for this method. This property can be used to match methods between different versions of Discovery.
methods.(key).descriptionstringDescription of this method.
methods.(key).deprecatedbooleanWhether this method is deprecated.
methods.(key).parametersobjectDetails for all parameters in this method.
methods.(key).parameters.(key)nested objectDetails for a single parameter in this method.
methods.(key).parameters.(key).idstringUnique identifier for this schema.
methods.(key).parameters.(key).typestringThe value type for this schema.   A list of values can be found at the "type" section in the JSON Schema.
methods.(key).parameters.(key).$refstringA reference to another schema. The value of this property is the ID of another schema.
methods.(key).parameters.(key).descriptionstringA description of this object.
methods.(key).parameters.(key).defaultstringThe default value of this property (if one exists).
methods.(key).parameters.(key).requiredbooleanWhether the parameter is required.
methods.(key).parameters.(key).deprecatedbooleanWhether the parameter is deprecated.
methods.(key).parameters.(key).formatstringAn additional regular expression or key that helps constrain the value. For more details, see the type and format summary.
methods.(key).parameters.(key).patternstringThe regular expression this parameter must conform to.
methods.(key).parameters.(key).minimumstringThe minimum value of this parameter.
methods.(key).parameters.(key).maximumstringThe maximum value of this parameter.
methods.(key).parameters.(key).enum[]listValues this parameter may take (if it is an enum).
methods.(key).parameters.(key).enumDescriptions[]listThe descriptions for the enums. Each position maps to the corresponding value in the enum array.
methods.(key).parameters.(key).enumDeprecated[]listThe deprecation status for the enums. Each position maps to the corresponding value in the enum array.
methods.(key).parameters.(key).repeatedbooleanWhether this parameter may appear multiple times.
methods.(key).parameters.(key).locationstringWhether this parameter goes in the query or the path for REST requests.
methods.(key).parameters.(key).propertiesobjectIf this is a schema for an object, list the schema for each property of this object.
methods.(key).parameters.(key).properties.(key)nested objectA single property of this object. The value is itself a JSON Schema object describing this property.
methods.(key).parameters.(key).additionalPropertiesnested objectIf this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.
methods.(key).parameters.(key).itemsnested objectIf this is a schema for an array, this property is the schema for each element in the array.
methods.(key).parameters.(key).annotationsobjectAdditional information about this property.
methods.(key).parameters.(key).annotations.required[]listA list of methods for which this property is required on requests.
methods.(key).parameterOrder[]listOrdered list of required parameters. This serves as a hint to clients on how to structure their method signatures. The array is ordered such that the most significant parameter appears first.
methods.(key).scopes[]listOAuth 2.0 scopes applicable to this method.
methods.(key).supportsMediaDownloadbooleanWhether this method supports media downloads.
methods.(key).supportsMediaUploadbooleanWhether this method supports media uploads.
methods.(key).mediaUploadobjectMedia upload parameters.
methods.(key).mediaUpload.accept[]listMIME Media Ranges for acceptable media uploads to this method.
methods.(key).mediaUpload.maxSizestringMaximum size of a media upload, such as "1MB", "2GB" or "3TB".
methods.(key).supportsSubscriptionbooleanWhether this method supports subscriptions.
baseUrlstring[DEPRECATED] The base URL for REST requests.
basePathstring[DEPRECATED] The base path for REST requests.
servicePathstringThe base path for all REST requests.
batchPathstringThe path for REST batch requests.
methods.(key).pathstringThe URI path of this REST method. Should be used in conjunction with the servicePath property at the API-level.
methods.(key).httpMethodstringHTTP method used by this method.
methods.(key).requestobjectThe schema for the request.
methods.(key).request.$refstringSchema ID for the request schema.
methods.(key).request.parameterNamestring[DEPRECATED] Some APIs have this field for backward-compatibility reasons. It can be safely ignored.
methods.(key).responseobjectThe schema for the response.
methods.(key).response.$refstringSchema ID for the response schema.
methods.(key).mediaUpload.protocolsobjectSupported upload protocols.
methods.(key).mediaUpload.protocols.simpleobjectSupports uploading as a single HTTP request.
methods.(key).mediaUpload.protocols.simple.multipartbooleanTrue if this endpoint supports upload multipart media.
methods.(key).mediaUpload.protocols.simple.pathstringThe URI path to be used for upload. Should be used in conjunction with the rootURL property at the api-level.
methods.(key).mediaUpload.protocols.resumableobjectSupports the Resumable Media Upload protocol.
methods.(key).mediaUpload.protocols.resumable.multipartbooleantrue if this endpoint supports uploading multipart media.
methods.(key).mediaUpload.protocols.resumable.pathstringThe URI path to be used for upload. Should be used in conjunction with the rootURL property at the API-level.
resourcesobjectThe resources in this API.
resources.(key)nested objectAn individual resource description. Contains methods and sub-resources related to this resource.
resources.(key).methodsobjectMethods on this resource.
resources.(key).methods.(key)nested objectDescription for any methods on this resource.
resources.(key).methods.(key).idstringA unique ID for this method. This property can be used to match methods between different versions of Discovery.
resources.(key).methods.(key).pathstringThe URI path of this REST method. Should be used in conjunction with the servicePath property at the API-level.
resources.(key).methods.(key).flatPathstringThe URI path of this REST method in (RFC 6570) format without level 2 features ({+var}). Supplementary to the path property.
resources.(key).methods.(key).httpMethodstringHTTP method used by this method.
resources.(key).methods.(key).descriptionstringDescription of this method.
resources.(key).methods.(key).deprecatedbooleanWhether this method is deprecated.
resources.(key).methods.(key).parametersobjectDetails for all parameters in this method.
resources.(key).methods.(key).parameters.(key)nested objectDetails for a single parameter in this method.
resources.(key).methods.(key).parameters.(key).idstringUnique identifier for this schema.
resources.(key).methods.(key).parameters.(key).typestringThe value type for this schema.  A list of values can be found at the "type" section in the JSON Schema.
resources.(key).methods.(key).parameters.(key).$refstringA reference to another schema. The value of this property is the "ID" of another schema.
resources.(key).methods.(key).parameters.(key).descriptionstringA description of this object.
resources.(key).methods.(key).parameters.(key).defaultstringThe default value of this property (if one exists).
resources.(key).methods.(key).parameters.(key).requiredbooleanWhether the parameter is required.
resources.(key).methods.(key).parameters.(key).deprecatedbooleanWhether the parameter is deprecated.
resources.(key).methods.(key).parameters.(key).formatstringAn additional regular expression or key that helps constrain the value. For more details, see the type and format summary.
resources.(key).methods.(key).parameters.(key).patternstringThe regular expression this parameter must conform to.
resources.(key).methods.(key).parameters.(key).minimumstringThe minimum value of this parameter.
resources.(key).methods.(key).parameters.(key).maximumstringThe maximum value of this parameter.
resources.(key).methods.(key).parameters.(key).enum[]listValues this parameter may take (if it is an enum).
resources.(key).methods.(key).parameters.(key).enumDescriptions[]listThe descriptions for the enums. Each position maps to the corresponding value in the enum array.
resources.(key).methods.(key).parameters.(key).enumDeprecated[]listThe deprecation status for the enums. Each position maps to the corresponding value in the enum array.
resources.(key).methods.(key).parameters.(key).repeatedbooleanWhether this parameter may appear multiple times.
resources.(key).methods.(key).parameters.(key).locationstringWhether this parameter goes in the query or the path for REST requests.
resources.(key).methods.(key).parameters.(key).propertiesobjectIf this is a schema for an object, list the schema for each property of this object.
resources.(key).methods.(key).parameters.(key).properties.(key)nested objectA single property of this object. The value is itself a JSON Schema object describing this property.
resources.(key).methods.(key).parameters.(key).additionalPropertiesnested objectIf this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.
resources.(key).methods.(key).parameters.(key).itemsnested objectIf this is a schema for an array, this property is the schema for each element in the array.
resources.(key).methods.(key).parameters.(key).annotationsobjectAdditional information about this property.
resources.(key).methods.(key).parameters.(key).annotations.required[]listA list of methods that require this property on requests.
resources.(key).methods.(key).parameterOrder[]listOrdered list of required parameters. This serves as a hint to clients on how to structure their method signatures. The array is ordered such that the most significant parameter appears first.
resources.(key).methods.(key).requestobjectThe schema for the request.
resources.(key).methods.(key).request.$refstringSchema ID for the request schema.
resources.(key).methods.(key).responseobjectThe schema for the response.
resources.(key).methods.(key).response.$refstringSchema ID for the response schema.
resources.(key).methods.(key).scopes[]listOAuth 2.0 scopes applicable to this method.
resources.(key).methods.(key).supportsMediaDownloadbooleanWhether this method supports media downloads.
resources.(key).methods.(key).supportsMediaUploadbooleanWhether this method supports media uploads.
resources.(key).methods.(key).mediaUploadobjectMedia upload parameters.
resources.(key).methods.(key).mediaUpload.accept[]listMIME Media Ranges for acceptable media uploads to this method.
resources.(key).methods.(key).mediaUpload.maxSizestringMaximum size of a media upload, such as "1MB", "2GB" or "3TB".
resources.(key).methods.(key).mediaUpload.protocolsobjectSupported upload protocols.
resources.(key).methods.(key).mediaUpload.protocols.simpleobjectSupports uploading as a single HTTP request.
resources.(key).methods.(key).mediaUpload.protocols.simple.multipartbooleantrue if this endpoint supports upload multipart media.
resources.(key).methods.(key).mediaUpload.protocols.simple.pathstringThe URI path to be used for upload. Should be used in conjunction with the rootURL property at the API-level.
resources.(key).methods.(key).mediaUpload.protocols.resumableobjectSupports the Resumable Media Upload protocol.
resources.(key).methods.(key).mediaUpload.protocols.resumable.multipartbooleantrue if this endpoint supports uploading multipart media.
resources.(key).methods.(key).mediaUpload.protocols.resumable.pathstringThe URI path to be used for upload. Should be used in conjunction with the rootURL property at the API-level.
resources.(key).methods.(key).supportsSubscriptionbooleanWhether this method supports subscriptions.
resources.(key).deprecatedbooleanWhether this resource is deprecated.
resources.(key).resourcesobjectSub-resources on this resource.
resources.(key).resources.(key)nested objectDescription for any sub-resources on this resource.