Preview items using search

get

/content/preview/api/v1.1/items

Use this query to filter the latest management content. You can control the number of items to be fetched, paginated, and sorted. Additionally, this resource can fetch field values of matching items.
Query expression syntax supports conditions that match the field values. You can also query across all fields for a specific phrase. Many such query conditions can be joined by using AND/OR operators and grouped with parenthesis. Below are general examples of queries.

Query expression ?q=(type eq "Employee" AND (fields.emails co "example.com" OR fields.emails co "example.org"))
Query expression usage with this resource /preview/api/v1.1/items?q=(type eq "Employee" AND (fields.emails co "example.com" OR fields.emails co "example.org"))&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51

Notes: Field names used in the query are case-sensitive.

In general two forms of filtering are supported by this resource.
  • Query within a type: Query within a type allows query conditions that apply to fields of the type.
    For example:/preview/api/v1.1/items?q=(type eq "Employee" AND fields.role eq "Senior Developer")&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
    Here, role is a field of type Employee.
    Two level deep searches (typed searches only):
    Fields on first level reference fields of an item may also be searched, effectively providing a way to delve two levels deep into an item's field hierarchy. The second level provides the same semantics as those provided during searching fields of an item. Searching recursively down an item's reference hierarchy past the first level is not supported. Sorting by second level fields is not supported.
    For example:
    /preview/api/v1.1/items?q=(type eq "Employee" AND fields.address.street eq "Main St")&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
    Here, 'address' is the name of a reference type field on type 'Employee' that in turn has a field with name 'street'.
    Note: Two level search response always returns the latest management version of the references irrespective of the field setting on the type definition.
  • Query across types: When no type is specified in the query, all types are queried. Also, multi type query is allowed and depending on how it is specified may either treated as a global query or a query across multiple types. A query that references multiple types using brackets ( ) is treated as a global query and query conditions are limited to standard fields (id, type, name, description, typeCategory, slug, translatable, language, createdBy, createdDate, updatedBy, updatedDate, repositoryId, channels, collections, status, tags, isPublished, languageIsMaster, taxonomies) only.
    For example:
    /preview/api/v1.1/items?q=(name eq "John" and (type eq "t1" or type eq "t2")) or /preview/api/v1.1/items?q=(description co "users" and (type eq "t1" or type eq "t2"))&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51 . A query that references multiple types using braces { } is treated as a generic query across types with the ability to reference standard and user defined fields.
    For example:
    /preview/api/v1.1/items?q=name eq "John" and {type eq "t1" and fields.ud1 eq "ud1val"} or {type eq "t2" and fields.ud2 eq "ud2val"}&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
    Characteristics of the brace style query across types.
    1. A cross-type search is specified by enclosing type predicates in the query (q) parameter in curly braces { }.
    2. Only one type may be specified in a matching set of braces.
    3. Nested braces are not allowed.
    4. Braces and brackets may be combined.
    5. Query predicates specified outside braces behave like they were specified using brackets.
    6. Examples -
      • {type eq "t1" and repositoryid eq "r1"}
      • {type eq "t1" and repositoryid eq "r1" and fields.ud1 eq "ud1"} - "ud1" has to be a field on type "t1". Query validation will fail if that is not the case.
      • {type eq "t1" and repositoryid eq "r1"} and {type eq "t2" and repositoryid eq "r1"} - This is a valid query but would return zero results.
      • {type eq "t1" and fields.ud1 eq "ud1"} or {type eq "t2" and fields.ud2 eq "ud2"} - "ud1" has to be a field on type "t1" and "ud2" has to be a field on type "t2"
      • {type eq "t2" and fields.ud2 eq "ud2"} or type eq "t1" and fields.ud1 eq "ud1" ??? Bracket style search that resolves to type "t1" and brace style search that resolves to type "t2" and is valid if "ud1" is a field on "t1" and "ud2" is a field on "t2".

In either form, it is possible to search by matching anywhere (any field) by specifying a default match criteria. Such a criteria is a generic query that matches values of the items across all fields.
For example:
/preview/api/v1.1/items?default="coffee"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
/preview/api/v1.1/items?q=(type eq "Employee")&default="senior"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51

In either form, while querying using standard fields, name, description, type, typeCategory, slug, language are to be considered as a text data type (single valued), id as reference data type (single valued), createdDate, updatedDate as a datetime data type (single valued) and taxonomies as a reference data type (multi valued).

OperatorExampleSupported data typesDescription
eq?q=(name eq "John")

?q=(type eq "DigitalAsset")

