Sift | Docs

ListMetadataUsage

List metadata key usage.

GET
/api/v1/metadata-key-usage

Query Parameters

pageSizeinteger

The maximum number of metadata key usages to return. The service may return fewer than this value. If unspecified, at most 50 metadata key usages will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.

Format: "int64"

pageTokenstring

A page token, received from a previous ListMetadataUsage call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListMetadataUsage must match the call that provided the page token. Optional.

filterstring

A Common Expression Language (CEL) filter string. Available fields to filter by are: entity_name, entity_type, key_name,value_string, value_number, and value_boolean. For further information about how to use CELs, please refer to this guide. For more information about the fields used for filtering, please refer to this definition. Optional.

orderBystring

How to order the retrieved metadata key usages. Formatted as a comma-separated string i.e. "FIELD_NAME[ desc],...". Available fields to order_by are created_date, entity_id and entity_type. If left empty, items are ordered by created_date in ascending order (oldest-first). For more information about the format of this field, read this Example: "created_date desc"

curl -X GET "<API_URL>/api/v1/metadata-key-usage?pageSize=0&pageToken=string&filter=string&orderBy=string" \
  -H "Authorization: Bearer <API_KEY>"

A successful response.

{
  "metadataUsages": [
    {
      "entityId": "string",
      "entityType": "string",
      "value": {
        "key": {
          "name": "string",
          "type": "METADATA_KEY_TYPE_UNSPECIFIED",
          "archivedDate": "2019-08-24T14:15:22Z"
        },
        "stringValue": "string",
        "numberValue": 0.1,
        "booleanValue": true,
        "archivedDate": "2019-08-24T14:15:22Z"
      }
    }
  ],
  "nextPageToken": "string"
}