Get All Versions
get
/documents/api/
Get information for all versions of the API. The version resource provides information about all available versions or about a specific version of the API itself.
Request
There are no request parameters for this operation.
Response
Supported Media Types
- application/json
- application/xml
200 Response
The request was fulfilled.
Body
The response body includes information about the API versions operation.
Root Schema : VersionsResponse
The response body includes information about the API versions operation.
- links
-
Type:
arraylinksAdditional Properties Allowed:List of Versions.
Nested Schema : links
Type:
arrayList of Versions.
-
Type:
objectVersionDefinitionAdditional Properties Allowed:Version information.
Nested Schema : VersionDefinition
Version information.
- catalog
-
Type:
objectAPILinksAdditional Properties Allowed:API links information. - isLatest
-
Type:
stringIndicates whether it is the latest version (true) or not (false). - lifecycle
-
Type:
stringIndicates whether the version isactiveordeprecated. The default value isactive. - links
-
Type:
arraylinksAdditional Properties Allowed:List of Links. - terminationDate
-
Type:
stringIndicates when the version will no longer be supported. - version
-
Type:
stringVersion identifier.
Nested Schema : APILinks
API links information.
- href
-
Type:
stringComplete URL that uniquely defines the resource. - ref
-
Type:
stringRelationship.
Example application/json
{
"items":[
{
"version":"1.0",
"lifecycle":"active",
"isLatest":"false",
"catalog":{
"links":[
{
"ref":"canonical",
"href":"https://www.example.com/documents/api/1.0/metadata-catalog"
}
]
},
"links":[
{
"ref":"canonical",
"href":"https://www.example.com/documents/api/1.0"
}
]
},
{
"version":"1.1",
"lifecycle":"active",
"isLatest":"false",
"catalog":{
"links":[
{
"ref":"canonical",
"href":"https://www.example.com/documents/api/1.1/metadata-catalog"
}
]
},
"links":[
{
"ref":"canonical",
"href":"https://www.example.com/documents/api/1.1"
}
]
},
{
"version":"1.2",
"lifecycle":"active",
"isLatest":"true",
"catalog":{
"links":[
{
"ref":"canonical",
"href":"https://www.example.com/documents/api/1.2/metadata-catalog"
}
]
},
"links":[
{
"ref":"canonical",
"href":"https://www.example.com/documents/api/1.2"
}
]
}
]
}
Examples
The following example returns all currently available versions of the API.
GET .../api
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{
"items": [
{
"version": "1.0",
"lifecycle": "active",
"isLatest": false,
"catalog": {
"links": [
{
"ref": "canonical",
"href": "https://www.example.com/documents/api/1.0/metadata-catalog"
}
]
},
"links": [
{
"ref": "canonical",
"href": "https://www.example.com/documents/api/1.0"
}
]
},
{
"version": "1.1",
"lifecycle": "active",
"isLatest": false,
"catalog": {
"links": [
{
"ref": "canonical",
"href": "https://www.example.com/documents/api/1.1/metadata-catalog"
}
]
},
"links": [
{
"ref": "canonical",
"href": "https://www.example.com/documents/api/1.1"
}
]
},
{
"version" : "1.2",
"lifecycle" : "active",
"isLatest" : true,
"catalog" : {
"links" : [
{
"ref" : "canonical",
"href" : "http://www.example.com/documents/api/1.2/metadata-catalog"
}
]
},
"links" : [
{
"ref" : "canonical",
"href" : "http://www.example.com/documents/api/1.2"
}
]
}
]
}