機械翻訳について

アイテムのリスト・コレクション

get

/content/management/api/v1.1/items/{id}/collections

指定されたアイテムのすべてのコレクションをリストします。

リクエスト

パス・パラメータ
問合せパラメータ
トップに戻る

レスポンス

サポートされているメディア・タイプ

200レスポンス

OK。
本文()
ルート・スキーマ : ItemSubResourceListCollectionId
型: object
アイテムSubResource。
ソースを表示
ネストされたスキーマ: data
型: array
ソースを表示
ネストされたスキーマ : CollectionId
型: object
CollectionId
ソースを表示

304 レスポンス

変更されていません。

400レスポンス

不正リクエスト

403レスポンス

禁止。

404レスポンス

見つかりません。

500レスポンス

内部サーバー・エラー
トップに戻る

次の例は、cURLを使用してGETリクエストを送信することによってコレクションを取得する方法を示しています。

curl -X GET -H 'Accept: application/json' 'https://host:port/content/management/api/v1.1/items/{id}/collections'

例1:

このリストには、アイテムidのすべてのコレクションが表示されます: CORE70DDEB1E83E54B6BB7BEBED43CEBC692

/content/management/api/v1.1/items/CORE70DDEB1E83E54B6BB7BEBED43CEBC692/collections

レスポンス本文

{
    "hasMore": false,
    "offset": 0,
    "count": 2,
    "limit": 2,
    "items": [{
    "id": "OB19FE8746BD86E83DA44EF1FA5ED83E361FEC1D24C4",
    "name": "collection2",
    "description": "",
    "createdBy": "marketing.user",
    "createdDate": {
      "value": "2018-12-13T10:01:17.054Z",
      "timezone": "UTC"
    },
    "updatedBy": "marketing.user",
    "updatedDate": {
      "value": "2018-12-13T10:01:17.054Z",
      "timezone": "UTC"
    },
    "links": [{
      "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections/OB19FE8746BD86E83DA44EF1FA5ED83E361FEC1D24C4",
      "rel": "self",
      "method": "GET",
      "mediaType": "application/json"
    }
    ]
    }, {
    "id": "O6912875370B2BE96EEA1AC678D08D4359DF5BC30363",
    "name": "collection1",
    "description": "",
    "createdBy": "marketing.user",
    "createdDate": {
      "value": "2018-12-10T06:58:55.935Z",
      "timezone": "UTC"
    },
    "updatedBy": "marketing.user",
    "updatedDate": {
      "value": "2018-12-10T06:58:55.935Z",
      "timezone": "UTC"
    },
    "links": [{
      "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections/O6912875370B2BE96EEA1AC678D08D4359DF5BC30363",
      "rel": "self",
      "method": "GET",
      "mediaType": "application/json"
    }
    ]
    }
    ],
    "links": [{
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?orderBy=name:desc",
    "rel": "self",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?orderBy=name:desc",
    "rel": "canonical",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/metadata-catalog/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections",
    "rel": "describedby",
    "method": "GET",
    "mediaType": "application/schema+json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?offset=0&orderBy=name:desc",
    "rel": "first",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?offset=0&orderBy=name:desc",
    "rel": "last",
    "method": "GET",
    "mediaType": "application/json"
    }
    ]
    }

例2:

このリストには、1の索引を開始する、ロールをマネージャとして持つ最初の2コレクションが、idを持つリポジトリに存在: F264EF72737B35991E381047D5B43D87656640771B3C。フィールド名で降順に並べ替えます。これには、totalResultsとチャネルなどのすべてのフィールド(レスポンス内)が含まれます。

/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?limit=1&offset=1&totalResults=true&orderBy=name:desc&fields=all&roleName=manager

レスポンス本文

{
    "hasMore": true,
    "offset": 1,
    "count": 2,
    "limit": 4,
    "totalResults": 4,
    "items": [{
    "id": "O8BDF919B2A16305DC4FE1E5059C53173092B7A2B7A6",
    "repository": {
      "id": "F264EF72737B35991E381047D5B43D87656640771B3C",
      "name": "repository4",
      "role": "manager"
    },
    "name": "collection3",
    "description": "",
    "createdBy": "marketing.user",
    "createdDate": {
      "value": "2018-12-13T10:31:24.892Z",
      "timezone": "UTC"
    },
    "updatedBy": "marketing.user",
    "updatedDate": {
      "value": "2018-12-13T10:31:24.892Z",
      "timezone": "UTC"
    },
    "channels": [],
    "links": [{
      "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections/O8BDF919B2A16305DC4FE1E5059C53173092B7A2B7A6",
      "rel": "self",
      "method": "GET",
      "mediaType": "application/json"
    }
    ]
    }, {
    "id": "OB19FE8746BD86E83DA44EF1FA5ED83E361FEC1D24C4",
    "repository": {
      "id": "F264EF72737B35991E381047D5B43D87656640771B3C",
      "name": "repository4",
      "role": "manager"
    },
    "name": "collection2",
    "description": "",
    "createdBy": "marketing.user",
    "createdDate": {
      "value": "2018-12-13T10:01:17.054Z",
      "timezone": "UTC"
    },
    "updatedBy": "marketing.user",
    "updatedDate": {
      "value": "2018-12-13T10:01:17.054Z",
      "timezone": "UTC"
    },
    "channels": [],
    "links": [{
      "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections/OB19FE8746BD86E83DA44EF1FA5ED83E361FEC1D24C4",
      "rel": "self",
      "method": "GET",
      "mediaType": "application/json"
    }
    ]
    }
    ],
    "links": [{
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?totalResults=true&offset=1&limit=2&roleName=manager&orderBy=name:desc&fields=all",
    "rel": "self",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?totalResults=true&offset=1&limit=2&roleName=manager&orderBy=name:desc&fields=all",
    "rel": "canonical",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/metadata-catalog/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections",
    "rel": "describedby",
    "method": "GET",
    "mediaType": "application/schema+json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?totalResults=true&offset=0&limit=2&roleName=manager&orderBy=name:desc&fields=all",
    "rel": "prev",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?totalResults=true&offset=3&limit=2&roleName=manager&orderBy=name:desc&fields=all",
    "rel": "next",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?totalResults=true&offset=0&limit=2&roleName=manager&orderBy=name:desc&fields=all",
    "rel": "first",
    "method": "GET",
    "mediaType": "application/json"
    }, {
    "href": "https://host:port/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?totalResults=true&offset=3&limit=2&roleName=manager&orderBy=name:desc&fields=all",
    "rel": "last",
    "method": "GET",
    "mediaType": "application/json"
    }
    ]
    }
    }
先頭に戻る