アセット・リソース・メタデータの取得
get
/resources/v1/metadata-catalog/aggregates/{siteName}/{assetType}/{assetId}
リソース・エンドポイントは、"application/json"を指定したリクエストの場合、リソース名、リソースのJSONスキーマへのリンク、アセット・リソース・インスタンスへのリンクなどのリソースの説明を返します。"application/schema+json"を指定したリクエストの場合、リソースのJSONスキーマが返されます。デフォルトは、"application/json"です。注意: これは、アセット・リソース・インスタンスのOPTIONSリクエストから返されるメタデータURLです。
次の表に、クライアント・リクエストをまとめます。
パス・パラメータ
| 名前 | 説明 | 形式 |
|---|---|---|
| assetId | アセットのID | 整数 int64 |
| assetType | アセット・タイプの名前 | 文字列 |
| siteName | サイトの名前 | 文字列 |
次の表に、サーバー・レスポンスをまとめます。
サポートされるメディア・タイプ
- application/json
- application/schema+json
200レスポンス
リソース・メタデータ。
例1
次の例に、cURLを使用してRESTリソースに対するGETリクエストを送信し、アセット・リソースの説明を取得する方法を示します。
curl -i -H "Accept: application/json" -X GET "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241"
例1 レスポンス・ヘッダー
次の例に、レスポンス・ヘッダーを示します。
HTTP/1.1 200 OK ETag: "bdfa9d1f82b4671b0fbd4f71e7102437cff01f43bce04b714a5590fa625376e7" Cache-Control: max-age=0 Content-Type: application/json;charset=utf-8
例1 レスポンス本文
次の例に、JSON形式のレスポンス本文のコンテンツを示します。
{
"name": "Aggregated Asset Resource",
"links": [
{
"href": "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241",
"rel": "alternate",
"templated": false,
"mediaType": "application/schema+json",
"method": "GET",
"profile": ""
},
{
"href": "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241",
"rel": "canonical",
"templated": false,
"mediaType": "application/json",
"method": "GET",
"profile": ""
},
{
"href": "http://<host>:<port>/<context>/REST/resources/v1/aggregates/avisports/AVIArticle/1328196047241",
"rel": "describes",
"templated": false,
"mediaType": "application/json",
"method": "GET",
"profile": ""
}
]
}
例2
次の例に、cURLを使用してRESTリソースに対するGETリクエストを送信し、アセット・リソースのJSONスキーマを取得する方法を示します。
curl -i -H "Accept: application/schema+json" -X GET "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241"
次の例に、レスポンス・ヘッダーを示します。
HTTP/1.1 200 OK Cache-Control: max-age=0,no-cache,no-store Content-Type: application/schema+json;charset=utf-8
次の例に、JSON形式のレスポンス本文のコンテンツを示します。
{
"$schema": "http://<host>:<port>/<context>/schema/singularResource#",
"title": "Aggregated Asset Schema",
"allOf": [
{
"$ref": "http://<host>:<port>/<context>/schema/singularResource#"
},
{
"$ref": "#/definitions/aggregatedAsset"
}
],
"definitions": {
"aggregatedAsset": {
"additionalProperties": true,
"properties": {
"start": {
"$ref": "http://<host>:<port>/<context>/schema/subSchemas#/definitions/assetId"
},
"metadata": {
"type": "object"
}
},
"patternProperties": {
".+?:[0-9]+": {
"$ref": "http://<host>:<port>/<context>/schema/subSchemas#/definitions/assetProperties"
}
},
"required": [
"start"
]
}
}
}