Types of queries

Content Platform Tenant Management Help

Version
9.7.x
File Size
4269 KB
Audience
anonymous
Part Number
MK-95HCPH002-19

The metadata query API supports two types of queries: object-based queries and operation-based queries. These query types have different request formats and return different information about objects in the result set. However, they have similar response formats.

Object-based queries

Object-based queries search for objects currently in the repository based on any combination of system metadata, object paths, custom metadata that’s well-formed XML, ACLs, and content properties. With object-based queries, you use a robust query language to construct query criteria.

In response to an object-based query, HCP returns a set of results, each of which identifies an object and contains metadata for the object. With object-based queries, you can specify sort criteria to manage the order in which results are returned. You can specify facet criteria to return summary information about object properties that appear in the result set.

Operation-based queries

Operation-based queries search for objects based on any combination of create, delete, and disposition operations and, for HCP namespaces that support versioning, purge and prune operations. Operation-based queries are useful for applications that need to track changes to namespace content.

In response to an operation-based query, HCP returns a set of operation records, each of which identifies an object and an operation on the object and contains additional metadata for the object.