HCP System Management Help
You can retrieve a subset of items of a particular resource type by specifying a filter in the GET request. To apply a filter, you specify the property you want to filter by and the text string to use as the filter. The filtered list includes only those items for which the value of the specified property begins with or is the same as the specified text string.
You can filter tenants and namespaces by name or by tag. You can filter user accounts by username.
To specify a filter, you use these query parameters in the GET request:
•filterType=property-name specifies the property by which to filter the resource list. Valid values for property-name are:
oFor the tenants, namespaces, and dataAccessPermissions resources, name and tag
oFor the userAccounts resource, username
The filterType parameter is optional. For the tenants, namespaces, and dataAccessPermissions resources, the default is name.
•filterString=text-string specifies the text string to use as the filter. This string is not case sensitive.
Text strings can be at most 64 characters long and can contain any valid UTF-8 characters except commas (,). White space is allowed and must be percent encoded.
For example, this GET request filters the list of namespaces for the Finance tenant by names beginning with the string accounts:
curl -k -i -H "Accept: application/xml"
-H "Authorization: HCP bGdyZWVu:a3b9c163f6c520407ff34cfdb83ca5c6"
"https://finance.hcp.example.com:9090/mapi/tenants/finance/namespaces
?filterType=name&filterString=accounts&prettyprint"
These considerations apply to filtering resource lists:
•The filterType and filterString parameters are valid only with the tenants, namespaces, userAccounts, and dataAccessPermissions resources.
•If a GET request includes the filterType parameter but does not include the filterString parameter, HCP returns the complete list of items of the applicable type.
•You can page, sort, and filter resource lists in the same request. For information on paging, see Paging through the resource lists. For information sorting, see Sorting resource lists.
Trademarks and Legal Disclaimer
© 2017 Hitachi Vantara Corporation. All rights reserved.