Add data policy

POST /api/service/personas/{id}/policies#data

Add a single data policy to a persona.

Path parameters

  • id string Required

    Unique identifier of the persona to which to add the policy.

Body Required

Details of the policy to add to the persona.

  • type string | null Required

    Type of policy to be added to the persona.

    Values are metadataPolicy, dataPolicy, glossaryPolicy, or null.

  • policy object Required

    Instance of data policy on a persona in Atlan, with its detailed information.

    • actions array[string] | null

      List of granular permissions within the policy, to apply to assets within the policy. For data policies the only possible permission is select, which applies to both previewing and querying data.

      Value is select.

    • allow boolean | null

      If false, this applies an "explicit deny" to preview and query permission. This denial for previewing and querying applies to entire tables within the assets defined in the policy.

    • name string | null

      Meaningful explanation of the policy.

    • description string | null

      Unused.

    • assets array[string] | null

      List of assets to which the policy applies.

    • connectionId string | null

      Unique identifier (GUID) of the connection to which this policy applies.

    • connectionName string | null

      Unused.

Responses

  • 200 object

    Policy was successfully added to persona.

    • actions array[string] | null

      List of granular permissions within the policy, to apply to assets within the policy. For data policies the only possible permission is select, which applies to both previewing and querying data.

      Value is select.

    • allow boolean | null

      If false, this applies an "explicit deny" to preview and query permission. This denial for previewing and querying applies to entire tables within the assets defined in the policy.

    • name string | null

      Meaningful explanation of the policy.

    • description string | null

      Unused.

    • assets array[string] | null

      List of assets to which the policy applies.

    • connectionId string | null

      Unique identifier (GUID) of the connection to which this policy applies.

    • connectionName string | null

      Unused.

    • createdAt integer(int64) | null

      Date and time (epoch) at which the policy was created, in milliseconds.

    • createdBy string | null

      User who created the policy.

    • updatedAt integer(int64) | null

      Date and time (epoch) at which the policy was last updated, in milliseconds.

    • updatedBy string | null

      User who last updated the policy.

    • id string | null

      Unique identifier (GUID) for the policy.

POST /api/service/personas/{id}/policies#data
curl \
 -X POST https://tenant.atlan.com/api/service/personas/9bee3ff8-9bf4-436f-927b-3e415fd3afe9/policies#data \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"type":"dataPolicy","policy":{"actions":["select"],"assets":["default/snowflake/1655116256"],"connectionName":"","connectionId":"74b02320-3b01-4896-81ea-b7ac4d5e4b9b","type":"null","allow":true,"name":"Full data access to all of Snowflake","description":""}}'
Request example
{
  "type": "dataPolicy",
  "policy": {
    "actions": [
      "select"
    ],
    "assets": [
      "default/snowflake/1655116256"
    ],
    "connectionName": "",
    "connectionId": "74b02320-3b01-4896-81ea-b7ac4d5e4b9b",
    "type": "null",
    "allow": true,
    "name": "Full data access to all of Snowflake",
    "description": ""
  }
}
Response example (200)
{
  "actions": [
    "select"
  ],
  "allow": true,
  "assets": [
    "default/snowflake/1655116256"
  ],
  "connectionId": "74b02320-3b01-4896-81ea-b7ac4d5e4b9b",
  "connectionName": "",
  "createdAt": 1655221480475,
  "createdBy": "service-account-apikey-e8d1f0bd-600e-4a8a-9248-b7c9aa1ef8c3",
  "description": "",
  "id": "d0edeb50-696b-4e97-b04b-ba8ed01978a1",
  "name": "Full data access to all of Snowflake",
  "type": "null"
}