List policy schemas

  • Policy schemas can be listed, filtered by namespace, or fetched by name using the customers.policySchemas.list method with the optional filter parameter.

  • Omitting the filter parameter will return all supported policy schemas.

  • The filter parameter value must be URL escaped and can combine filters using AND, OR, and NOT clauses with required parentheses for multiple filters.

  • Filter strings are case-insensitive and various filter syntax options are available to match different policy schema attributes.

  • Sample filter values demonstrate how to use the filter parameter to search for policy schemas based on various criteria.

You can list supported policy schemas, schemas within a namespace, or fetch a particular schema directly by name, with the filter parameter of the customers.policySchemas.list method. If you omit the filter parameter, all supported schemas are returned.

For more details, see the code samples.

Filter syntax

  GLOBAL_STRING_LITERAL|
  name=PARTIAL_NAME_MATCH|
  namespace=EXACT_NAMESPACE_MATCH|
  description=PARTIAL_DESCRIPTION_MATCH|
  access_restrictions=PARTIAL_ACCESS_RESTRICTIONS_MATCH|
  policy_api_lifecycle=EXACT_LIFECYCLE_STAGE_MATCH|
  field_descriptions.field=EXACT_FIELD_NAME_MATCH|
  field_descriptions.input_constraint=EXACT_INPUT_CONSTRAINT_MATCH|
  field_descriptions.description=PARTIAL_FIELD_DESCRIPTION_MATCH|
  additional_target_keys:EXACT_KEY_MATCH_IN_COLLECTION
  • GLOBAL_STRING_LITERAL: matches if a policy schema's name and/or description contains the string (partial match)
  • PARTIAL_NAME_MATCH: matches if a policy schema's name contains the string (partial match)
  • EXACT_NAMESPACE_MATCH: matches if a policy schema belongs to the provided namespace
  • PARTIAL_DESCRIPTION_MATCH: matches if a policy schema's description contains the string (partial match)
  • PARTIAL_ACCESS_RESTRICTION_MATCH: matches if a policy schema's access restrictions contain the string (partial match)
  • EXACT_LIFECYCLE_STAGE_MATCH: matches if a policy schema's lifecycle stage is an exact match for the provided string
  • EXACT_FIELD_NAME_MATCH: matches if a policy schema's field name is an exact match for the provided string
  • EXACT_INPUT_CONSTRAINT_MATCH: matches if a policy schema's input constraint is an exact match for the provided string
  • PARTIAL_FIELD_DESCRIPTION_MATCH: matches if a policy schema's field description contains the string (partial match)
  • EXACT_KEY_MATCH_IN_COLLECTION: matches if a policy schema's additional index keys contain an exact match for the provided string

Sample filter values

URL-encoded filter Literal filter value and description
filter=name%3Dchrome%2Eusers name=chrome.users

Filters for names that contain "chrome.users", for example "chrome.users.* and "chrome.users.apps.*"
filter=namespace%3Dchrome%2Enetworks%2Ewifi namespace=chrome.networks.wifi

Filters by namespace "chrome.networks.wifi"
filter=description%3Dcookies description=cookies

Filters for descriptions that contain "cookies"
filter=policy_api_lifecycle%3DAPI_DEPRECATED policy_api_lifecycle=API_DEPRECATED

Filters for policy api lifecycle stages that match "API_DEPRECATED"
filter=name%3Dprinters%20AND%20description%3Ddevices name=printers AND description=devices

Filters for names that contain "printers" and descriptions that contain "devices"
filter=(name%3Dblock%20OR%20name%3Dlist)%20AND%20NOT%20description%3Durl filter=(name=block OR name=list) AND NOT description=url

Filters for names that contain "block" or "list", but excludes descriptions that contain "url"