|
API Versions
Returns API versions and access
modes (for example, live, preview and/or sandbox)
for your account.
Request
- x-api-key. Specifies the API
key to authorize the request. The x-apikey
header is also currently supported.
Optional Request Header
- Accept-Encoding. Compresses the
response to the gzip format. The valid value is gzip.
Request URI
- Method: GET
- Request URI (must be URL-encoded):
https://api.ap.org/media/v/versions
Response
The API Versions method returns the standard HTTP status code of "200
- OK" and the API versions and modes for the specified API key in
the JSON format.
For information about error codes, see API Codes.
Top-Level Properties
- api_version. The API version.
- id. The response ID.
- method. The API method name and
HTTP method.
- params. Parameters used in the
API request.
- data. Contains the data and metadata
associated with the response.
Response Descriptive Properties
- id. The API versions URL.
- title. The response name.
- updated. The date and time (in
W3C XML Schema's xs:dateTime format) when the response was generated.
- versions. Contains the information
about the API versions available for your account. For each version,
the following properties are returned:
- version. The API version
number.
- modes. The API mode(s) available
for this API version; for example, live, preview
and/or sandbox.
- description. The API version
description.
- published. The date when
the API version was released.
- documentation. The link to
the API documentation for this version.
- explore. The link to the
API Explorer for this version.
- search_links. Search URLs
for each available mode of this version.
- quota_links. Links to quotas
for each available mode of this version.
- default. Indicates that this
API version is set as default for your account (the live
mode of this version is returned when no specific version is specified
in the request).
Sample Response
{
"api_version": "gateway-1.0",
"api_mode": "live",
"id": "0710180912a425Z18a83",
"method": "versions.get",
"params": {},
"data": {
"id": "/versions",
"title": "AP Media API Versions",
"updated": "2020-07-02T18:09:12.436Z",
"versions": [
{
"version": "v2.0",
"default": true,
"modes": [
"live"
],
"description": "Media API 2.0",
"published": "2020-04-08",
"documentation": "https://api.ap.org/media/v2.0/docs",
"explore": "https://api.ap.org/media/v2.0/swagger/",
"search_links": {
"live": "https://api.ap.org/media/v2.0-live/content/search/"
},
"quota_links": {
"live": "https://api.ap.org/media/v2.0-live/account/quotas/"
}
},
{
"version": "v1.1",
"default": false,
"modes": [
"live",
"sandbox",
"preview"
],
"description": "Media API 1.1",
"published": "2019-02-18",
"documentation": "https://api.ap.org/media/v1.1/docs",
"explore": "https://api.ap.org/media/v1.1/swagger/",
"search_links": {
"live": "https://api.ap.org/media/v1.1-live/content/search/",
"sandbox": "https://api.ap.org/media/v1.1-sandbox/content/search/",
"preview": "https://api.ap.org/media/v1.1-preview/content/search/"
},
"quota_links": {
"live": "https://api.ap.org/media/v1.1-live/account/quotas/",
"sandbox": "https://api.ap.org/media/v1.1-sandbox/account/quotas/",
"preview": "https://api.ap.org/media/v1.1-preview/account/quotas/"
}
}
]
}
}
|
|