すべてのバージョンの取得
get
/documents/api/
すべてのバージョンのAPIに関する情報を取得します。 バージョン・リソースは、使用可能なすべてのバージョン、または特定のバージョンのAPI自体に関する情報を提供します。
リクエスト
この操作のリクエスト・パラメータはありません。
トップに戻るレスポンス
サポートされるメディア・タイプ
- application/json
- application/xml
200レスポンス
リクエストが処理されました。
ルート・スキーマ: VersionsResponse
タイプ:
object
レスポンス本文には、APIバージョン操作に関する情報が含まれます。
ソースを表示
- links(optional): array links
バージョンのリスト。
ネストされたスキーマ: VersionDefinition
タイプ:
object
バージョン情報。
ソースを表示
- catalog(optional): object APILinks
APIリンク情報。
- isLatest(optional): string
最新のバージョンであるか(
true
)、そうでないか(false
)を示します。 - lifecycle(optional): string
このバージョンが
active
かdeprecated
かを示します。 デフォルト値はactive
です。 - links(optional): array links
リンクのリスト。
- terminationDate(optional): string
バージョンのサポートがいつ終了するかを示します。
- version(optional): string
バージョン識別子。
ネストされたスキーマ: APILinks
タイプ:
object
APIリンク情報。
ソースを表示
- href(optional): string
リソースを一意に定義する完全なURL。
- ref(optional): string
関係。
レスポンスの例(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"
}
]
}
]
}
例
次の例では、現在使用可能なすべてのバージョンのAPIを返します。
GET .../api
リクエスト・ヘッダー
なし。
リクエスト本文
なし。
HTTPステータス・コード
HTTP_STATUS = 200
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" : "http://www.example.com/documents/api/1.2/metadata-catalog" } ] }, "links" : [ { "ref" : "canonical", "href" : "http://www.example.com/documents/api/1.2" } ] } ] }