?q=(type eq "Employee" and fields.DOB eq "1994/09/26T16:23:45.208")

?q=(type eq "File" and fileextension eq "docx")

?q=(taxonomies.categories.id eq "B9F568DC43C54803AC76012783FA5101")

?q=(taxonomies.categories.name eq "Cars")

?q=(taxonomies.categories.apiName eq "cars-unique")

?q=(taxonomies.categories.nodes.id eq "B9F568DC43C54803AC76012783FA5101")

?q=(taxonomies.categories.nodes.name eq "red")

?q=(taxonomies.categories.nodes.apiName eq "cars")
text, reference, number, decimal, boolean, datetime.Equals operator (eq) matches the exact value supplied in the query. This operator is not applicable to multivalued data types. The value provided with this operator is not case-sensitive except for standard fields (type). This operator considers even special characters in the value.
ne?q=(name ne "John")text, reference, number, decimal, boolean, datetime.Not Equals operator (ne) matches items that do not match the exact value supplied in the query. This operator is not applicable to multivalued data types. The value provided with this operator is not case-sensitive except for standard fields. This operator considers even special characters in the value.
co?q=(type eq "Employee" AND name co "john alex")

?q=(type eq "Car" AND fields.features co "manual")

?q=(taxonomies.categories.name co "red")

?q=(taxonomies.categories.nodes.name co "cars")
text, reference, number, decimal, datetime, largetextContains operator (co) matches every word given in the criteria. The words are formed by splitting the value by special characters. It gives the results that have at least one of the words (in this example, john or alex or both). This operator does not consider special characters in the value while searching. This operator does not perform a search on stop words.

This operator is applicable to text, largetext in case of single-valued attributes, whereas for multivalued attributes, it is applicable to text, reference, number, decimal, datetime, largetext. To understand the possible datetime formats, refer to the Supported date/datetime formats (24Hrs) table below. The value provided with this operator is not case-sensitive.
nc?q=(name nc "john alex")text, reference, number, decimal, datetime, largetextNot Contains operator (nc) matches items that would not match a co operator with the same criteria.
sw?q=(type eq "Employee" AND name sw "Joh")

?q=(type eq "Employee" AND fields.city sw "Los")

?q=(taxonomies.categories.name sw "cat")

?q=(taxonomies.categories.nodes.name sw "red")
textStarts With operator (sw) matches only the initial character values given in the field condition. This operator is not applicable to multivalued data types. The value provided with this operator is not case-sensitive.
ge?q=(type eq "Employee" AND fields.age ge "40")

?q=(type eq "DigitalAsset" AND updatedDate ge "20171026")
number, decimal, datetimeGreater than or equal to operator (ge) matches only numeric and datetime values. To understand the possible datetime formats, refer to the Supported date/datetime formats (24Hrs) table below. This operator is not applicable to multivalued data types.
le?q=(type eq "Employee" AND fields.weight le "60.6")number, decimal, datetimeLess than or equal to operator (le) matches only numeric and datetime values. To understand the possible datetime formats, refer to the Supported date/datetime formats (24Hrs) table below. This operator is not applicable to multivalued data types.
gt?q=(type eq "Employee" AND fields.age gt "20")number, decimal, datetimeGreater than operator (gt) matches only numeric and datetime values. To understand the possible datetime formats, refer to the Supported date/datetime formats (24Hrs) table below. This operator is not applicable to multivalued data types.
lt?q=(type eq "Employee" AND fields.age lt "20")

?q=(type eq "Employee" AND createdDate lt "1994/09/26T16:23:45.208")
number, decimal, datetimeLesser than operator (lt) matches only numeric and datetime values. To understand the possible datetime formats, refer to the Supported date/datetime formats (24Hrs) table below. This operator is not applicable to multivalued data types.
mt?q=(type eq "Car" AND fields.review mt "petrol 20KMPL")

?q=(type eq "Employee" AND name mt "Jo?n")

?q=(type eq "Employee" AND name mt "Jo*")

?q=(type eq "Employee" AND fields.role mt "senior*")
text, largetextPhrase query or proximity search (matches) operator (mt) enables you to find words that are within a specific distance to one another. Results are sorted by best match. It is useful for searching items when values given in the criteria "petrol 20kmpl" need to discover actual content that may contain "petrol fuel mileage runs 20KMPL in the speed way".

