Documentation Index

Fetch the complete documentation index at: https://docs.plainid.io/llms.txt

Use this file to discover all available pages before exploring further.

List Policy Dependencies

Prev Next
Post
/api/2.0/policies/{envId}/dependencies

Returns an aggregated, deduplicated index of configuration objects required to promote or partially export the given policies. Supply policy IDs in the request body; the response lists dependency IDs grouped by object type so automation can call existing per-type Management API export endpoints without loading full policy payloads.

PermissionspolicyIds in the response is the subset of input IDs the caller may access in the environment. Unknown or inaccessible policy IDs are omitted silently (no error).

Limits — max 100 policy IDs per request. There is no cap on the number of identifiers returned per dependency group. For larger promotion batches, send multiple requests (e.g. 50–100 policies each) and merge dependencies per key on the client.

Filtering — optional dependencyTypes limits which dependency groups are resolved and returned (e.g. ["applications"]). When omitted, all nine groups are collected. Unknown type values return 422.

Identifiers — values are resource IDs (same identifier strings as other Management API export/import calls) for all groups except pipViewNames, which lists PIP view names. Scope values are scope IDs. Empty groups are omitted from dependencies.

Notice

Accessing the Policy Management APIs is through a dedicated domain/URL, according to your PlainID Tenant Location
  • United States (US) - `https://api.us1.plainid.io`
  • Canada (CA) - `https://api.ca1.plainid.io`
  • Europe (EU) - `https://api.eu1.plainid.io`

  • Using HTML Encoded Special Characters

    Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.


    Important note about headers

    Refer to the headers below to modify your cURL sample. Check if the following headers are in the sample, if not, ensure you add it to your cURL sample before pasting into your API tool.

    Headers

    *Required
    Header Value cURL Line
    Content-Type * `application/json` `-H "Content-Type:application/json"`
    Accept `application/json` `-H "Accept:application/json"`

    cURL Sample Guidelines

    In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right in the Try It or Code Sample tabs. You can then copy the cURL sample from the Code Sample tab in the correct format.

    Security
    HTTP
    Type bearer

    For more details about Administration API Authentication, check out the Authentication APIs documentation
    Provide your bearer token in the Authorization header when making requests to protected resources.
    Example: Authorization: Bearer 123

    Path parameters
    envId
    string (uuid) Required

    The Environment ID can be found under the Details tab in the Environment Settings.

    Example2d4a0591-dfe4-45fb-8a69-d183f5c75c0d
    Body parameters
    Single policy
    {
      "policyIds": [
        "policy-alpha"
      ]
    }
    Multiple policies
    {
      "policyIds": [
        "policy-alpha",
        "policy-beta",
        "snowflake-policy-1"
      ]
    }
    Applications only
    {
      "policyIds": [
        "policy-alpha",
        "policy-beta"
      ],
      "dependencyTypes": [
        "applications"
      ]
    }
    object
    policyIds
    Array of string Required

    Policy IDs to resolve dependencies for

    Min items1
    Max items100
    string
    Max length128
    Pattern^[a-zA-Z0-9_:.-]+$
    dependencyTypes
    Array of string

    Optional subset of dependency groups to resolve. When omitted, all supported groups are returned.

    Min items1
    string
    Valid values[ "applications", "assetTemplates", "identityTemplates", "scopes", "requestAttributes", "customAttributes", "apiMapperSets", "paaGroups", "pipViewNames" ]
    Responses
    200

    Successful operation

    Headers
    x-request-id
    string
    Full dependency groups

    All supported dependency types (deduped across policies in the request)

    {
      "policyIds": [
        "policy-alpha",
        "policy-beta"
      ],
      "dependencies": {
        "applications": [
          "crm-app",
          "billing-app"
        ],
        "assetTemplates": [
          "accounts",
          "loans"
        ],
        "identityTemplates": [
          "employees",
          "contractors"
        ],
        "scopes": [
          "finance-scope",
          "hr-scope"
        ],
        "requestAttributes": [
          "country-code",
          "client-ip"
        ],
        "customAttributes": [
          "risk-tier",
          "env-attr-1"
        ],
        "apiMapperSets": [
          "crm-api-mappers"
        ],
        "paaGroups": [
          "paa-group-sales"
        ],
        "pipViewNames": [
          "v_users",
          "v_accounts"
        ]
      }
    }
    Unknown policy ID omitted

    Mix of known and unknown IDs — unknown omitted from policyIds; dependencies from permitted policies only

    {
      "policyIds": [
        "policy-alpha"
      ],
      "dependencies": {
        "applications": [
          "crm-app"
        ],
        "assetTemplates": [
          "accounts"
        ],
        "identityTemplates": [
          "employees"
        ],
        "scopes": [
          "finance-scope"
        ],
        "requestAttributes": [
          "country-code"
        ],
        "customAttributes": [
          "risk-tier"
        ],
        "apiMapperSets": [
          "crm-api-mappers"
        ],
        "paaGroups": [
          "paa-group-sales"
        ],
        "pipViewNames": [
          "v_accounts"
        ]
      }
    }
    No permitted policies
    {
      "policyIds": [],
      "dependencies": {}
    }
    Expand All
    object
    policyIds
    Array of string

    Policy IDs from the request that the caller may access and that exist in the environment.

    string
    Max length128
    Pattern^[a-zA-Z0-9_:.-]+$
    dependencies
    object (PolicyDependenciesGrouped)

    Dependency identifiers grouped by object type.

    applications
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    assetTemplates
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    identityTemplates
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    scopes
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    requestAttributes
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    customAttributes
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    apiMapperSets
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    paaGroups
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    pipViewNames
    Array of string

    IDs for dependency type (for pipViewNames, view names).

    string
    401

    Unauthorized

    Headers
    x-request-id
    string
    403

    Forbidden — caller has no access to the environment

    Headers
    x-request-id
    string
    422

    Validation failed — invalid request body or path parameters

    Headers
    x-request-id
    string
    Invalid envId format
    {
      "errors": [
        {
          "code": "V-032",
          "args": {
            "0": "ed252aa5-9d0c-4193-838-60bf20b13109",
            "1": "uuid"
          },
          "id": "EEJQMA",
          "status": 422,
          "name": "UnprocessableEntityError",
          "message": "$: test is an invalid uuid"
        }
      ]
    }
    Empty policyIds
    {
      "errors": [
        {
          "code": "V-010",
          "args": {
            "0": "1",
            "path": "$.policyIds"
          },
          "id": "E7WJBB",
          "status": 422,
          "name": "UnprocessableEntityError",
          "message": "$.policyIds: there must be a minimum of 1 items in the array"
        }
      ]
    }
    Too many policy IDs
    {
      "errors": [
        {
          "code": "V-011",
          "args": {
            "0": "100",
            "path": "$.policyIds"
          },
          "id": "E7WJBB",
          "status": 422,
          "name": "UnprocessableEntityError",
          "message": "$.policyIds: there must be a maximum of 100 items in the array"
        }
      ]
    }
    Expand All
    object
    errors
    Array of object (Error)
    object
    code
    string
    id
    string
    status
    integer
    name
    string
    message
    string
    args
    object
    path
    string

    © 2024 PlainID LTD. All rights reserved.