Skip to main content

Use a collection resource for the Sitecore CDP REST APIs

Abstract

Provides an overview and attributes for using a collection resource in the Sitecore CDP REST APIs (Data model 2.1).

A collection resource is a resource that contains other resources. It is known as a collection resource because it is itself a first class resource. It has its own attributes similar to any other resource in addition to the instances it contains. If you want to interact with multiple resources, you must use a collection resource.

To use a collection resource, submit an HTTP GET request to the Collection Resource Uniform Resource Identifier (URI).

Collection resources also support additional behavior specific to collections, such as pagination, filtering, and sorting.

The following table describes collection resource attributes:

Attribute

Description

Type

href

The fully qualified location URI of the collection resource.

string

limit

The maximum number of collection items to return for a single request. Minimum value is 1. The maximum value is 100. The default value is 10. This is a pagination-specific attribute.

integer

items

An array containing the current page of resources. The size of this array can be less than the requested limit, for example, if the limit in the request is greater than the maximum allowed. This also applies if the response represents the final page in the total collection and the item count of the final page is less than the limit. This is a pagination-specific attribute.

array