UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 5.59 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given list of public URL(s).\n","title":"Accelerated Mobile Pages (AMP) URL","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.7.18"},"format":"google","url":"https://acceleratedmobilepageurl.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-preferred":true,"x-providerName":"googleapis.com","x-serviceName":"acceleratedmobilepageurl"},"externalDocs":{"url":"https://developers.google.com/amp/cache/"},"tags":[{"name":"ampUrls"}],"paths":{"/v1/ampUrls:batchGet":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Returns AMP URL(s) and equivalent\n[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).","operationId":"acceleratedmobilepageurl.ampUrls.batchGet","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGetAmpUrlsRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchGetAmpUrlsResponse"}}}}},"tags":["ampUrls"]}}},"servers":[{"url":"https://acceleratedmobilepageurl.googleapis.com/"}],"components":{"parameters":{"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"type":"string","enum":["json","media","proto"],"default":"json"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean","default":true}},"quotaUser":{"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}},"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"type":"string","enum":["1","2"]}}},"schemas":{"AmpUrl":{"description":"AMP URL response for a requested URL.","properties":{"ampUrl":{"description":"The AMP URL pointing to the publisher's web server.","type":"string"},"cdnAmpUrl":{"description":"The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to\nthe cached document in the Google AMP Cache.","type":"string"},"originalUrl":{"description":"The original non-AMP URL.","type":"string"}},"type":"object"},"AmpUrlError":{"description":"AMP URL Error resource for a requested URL that couldn't be found.","properties":{"errorCode":{"description":"The error code of an API call.","enum":["ERROR_CODE_UNSPECIFIED","INPUT_URL_NOT_FOUND","NO_AMP_URL","APPLICATION_ERROR","URL_IS_VALID_AMP","URL_IS_INVALID_AMP"],"type":"string"},"errorMessage":{"description":"An optional descriptive error message.","type":"string"},"originalUrl":{"description":"The original non-AMP URL.","type":"string"}},"type":"object"},"BatchGetAmpUrlsRequest":{"description":"AMP URL request for a batch of URLs.","properties":{"lookupStrategy":{"description":"The lookup_strategy being requested.","enum":["FETCH_LIVE_DOC","IN_INDEX_DOC"],"type":"string"},"urls":{"description":"List of URLs to look up for the paired AMP URLs.\nThe URLs are case-sensitive. Up to 50 URLs per lookup\n(see [Usage Limits](/amp/cache/reference/limits)).","items":{"type":"string"},"type":"array"}},"type":"object"},"BatchGetAmpUrlsResponse":{"description":"Batch AMP URL response.","properties":{"ampUrls":{"description":"For each URL in BatchAmpUrlsRequest, the URL response. The response might\nnot be in the same order as URLs in the batch request.\nIf BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated\nonly once.","items":{"$ref":"#/components/schemas/AmpUrl"},"type":"array"},"urlErrors":{"description":"The errors for requested URLs that have no AMP URL.","items":{"$ref":"#/components/schemas/AmpUrlError"},"type":"array"}},"type":"object"}}}}