---
title: "ListDataPolicies"
method: GET
path: "/data-policies"
tags: ["DataPoliciesService"]
---

# ListDataPolicies

`GET /data-policies`

Lists all DataPolicies for all platforms.

## Query parameters

- `pageParameters.skip` integer
- `pageParameters.pageSize` integer

## Response `200`

OK

- ListDataPoliciesResponse
  - `dataPolicies` DataPolicy[]
    - `id` string
    - `metadata` DataPolicyMetadata
      - `createTime` string, date-time
      - `description` string
      - `lastApplyTime` string, date-time — The last time the policy was applied to the target(s).
      - `tags` string[]
      - `title` string
      - `updateTime` string, date-time
      - `version` integer — For new policies, the version does not need to be set. When updating a policy, the version must match the current version. The version is then automatically incremented.
    - `platform` ProcessingPlatform
      - `id` string — An arbitrary but unique identifier for the platform. This matches the id from the PACE app configuration.
      - `platformType` 'PLATFORM_TYPE_UNSPECIFIED' | 'DATABRICKS' | 'SNOWFLAKE' | 'BIGQUERY' | 'POSTGRES' | 'SYNAPSE', enum
    - `ruleSets` DataPolicyRuleSet[]
      - `fieldTransforms` RuleSetFieldTransform[] — Zero or more field transforms. Any field for which no field transform is specified will be included as-is.
        - `field` DataPolicyField
          - `nameParts` string[] — Instead of using "nodes", nesting can be expressed by specifying multiple name parts. A flat table (e.g. csv file) will only contain a single name part for all fields.
          - `required` boolean — Whether the field is required. If not, the field may be null.
          - `tags` string[]
          - `type` string — The data type of the field.
        - `transforms` FieldTransformTransform[] — The last condition in the list must have 0 principals, as this acts as the default / else condition. Transforms should have mutually exclusive sets of principals.
          - `aggregation` TransformAggregation
            - `avg` AggregationAvg
              - …
            - `max` AggregationMax
            - `min` AggregationMin
            - `partitionBy` DataPolicyField[] — The fields to partition by.
              - …
            - `sum` AggregationSum
          - `detokenize` TransformDetokenize
            - `tokenField` DataPolicyField
              - …
            - `tokenSourceRef` string — Full reference to the token source, e.g. a fully qualified table name.
            - `valueField` DataPolicyField
              - …
          - `fixed` TransformFixed
            - `value` string
          - `hash` TransformHash
            - `seed` string
          - `identity` TransformIdentity
          - `nullify` TransformNullify
          - `numericRounding` TransformNumericRounding
            - `ceil` NumericRoundingCeil
              - …
            - `floor` NumericRoundingFloor
              - …
            - `round` NumericRoundingRound
              - …
          - `principals` DataPolicyPrincipal[] — The principals (e.g. groups) for which this transform will be applied.
            - `group` string
          - `regexp` TransformRegexp
            - `regexp` string
            - `replacement` string — Use dollar signs to reference capturing groups in the replacement, e.g. "my-replacement-$1-$2". If the replacement is left empty, the regexp match result (full match or first capturing group) is used.
          - `sqlStatement` TransformSqlStatement
            - `statement` string
      - `filters` RuleSetFilter[] — Zero or more filters. Records that match the conditions are included in the result. When no filters are defined, all records are always included.
        - `genericFilter` FilterGenericFilter
          - `conditions` GenericFilterCondition[] — The last condition in the list must have 0 principals, as this acts as the default / else condition.
            - `condition` string — A (platform-specific) SQL expression. If it evaluates to true, the principals are allowed to access the data.
            - `principals` DataPolicyPrincipal[] — The principals (e.g. groups) that apply to this condition.
              - …
        - `retentionFilter` FilterRetentionFilter
          - `conditions` RetentionFilterCondition[] — The last condition in the list must have 0 principals, as this acts as the default / else condition.
            - `period` RetentionFilterPeriod
              - …
            - `principals` DataPolicyPrincipal[] — The principals (e.g. groups) that apply to this condition.
              - …
          - `field` DataPolicyField
            - `nameParts` string[] — Instead of using "nodes", nesting can be expressed by specifying multiple name parts. A flat table (e.g. csv file) will only contain a single name part for all fields.
            - `required` boolean — Whether the field is required. If not, the field may be null.
            - `tags` string[]
            - `type` string — The data type of the field.
      - `target` DataPolicyTarget
        - `fullname` string — The full and unique name to be used in the target platform. E.g. the view name.
        - `type` 'TARGET_TYPE_UNSPECIFIED' | 'SQL_VIEW', enum
    - `source` DataPolicySource
      - `fields` DataPolicyField[] — A representation of the source data schema. Nested fields are supported.
        - `nameParts` string[] — Instead of using "nodes", nesting can be expressed by specifying multiple name parts. A flat table (e.g. csv file) will only contain a single name part for all fields.
        - `required` boolean — Whether the field is required. If not, the field may be null.
        - `tags` string[]
        - `type` string — The data type of the field.
      - `ref` string — The ref is an identifier for the source, unique at the source platform level.
      - `tags` string[]
  - `pageInfo` PageInfo
    - `total` integer — The (estimated) total number of records. If the total is unknown, this value is -1.

## Other responses

- `default` — Default error response

## Changes

- **2023-12-20** `5d53ddeb8184` — 1 info
  - added the optional property `dataPolicies/items/ruleSets/items/fieldTransforms/items/transforms/items/numericRounding/allOf[#/components/schemas/Transform_NumericRounding]/round/allOf[#/components/schemas/NumericRounding_Round]/divisor` to the response with the `200` status
- **2023-12-19** `df7ee7e702db` — 3 info
  - added the new optional `query` request parameter `pageParameters.pageSize`
  - added the new optional `query` request parameter `pageParameters.skip`
  - added the optional property `pageInfo` to the response with the `200` status
- **2023-12-15** `0006dd8ef0f4` — 1 info
  - added the optional property `dataPolicies/items/ruleSets/items/fieldTransforms/items/transforms/items/aggregation` to the response with the `200` status
- **2023-11-21** `e80cc8d96826` — 1 warning
  - added the new `SYNAPSE` enum value to the `dataPolicies/items/platform/platformType` response property for the response status `200`
- **2023-11-17** `04d64891152e` — 1 breaking, 13 warning, 5 info
  - the `dataPolicies/items/source/ref` response's property type/format changed from ``/`` to `string`/`` for status `200`
  - deleted the `query` request parameter `pageParameters.pageSize`
  - deleted the `query` request parameter `pageParameters.pageToken`
  - deleted the `query` request parameter `pageParameters.skip`
  - …15 more

[Change history](https://skmtc.dev/getstrm/apis/pace-api/changes/data-policies/get.md)

---

[API](https://skmtc.dev/getstrm/apis/pace-api.md) · [All operations](https://skmtc.dev/getstrm/apis/pace-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getstrm/pace-api/revisions/fece62c921d3/schema)