Matches operator can use a wildcard (? or *) to match multiple characters within the given value. This operator is applicable to both single valued and multivalued data types. This operator does not perform a search on stop words. The value provided with this operator is not case-sensitive. For matching exact phrases surround search terms by double quotes. Enclosing double quotes will be treated as part of the search term in all other contexts.
sm?q=(type eq "Employee" And fields.city sm "Rome")text, largetextSimilarity query operator. This operator allows searching for values that sound like specified criteria - also called fuzzy search, which use by default maximum two edits to match result. "Rome" is similar to "Dome". This operator is applicable to both single valued and multivalued data types. The value provided with this operator is not case-sensitive.
AND?q=(type eq "Employee" AND name eq "John" AND fields.age ge "40")-NA-AND operator, can be used to put an AND condition between multiple query conditions. This takes precedence over OR.
OR?q=(type eq "Employee" AND (name eq "John" OR fields.age ge "40"))-NA-OR operator can be used to put an OR condition between multiple query conditions.
( )?q=(type eq "Employee" AND (name eq "John" AND fields.age ge "40"))

?q=(type eq "Employee" AND ((name eq "John" AND fields.age ge "40") OR fields.weight ge 60))
-NA-Parenthesis, enclosing operator to group the conditions in the criteria. This takes highest precedence, followed by AND, and then by OR.



Request Headers :
Is requiredHeader NameHeader Value
RequiredchannelToken{valid channel token value}
OptionalAcceptapplication/json

Additional Notes
Type specific queryThis query always uses only the eq operator. eq works with a case-sensitive type name. Multitype query is supported, however it will be query across types.
Example:
q=(type eq "Employee") or q=(type eq "DigitalAsset") is single type search and q=(type eq "Employee" OR type eq "Address") is multitype search and considered as query across types.
Date queryDate query is a special type of query because of various date formats associated to it. All the datetime values are in the UTC (timezone) only. So query results will always be in UTC timezone format for all datetime fields. Fields with the datatype datetime should use the operators ge, gt, le, lt for range query and use eq for an equals match.

Example:
Query Products by manufactureDate (datetime) field using the ge operator.
https://cecsdomain/content/preview/api/v1.1/items?q=(type eq "Product" AND fields.manufactureDate ge "1989-03-26")&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51. The given date format is YYYY-MM-DD.

Explore more date/datetime specific query examples in the Examples section and also to understand the accepted date/datetime formats in the section below (supported date/datetime formats).
Decimal values Decimal number query is supported up to 3 digits after decimal points, and the rest of the digits after 3 will be ignored. https://cecsdomain/content/preview/api/v1.1/items?q=(type eq "Product" AND fields.price ge 425.3214)&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51, will result in all the Product where price is greater than equals to 425.321.
Large text datatype queryFields with the datatype largetext are not stored, so the query result cannot return its value. But the field value can be used in a query condition.
Generic query searchGeneric query search is a default search query, this can be used when the user can search by only value without using any field name or operators. Internally generic search uses the co operator. This query does not support wildcard characters. This search does not perform search on stop words.
Example:
?q=(type eq "Employee")&fields=all&default=John. This will return the search results for the Employee type where the value John matches to field names , descriptions or any user-defined fields.
Example:
?q=(type eq "Article")&default=skating. This will return the search results for Article type where value skating matches to fields name, description or any user defined fields.
ID searchSearch query using ID attribute.
Example:
?q=(type eq "Employee" AND id eq "COREAF29AC6ACA9644F9836E36C7B558F316"). The value of id belongs to the item being queried itself, here id of type Employee.
It is possible to include multiple item ids in the query expression
Example:
?q=(type eq "Employee" AND (id eq "COREAF29AC6ACA9644F9836E36C7B558F316" OR id eq "COREAF29AC6ACA9644F9836E36C7B558F987")).
Category searchSearch items categorized with given category id, category name, category apiName, category node id, category node name or category node apiName attributes.
Note: Taxonomy related information in the response will not be shown until the taxonomy is published to the specified channel although filtering categorized assets using rules with promoted version of taxonomies and it's categories is allowed
Example:
?q=(taxonomies.categories.id eq "9E1A79EE600C4C4BB727FE3E39E95489")
The value of taxonomies.categories.id belongs to the category assigned to items being queried. It is possible to include multiple category ids or names in the query expression.
Example:
?q=(taxonomies.categories.name co "cars" OR taxonomies.categories.name sw "red")
Example:
?q=(taxonomies.categories.apiName eq "All-furnitures")
The value of taxonomies.categories.apiName belongs to the category assigned to items being queried. It is possible to include multiple category apiName values in the query expression.
Example:
?q=(taxonomies.categories.nodes.id eq "9E1A79EE600C4C4BB727FE3E39E95489")
The value of taxonomies.categories.nodes.id belongs to any node of categories assigned to items being queried. It is possible to include multiple category node ids or node names in the query expression.
Example:
?q=(taxonomies.categories.nodes.name co "cars" OR taxonomies.categories.nodes.name sw "red")
Example:
?q=(taxonomies.categories.nodes.apiName eq "All-furnitures" OR taxonomies.categories.nodes.apiName eq "all-accessories")
The value of taxonomies.categories.nodes.apiName belongs to any node of categories assigned to items being queried. It is possible to include multiple category node apiName values in the query expression.
Reference field searchSearch query using reference attribute.
Example:
?q=(type eq "Employee" AND fields.department eq "COREAF29AC6ACA9644F9836E36C7B558F412").
The value of department belongs to id of an item of type Department.
Query matching text in binary fileSearching in binary file text (typed searches for digital assets only). Searching in the digital assets' binary file's text is supported using metadata.extractedText parameter in the search query within a type or across specific types. Supported operators are co, nc and mt.
Example:
?q=(type eq "File" AND metadata.extractedText co "Employee")
?q=((type eq "cdt1" or type eq "cdt2") AND metadata.extractedText mt "installed")
Query matching text in any field and the binary fileSearching in the fields and binary file text (typed searches for content or digital assets). Searching in the fields and binary file's text is supported using anyField parameter in the search query within a type or across specific types. Supported operators are co, nc and mt.
Example:
?q=(type eq "contentType1" AND anyField co "Employee")
?q=({type eq "contentType1" AND anyField mt "installed"} OR {type eq "cdt1" AND anyField mt "installed"})


