List All Collections in a Repository

get

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

List all collections in a repository.

Request

Path Parameters
Query Parameters
  • This parameter is used to control the returned fields in each collection in the list. This parameter accepts a comma-separated list of field names or all. These fields will be returned for each collection in the list. All the field names are case-sensitive,and users must provide the correct field names in the query. Each collection has both standard fields (id, name, description, createdBy, createdDate, updatedBy, updatedDate) and additional fields (repository, channels). When fields is specified as all (case-insensitive), all the standard and additional fields are returned. The standard fields are always returned in the response and cannot be filtered out. The user can filter out only the additional fields. This parameter is optional in the query, and by default the result shows only standard fields in the response. Any incorrect or invalid field name given in the query will throw an error.

    Example: ?fields=channels
    This returns all standard fields along with the channels additional fields for each collection.
    Example: ?fields=all
    This will return all standard fields and all additional fields for each collection.
  • This parameter accepts a non negative integer and is used to control the size of the result.
    Default Value: 100
  • This parameter accepts a non negative integer and is used to control the start index of the result.
    Default Value: 0
  • This parameter is used to control the order of results. The value of this query parameter follows the format of fieldName:[asc/desc]. asc stands for ascending order desc stands for descending order, and the default order is asc. The only field names allowed are name and updatedDate.
    Default Value: name:asc
  • This parameter accepts a query expression condition that matches the field values. The value of query condition follows the format of {fieldName} {operator} "{fieldValue}". The only fieldNames allowed for now are roleName, repositoryId and name and only allowed operators for now are mt on name and eq on the others. This query param is optional and defaults to roleName eq "viewer" which filters the resources with at least given role.
    Example:
    ?q=(roleName eq "manager")
    Default Value: roleName eq "viewer"
  • This parameter is used to filter the returned collections with the given role name.
    Default Value: viewer
    Allowed Values: [ "viewer", "contributor", "manager" ]
  • This parameter accepts a boolean flag. If specified as true, then the returned result must include the total result count.
    Default Value: false
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Collections
Type: object
Collections
Show Source
Nested Schema : aggregationResults
Type: array
Aggregation results.
Show Source
Nested Schema : items
Type: array
Singular resources contained in the collection.
Show Source
Nested Schema : pinned
Type: array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : AggregationResult
Type: object
Show Source
Nested Schema : Collection
Type: object
Collection
Show Source
Nested Schema : channels
Type: array
Channels associated with the collection.
Show Source
Nested Schema : date
Type: object
date
Show Source
Nested Schema : RepositoryIdentifier
Type: object
RepositoryIdentifier
Show Source
Nested Schema : ruleGroups
Type: array
Show Source
Nested Schema : ChannelInCollections
Type: object
ChannelInCollections
Show Source
Nested Schema : RuleGroup
Type: object
rule group definition
Show Source
Nested Schema : ruleSet
Type: array
set of rules associated with the rule group
Show Source
Nested Schema : RuleSet
Type: object
Set of rules or conditions
Show Source
Nested Schema : Rule
Type: object
Show Source
Nested Schema : ruleSet
Type: array
The child or sub rule set associated with the given rule set
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 published Digital assets native file by submitting a GET request on the REST resource using cURL:

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

Example 1:

This lists all collections exists in a repository with id: F264EF72737B35991E381047D5B43D87656640771B3C, order by field-name name in descending order.

/content/management/api/v1.1/repositories/F264EF72737B35991E381047D5B43D87656640771B3C/collections?orderBy=name:desc

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, start 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 examples, 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