List Collections of an Item

get

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

Lists all collections of a given item.

Request

Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ItemSubResourceListCollectionId
Type: object
Item SubResource.
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : CollectionId
Type: object
CollectionId
Show Source

304 Response

Not modified.

400 Response

Bad request.

403 Response

Forbidden.

404 Response

Not found.

500 Response

Internal server error.
Back to Top

Examples

The following example shows how to get collections by submitting a GET request using cURL.

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

Example 1:

This lists all the collections of item id: CORE70DDEB1E83E54B6BB7BEBED43CEBC692.

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

Response Body

{
    "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"
    }
    ]
    }

Example 2:

This lists first 2 collections with starting index from 1, role as manager, exists in a repository with id: F264EF72737B35991E381047D5B43D87656640771B3C, order by field-name name in descending order, including totalResults and all fields such as channels, repositories in response.

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

Response Body

{
    "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"
    }
    ]
    }
    }
Back to Top