Supported date/datetime formats (24Hrs)
FormatExample
YYYY-MM-DD1989-03-26
YYYY/MM/DD1989/03/26
DD-MM-YYYY26-03-1989
DD/MM/YYYY26/03/1989
YYYY-MM-DD''T''hh:mm:ss1989-03-26T18:32:38
YYYY/MM/DD''T''hh:mm:ss1989/03/26T18:32:38
DD-MM-YYYY''T''hh:mm:ss26-03-1989T18:32:38
DD/MM/YYYY''T''hh:mm:ss26/03/1989T18:32:38
YYYY-MM-DD''T''hh:mm:ss.SSS1989-03-26T18:32:38.840
YYYY/MM/DD''T''hh:mm:ss.SSS1989/03/26T18:32:38.840
DD-MM-YYYY''T''hh:mm:ss.SSS26-03-1989T18:32:38.840
DD/MM/YYYY''T''hh:mm:ss.SSS26/03/1989T18:32:38.840
YYYYMMDD19890326
YYYYMMDDhhmmss19890326183238
YYYYMMDDhhmmssSSS19880326183238840

Request

Query Parameters
  • Channel token of the targeted channel. A channel token must be provided as either a query parameter or a request header.
  • Default search query expression.
  • Default search query operator. This parameter is optional. It accepts 'or' and 'and' operators. If not provided, defaultOperator would be considered as 'or'.
  • The fields parameter is used to control the returned fields and values in the queried item. This parameter accepts a comma-separated list of field names or all. All the user-defined field names should be provided with prefix fields and followed by a period (.). These fields will be returned for each queried item. As all the field names are case-sensitive, users must provide the correct field names in the search query. When fields is specified as all (case-insensitive), in case of a type-specific query, all the standard fields, and user-defined fields except largetext, json, location datatype are returned for each queried item, whereas in case of a query across all types, only all standard fields are returned. The standard fields id and type are always returned in the response and cannot be filtered out. This parameter is optional in the query and by default query result shows only id, name, description, and type in the response. Any incorrect or invalid field name given in the query will be ignored.

    In the context of a brace style cross-type query, type specific fields may be specified using syntax name,{typename1:fields.userdefinedfieldname1,fields.userdefinedfieldname2},{typename2:fields.userdefinedfieldname1}.In the preceding example, all items of type typename1 will have fields - name, userdefinedfieldname1 and userdefinedfieldname2, while all items of type typename2 will have fields - name, userdefinedfieldname1. If the cross-type query does not resolve to types referenced in the typed fields clause(s), an error will be thrown. Example: ?q=(type eq "LocationType")&fields=fields.state,fields.country,updatedDate
    This returns id, type, state, country, updatedDate in the search results for a LocationType with state and country fields.
    Example: ?q=(type eq "LocationType")&fields=all
    This will return all standard fields and all user-defined fields except largetext, json, location data types
    Example: ?fields=all
    This will return only standard fields (id, type, typeCategory, name, description, slug, language, createdDate, updatedDate, taxonomies, renditions) since Type is not used in the search query (acts as a Global query)
    Default Value: name,description,slug,language,translatable,createdDate,updatedDate,fileExtension
  • This parameter accepts a non negative integer and is used to control the size of the result. The maximum value allowed for limit is 500.
    Default Value: 100
  • Start index of response rows.
    Default Value: 0
  • The orderBy parameter is used to control the order (ascending or descending) of queried items. This parameter is optional in the query and by default the results are sorted in the descending order of updatedDate. This parameter accepts featured() or field names separated by a colon (:), which the user wants to sort the results and sort order. Multiple sort orders are separated by semicolon (;).
    format : orderBy={fieldName1}:{asc/desc};{fieldName2}:{asc/desc} (*Note: asc stands for ascending and des for descending. asc and des are always in lower case.)
    In a type specific query, field names can be name, createdDate, updatedDate (standard fields) or user-defined fields (single-valued data types - number, decimal, datetime). All the user-defined field names should be provided with prefix fields and followed by a period (.). In the context of a cross-type search, this parameter can also have a typed section and takes the form {typename1:fields.userdefinedfieldname1:asc|desc};{typename2:fields.userdefinedfieldname1:asc|desc}. The order by parameter only supports one order by field per set of matching braces.The sort order is optional and by default it is ascending. Any incorrect or invalid field name given in the query will be ignored.When featured() is given, the results are sorted by the relevance of the items to the applied filter.

    OrderBy parameter also supports sorting by a two level field. If there is a two level sort field, then it can be the only sort field in the OrderBy parameter.
    OrderBy parameter also supports sorting by taxonomy root categories and sub-categories of a root category. The additional sorting parameters are
    taxonomies.shortName["short name of taxonomy"]:{asc/desc}; taxonomies.categories.nodes.name["short name of taxonomy"|"taxonomy name","category1","category2","category3"] where category1,category2,category3, etc.
    are sub-categories of a given taxonomy "taxonomy name".

    Example: orderBy=name:asc
    Returns all the items in the ascending order of name.
    Example: orderBy=updateDate:asc
    Returns all the items in the ascending order of updateDate.
    Example : orderBy=fields.age:des
    Returns all the items in the descending order of age.
    Example: orderBy=fields.age
    Returns all the items in the ascending order of age.
    Example : default=apples&orderBy=featured()
    Returns all the items sorted by the relevance of the items to the apples
    Example : orderBy=fields.blogauthor.authorage
    Returns all the items in the ascending order of age of the author referred by referenced field "blogauthor".
    Example : orderBy=fields.blogauthor.fields.authorage&twolvl_v1_1=true
    Returns all the items in the ascending order of age of the author referred by referenced field "blogauthor".
    Example : orderBy=taxonomies.shortName["loc"];taxonomies.categories.nodes.name["loc"|"Location","emea","china","industry"];
    taxonomies.categories.nodes.name["loc"|"Location","americas","brazil","industry"]

    Returns all the items sorted in ascending order of root category of "loc", sub-categories of category having path "/Location/emea/china/industry", sub-categories of category having path "/Location/americas/brazil/industry".
  • This parameter accepts a query expression condition that matches the field values. Many such query conditions can be joined using AND/OR operators and grouped with parentheses. The value of query condition follows the format of {fieldName} {operator} "{fieldValue}". In case of query across type the field names are limited to standard fields (id, type, name, description, typeCategory, slug, language, createdDate, updatedDate, taxonomies). However in case of type specific query the field names are limited to standard fields and user defined fields (except fields of largeText data type). The only values allowed in the operator are eq (Equals), co (Contains), sw (Startswith), ge (Greater than or equals to), le (Less than or equals to), gt (Greater than), lt (Less than), mt (Matches), sm (Similar).
    Example:
    https://{cecsdomain}/content/preview/api/v1.1/items?q=(name eq "John")&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
    Example:
    https://{cecsdomain}/content/preview/api/v1.1/items?q=(type eq "Employee" AND name eq "John")&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
    Example:
    https://{cecsdomain}/content/preview/api/v1.1/items?q=(type eq "Employee" AND ((name eq "John" AND field.age ge "40") OR fields.weight gt "70"))&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
    Example:
    https://{cecsdomain}/content/preview/api/v1.1/items?q=(taxonomies.categories.id eq "9E1A79EE600C4C4BB727FE3E39E95489" OR (taxonomies.categories.name co "cat" AND taxonomies.categories.name co "red"))&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
    Example:
    https://{cecsdomain}/content/preview/api/v1.1/items?q=(taxonomies.categories.nodes.id eq "9E1A79EE600C4C4BB727FE3E39E95489" OR taxonomies.categories.nodes.name co "cars")&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51
  • Specifying this parameter indicates that scroll behavior is expected from the search api. Scrolling is the recommended method for retrieving large result sets. Scrolling is not available when returnMaster is enabled. hasMore will always return false when scrolling is enabled. offset parameter value, if specified, will be ignored on scroll requests. limit parameter value will be interpreted in the context of scroll and be fixed for a scroll session. Subsequent changes to limit will be ignored for the scroll session. A limit that results in too large a response will result in a 413 (Payload Too Large) response status.
    Default Value: false
  • This parameter is used to specify the scroll id. scrollTTL and the original value of the q parameter are always required with requests that use a scrollId to get consistent results. Note that the requirement to always include the q parameter in subsequent scroll requests is currently not validated against previous requests and changes to the parameter within the same scroll session are ignored.
  • scrollTTL (in milliseconds - default and maximum value 30000 ms) specifies the period of inactivity allowed between the current and next scroll request. All responses to search with scroll include a scrollId. Subsequent scroll requests must include the scrollId returned from the previous response since the scrollId returned could change across requests. Since all scroll requests are stateless, scrollTTL is always expected. Value of scrollTTL does not have to be the same across requests. The original search query (q) is also expected with each subsequent scroll request. An invalid or expired scrollId will result in a 400 (Bad Request) response status.
    Default Value: 30000
  • Accepts a Boolean value. Setting it to true displays the total results field in the response.
    Default Value: false
  • This parameter does not need a value and when used indicates that the two level search api uses (i) fields.refname.fieldname to search on system fields such as name, description, etc of the referred type; and (ii) fields.refname.fields.userfieldname to search on user defined fields of the referred type. When this parameter is not used, two level search behaves in compatibility mode and only supports searches like fields.reftype.fieldname. Furthermore, when fieldname is the same as a system defined field name, two level search behaves the same as fields.reftype.fields.fieldname.
