About the metadata query API

The HCP metadata query API lets you query namespaces for objects that match criteria you specify. Query criteria can be based on system metadata, custom metadata, ACLs, and operations performed on objects. The API does not support queries based on object content.

In response to a query, HCP returns metadata for objects that match query criteria. It does not return object data.

The metadata query API supports two types of queries, object-based queries and operation-based queries. For more information on these types of queries, see Types of queries.

A single query can return metadata for objects in multiple namespaces, including a combination of HCP namespaces and the default namespace. For HCP namespaces that support versioning, operation-based queries can return metadata for both current and old versions of objects.

To support object-based queries, HCP maintains an index of objects in the repository. For more information on this index, see Object index.

To access HCP through the metadata query API, you use the HTTP POST method. With this method, you specify query criteria in the request body. In the request body you also specify what information you want in the query results.

The API accepts query criteria in XML or JSON format and can return results in either format. For example, you could use XML to specify the query criteria and request that the response be JSON.

Note: This book uses the term entry to refer to an XML element and the equivalent JSON object and the term property for an XML attribute or the equivalent JSON name/value pair.

Because a large number of matching objects can result in a very large response, the metadata query API lets you limit the number of results returned for a single request. You can retrieve metadata for all the matching objects by using multiple requests. This process is called using a paged query. For more information on paged queries, see Paged queries.

Trademarks and Legal Disclaimer

© 2017 Hitachi Data Systems Corporation. All rights reserved.