Back to Top

Response

Supported Media Types

200 Response

Successful operation.
Body ()
Root Schema : CollectionProperties
Type: object
CollectionProperties.
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 : properties
Type: object
Additional Properties Allowed
Show Source
additional collection properties.
Nested Schema : AggregationResult
Type: object
Show Source
Nested Schema : items
Type: object
Nested Schema : additionalProperties
Type: object

400 Response

Bad Request. The server is unable to process the request on the client side due to malformed syntax, invalid data or message framing.

403 Response

Forbidden. Client is not authorized to perform this request.

500 Response

Internal server error. An unexpected error condition encountered in the system.
Back to Top

Examples

Example 1:

The following example shows how to search preview items by submission of a GET request on the REST resource using cURL:

curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/items?q=description+eq+\"Test2739986407075001_2740145743267005 description\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all' 

Searches for items with description equals Test2739986407075001_2740145743267005 description, with channelToken:b361a487716547d8a7527021a2d6628c.

Response Body

{
        "hasMore": false,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "items": [
          {
            "createdDate": {
              "value": "2020-07-10T06:22:38.994Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "Test2739986407075001_2740145743131004 item",
            "fileExtension": "contentItem",
            "description": "Test2739986407075001_2740145743267005 description",
            "language": "en",
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/COREF81C484DA2A44BD4B9818DDBC186546D?channelToken=3f37ec061f1a4c3a978d0dd81fda3e51",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "COREF81C484DA2A44BD4B9818DDBC186546D",
            "updatedDate": {
              "value": "2020-07-10T06:22:38.994Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "fileGroup": "contentItem",
            "type": "Test2740036455042000",
            "typeCategory": "ContentType",
            "slug": "1481786140084-test2739986407075001_2740145743131004-item"
          },
          {
            "createdDate": {
              "value": "2020-07-10T06:22:16.747Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "Test2739986407075001_2740145743131004 item",
            "fileExtension": "contentItem",
            "description": "Test2739986407075001_2740145743267005 description",
            "language": "en",
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORED65D3CEE49534776B5EF4DC8D958CEA3?channelToken=3f37ec061f1a4c3a978d0dd81fda3e51",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "id": "CORED65D3CEE49534776B5EF4DC8D958CEA3",
            "updatedDate": {
              "value": "2020-07-10T06:22:16.747Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "fileGroup": "contentItem",
            "type": "Test2739990400576000",
            "typeCategory": "ContentType",
            "slug": "1481786139966-test2739986407075001_2740145743131004-item"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=description eq \"Test2739986407075001_2740145743267005 description\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=description eq \"Test2739986407075001_2740145743267005 description\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/items?channelToken=3f37ec061f1a4c3a978d0dd81fda3e51",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=description eq \"Test2739986407075001_2740145743267005 description\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all&offset=0",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=description eq \"Test2739986407075001_2740145743267005 description\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all&offset=0",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }
        ]
      }

Example 2:

curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/items?q=type+eq+\"Test2739990400576000\"+and+fields.stringSingle+eq+\"sample+text+item1\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all' 

Searches publised items of type: Test2739990400576000 and having 'sample text item1' as value for field stringSingle, with channelToken:b361a487716547d8a7527021a2d6628c.

Response Body

{
        "hasMore": false,
        "offset": 0,
        "count": 1,
        "limit": 1,
        "items": [
          {
            "createdDate": {
              "value": "2020-07-10T06:22:16.747Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "Test2739986407075001_2740145743131004 item",
            "fileExtension": "contentItem",
            "description": "Test2739986407075001_2740145743267005 description",
            "language": "en",
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORED65D3CEE49534776B5EF4DC8D958CEA3?channelToken=3f37ec061f1a4c3a978d0dd81fda3e51",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-10T06:22:16.747Z",
              "timezone": "UTC"
            },
            "id": "CORED65D3CEE49534776B5EF4DC8D958CEA3",
            "type": "Test2739990400576000",
            "typeCategory": "ContentType",
            "mimeType": "contentItem",
            "fileGroup": "contentItem",
            "fields": {
              "booleanSingle": true,
              "referenceSingle": {
                "id": "CORE07D2B709CD4F443FAE0A2EF3EE7C1FA3",
                "type": "Test2740041803418992",
                "typeCategory": "ContentType",
                "links": [
                  {
                    "href": "https://<hostname>/content/preview/api/v1.1/items/CORE07D2B709CD4F443FAE0A2EF3EE7C1FA3?channelToken=3f37ec061f1a4c3a978d0dd81fda3e51",
                    "rel": "self",
                    "method": "GET",
                    "mediaType": "application/json"
                  }
                ]
              },
              "intSingle": 100,
              "digitalAssetReferenceSingle": {
                "id": "CONT92D59C9D771844019E16BD47E2AA36C2",
                "type": "DigitalAsset",
                "typeCategory": "DigitalAssetType",
                "links": [
                  {
                    "href": "https://<hostname>/content/preview/api/v1.1/items/CONT92D59C9D771844019E16BD47E2AA36C2?channelToken=3f37ec061f1a4c3a978d0dd81fda3e51",
                    "rel": "self",
                    "method": "GET",
                    "mediaType": "application/json"
                  }
                ]
              },
              "dateTimeSingle": {
                "value": "2017-10-30T10:10:29.208Z",
                "timezone": "UTC"
              },
              "floatSingle": 10.2,
              "stringSingle": "sample text item1",
              "largeTextSingle": "large text item1 large text item1"
            },
            "slug": "1481786139966-test2739986407075001_2740145743131004-item"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2739990400576000\" and fields.stringSingle eq \"sample text item1\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2739990400576000\" and fields.stringSingle eq \"sample text item1\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/items?channelToken=3f37ec061f1a4c3a978d0dd81fda3e51",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2739990400576000\" and fields.stringSingle eq \"sample text item1\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all&offset=0",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2739990400576000\" and fields.stringSingle eq \"sample text item1\"&channelToken=3f37ec061f1a4c3a978d0dd81fda3e51&fields=all&offset=0",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }
        ]
      }

Example 3:

curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/items?q=type+eq+\"Test2746297847744000\"+and+fields.Test2746294166794002+co+\"sample+text\"+and+fields.Test2746294167170006+gt+\"100\"&channelToken=7a53863f0ca74c348f0d560646ffe56d&fields=all' 

Searches preview items with type: Test2746297847744000 with fieldValue Test2746294166794002 contains 'sample text' and fieldValue for Test2746294167170006 is greater than 100, with channelToken:b361a487716547d8a7527021a2d6628c.

Response Body

{
        "hasMore": false,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "items": [
          {
            "createdDate": {
              "value": "2020-07-10T06:32:25.230Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "Test2746293843126001_R2746387005673008",
            "fileExtension": "contentItem",
            "description": "Test2746293843126001_S2746387005767999 description",
            "language": "en",
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORE831CE98B1BDF44D59AB82F8955305682?channelToken=7a53863f0ca74c348f0d560646ffe56d",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-10T06:32:25.230Z",
              "timezone": "UTC"
            },
            "mimeType": "contentItem",
            "fileGroup": "contentItem",
            "id": "CORE831CE98B1BDF44D59AB82F8955305682",
            "type": "Test2746297847744000",
            "typeCategory": "ContentType",
            "fields": {
              "Test2746294166794002": "sample text",
              "Test2746294167106004": "large text item3 large text item3",
              "Test2746294167170006": 10000,
              "Test2746294167331002": {
                "value": "2019-10-30T10:10:29.208Z",
                "timezone": "UTC"
              },
              "Test2746294167378004": {
                "id": "CORE722325FBA720421EA711500EFAB0A1AD",
                "type": "Test2746335321277004",
                "typeCategory": "ContentType",
                "links": [
                  {
                    "href": "https://<hostname>/content/preview/api/v1.1/items/CORE722325FBA720421EA711500EFAB0A1AD?channelToken=7a53863f0ca74c348f0d560646ffe56d",
                    "rel": "self",
                    "method": "GET",
                    "mediaType": "application/json"
                  }
                ]
              },
              "Test2746294167224008": 100.1,
              "Test2746294167277990": false
            },
            "slug": "1481786140778-test2746293843126001_r2746387005673008"
          },
          {
            "createdDate": {
              "value": "2020-07-10T06:32:14.364Z",
              "timezone": "UTC"
            },
            "taxonomies": {
              "items": []
            },
            "name": "Test2746293843126001_R2746372598337004",
            "fileExtension": "contentItem",
            "description": "Test2746293843126001_S2746372598582995 description",
            "language": "en",
            "links": [
              {
                "href": "https://<hostname>/content/preview/api/v1.1/items/CORE9D97CD95074544FBAE84218C609EC282?channelToken=7a53863f0ca74c348f0d560646ffe56d",
                "rel": "self",
                "method": "GET",
                "mediaType": "application/json"
              }
            ],
            "updatedDate": {
              "value": "2020-07-10T06:32:14.364Z",
              "timezone": "UTC"
            },
            "id": "CORE9D97CD95074544FBAE84218C609EC282",
            "type": "Test2746297847744000",
            "typeCategory": "ContentType",
            "mimeType": "contentItem",
            "fileGroup": "contentItem",
            "fields": {
              "Test2746294166794002": "sample text",
              "Test2746294167106004": "large text item2 large text item2",
              "Test2746294167170006": 1000,
              "Test2746294167331002": {
                "value": "2018-10-30T10:10:29.208Z",
                "timezone": "UTC"
              },
              "Test2746294167378004": {
                "id": "CORE4E2BE1B708DE4C4494235C4D398006B2",
                "type": "Test2746335321277004",
                "typeCategory": "ContentType",
                "links": [
                  {
                    "href": "https://<hostname>/content/preview/api/v1.1/items/CORE4E2BE1B708DE4C4494235C4D398006B2?channelToken=7a53863f0ca74c348f0d560646ffe56d",
                    "rel": "self",
                    "method": "GET",
                    "mediaType": "application/json"
                  }
                ]
              },
              "Test2746294167224008": 20.1,
              "Test2746294167277990": false
            },
            "slug": "1481786140749-test2746293843126001_r2746372598337004"
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2746297847744000\" and fields.Test2746294166794002 eq \"sample text\" and fields.Test2746294167170006 gt \"100\"&channelToken=7a53863f0ca74c348f0d560646ffe56d&fields=all",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2746297847744000\" and fields.Test2746294166794002 eq \"sample text\" and fields.Test2746294167170006 gt \"100\"&channelToken=7a53863f0ca74c348f0d560646ffe56d&fields=all",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/items?channelToken=7a53863f0ca74c348f0d560646ffe56d",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2746297847744000\" and fields.Test2746294166794002 eq \"sample text\" and fields.Test2746294167170006 gt \"100\"&channelToken=7a53863f0ca74c348f0d560646ffe56d&fields=all&offset=0",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/preview/api/v1.1/items?q=type eq \"Test2746297847744000\" and fields.Test2746294166794002 eq \"sample text\" and fields.Test2746294167170006 gt \"100\"&channelToken=7a53863f0ca74c348f0d560646ffe56d&fields=all&offset=0",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }
        ]
      }
    }
Back to Top