# List all policy sets hierarchically

List all policy sets hierarchically (includes policy sets from account, org, and project levels)

Endpoint: GET /pm/api/v1/policysets/all
Version: 1.0
Security: 

## Query parameters:

  - `accountIdentifier` (string)
    Harness account ID
    Example: "eBqAoNchMLKigC_qZ5EdC"

  - `orgIdentifier` (string)
    Harness organization ID
    Example: "test-org"

  - `projectIdentifier` (string)
    Harness project ID
    Example: "test-project"

  - `per_page` (integer)
    Number of results per page
    Example: 20

  - `page` (integer)
    Page number (starting from 0)
    Example: 4

  - `identifierFilter` (string)
    Comma separated List of Identifiers to filter on
    Example: "test-projectId1, test-projectId2"

  - `type` (string)
    Filter results by type
    Example: "pipeline"

  - `action` (string)
    Filter results by action
    Example: "onrun"

## Header parameters:

  - `x-api-key` (string)
    Harness PAT key used to perform authorization
    Example: "Rem exercitationem molestias et quia dolorem."

## Response 200 fields (application/json):

  - `account_id` (string, required)
    Harness account ID associated with this policy set
    Example: "eBqAoNchMLKigC_qZ5EdC"

  - `action` (string, required)
    Action that triggers the policy set
    Example: "onrun"

  - `created` (integer, required)
    Time the policy set was created
    Example: 1636669297674

  - `description` (string)
    Description of the policy set
    Example: "Captures critical production policies"

  - `enabled` (boolean, required)
    Only enabled policy sets are evaluated when evaluating by type/action
    Example: true

  - `entity_selector` (string, required)
    A string enum value which determines which entities the policy set applies to during evaluation
    Enum: "all_entities_in_scope", "all_entities_in_resource_groups"

  - `identifier` (string, required)
    Identifier of the policy set
    Example: "policyset-1"

  - `infra_params` (object)
    Infrastructure parameters for executing policies on customer infrastructure
    Example: {"annotations":{"Nemo aliquam aut.":"Fugit sit fugit."},"connectorRef":"account.k8s_connector","harnessImageConnectorRef":"account.docker_connector","initTimeout":"10m","labels":{"Et voluptatum sunt rerum quod.":"Velit aut rem.","Ipsa nihil tenetur et qui eum voluptatum.":"Tempora est facere.","Sequi non.":"Ab facere rerum itaque earum consequatur odit."},"namespace":"default","nodeSelector":{"Impedit dolorem ullam ut et.":"Dicta nisi eius dolor tenetur magni.","Vero pariatur aperiam quasi earum voluptatum.":"Sequi laudantium."},"os":"linux","poolName":"vm-pool-1","resources":{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}}

  - `infra_params.annotations` (object)
    Kubernetes annotations (for KubernetesDirect)
    Example: {"Nemo aliquam aut.":"Fugit sit fugit."}

  - `infra_params.connectorRef` (string)
    Connector reference (for KubernetesDirect)
    Example: "account.k8s_connector"

  - `infra_params.harnessImageConnectorRef` (string)
    Harness image connector reference
    Example: "account.docker_connector"

  - `infra_params.initTimeout` (string)
    Initialization timeout (for KubernetesDirect)
    Example: "10m"

  - `infra_params.labels` (object)
    Kubernetes labels (for KubernetesDirect)
    Example: {"Et voluptatum sunt rerum quod.":"Velit aut rem.","Ipsa nihil tenetur et qui eum voluptatum.":"Tempora est facere.","Sequi non.":"Ab facere rerum itaque earum consequatur odit."}

  - `infra_params.namespace` (string)
    Kubernetes namespace (for KubernetesDirect)
    Example: "default"

  - `infra_params.nodeSelector` (object)
    Kubernetes node selector (for KubernetesDirect)
    Example: {"Impedit dolorem ullam ut et.":"Dicta nisi eius dolor tenetur magni.","Vero pariatur aperiam quasi earum voluptatum.":"Sequi laudantium."}

  - `infra_params.os` (string)
    Operating system (for VM)
    Example: "linux"

  - `infra_params.poolName` (string)
    VM pool name (for VM)
    Example: "vm-pool-1"

  - `infra_params.resources` (object)
    Container resource requests and limits
    Example: {"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}

  - `infra_params.resources.limits` (object)
    CPU and memory quantities for container resources
    Example: {"cpu":"100m","memory":"128Mi"}

  - `infra_params.resources.limits.cpu` (string, required)
    CPU quantity
    Example: "100m"

  - `infra_params.resources.limits.memory` (string, required)
    Memory quantity
    Example: "128Mi"

  - `infra_params.resources.requests` (object)
    CPU and memory quantities for container resources
    Example: {"cpu":"100m","memory":"128Mi"}

  - `infra_type` (string)
    Infrastructure type for executing policies on customer infrastructure
    Enum: "KubernetesDirect", "VM"

  - `name` (string, required)
    Name of the policy set
    Example: "Production Policies"

  - `org_id` (string, required)
    Harness organization ID associated with this policy set
    Example: "test-org"

  - `policies` (array)
    Policies linked to this policy set
    Example: [{"account_id":"eBqAoNchMLKigC_qZ5EdC","created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","imported_policies":[{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674}],"name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Odio expedita adipisci.","polciy_size_in_bytes":7440435055692947000,"policy_package_name":"Enim ea.","project_id":"test-project","rego":"","severity":"warning","unique_id":"Exercitationem molestiae consequuntur sint adipisci iusto.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","imported_policies":[{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674}],"name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Odio expedita adipisci.","polciy_size_in_bytes":7440435055692947000,"policy_package_name":"Enim ea.","project_id":"test-project","rego":"","severity":"warning","unique_id":"Exercitationem molestiae consequuntur sint adipisci iusto.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","imported_policies":[{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674}],"name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Odio expedita adipisci.","polciy_size_in_bytes":7440435055692947000,"policy_package_name":"Enim ea.","project_id":"test-project","rego":"","severity":"warning","unique_id":"Exercitationem molestiae consequuntur sint adipisci iusto.","updated":1636669297674}]

  - `policies.account_id` (string, required)
    Harness account ID associated with this policy
    Example: "eBqAoNchMLKigC_qZ5EdC"

  - `policies.created` (integer, required)
    Time the policy was created
    Example: 1636669297674

  - `policies.git_commit_sha` (string)
    The commit sha of the commit that last effected the file
    Example: "1369b45c20fc685113adcfd1a08a914180ff3c0d"

  - `policies.git_connector_ref` (string)
    The harness connector used for authenticating on the git provider
    Example: "."

  - `policies.git_file_id` (string)
    The file id of the file, may be empty for bitbucket files
    Example: "1369b45c20fc685113adcfd1a08a914180ff3c0d"

  - `policies.git_file_url` (string)
    The url of the file on the fit provider

  - `policies.git_path` (string)
    The path to the file in the git repo
    Example: ".harness/policy.rego"

  - `policies.git_repo` (string)
    The git repo the policy resides in
    Example: "github.com/org/repo,omitempty"

  - `policies.identifier` (string, required)
    identifier of the policy
    Example: "policy-1"

  - `policies.imported_policies` (array)
    Policies imported (via import data.*) by this policy's Rego, flattened across the whole import chain. These are compiler inputs only — they are loaded alongside this policy's Rego so imports resolve, and are never evaluated on their own.
    Example: [{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","cache_response":{"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442},"created":1636669297674,"git_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_connector_ref":".","git_default_branch":"main","git_default_branch_commit_sha":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_default_branch_file_url":"","git_default_branch_update_error":{"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."},"git_default_branch_updated":1636669297674,"git_file_id":"1369b45c20fc685113adcfd1a08a914180ff3c0d","git_file_url":"","git_path":".harness/policy.rego","git_repo":"github.com/org/repo,omitempty","identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","parent_unique_id":"Aliquam est.","polciy_size_in_bytes":4204212102816286000,"policy_package_name":"Aspernatur in molestias recusandae odit quia.","policy_set_count":3,"project_id":"test-project","rego":"","unique_id":"Ex consequuntur saepe.","updated":1636669297674}]

  - `policies.imported_policies.account_id` (string, required)
    Harness account ID associated with this policy
    Example: "eBqAoNchMLKigC_qZ5EdC"

  - `policies.imported_policies.cache_response` (object)
    Cache metadata from GitX getFile RPC
    Example: {"cache_state":"STALE_CACHE","is_sync_enabled":true,"last_updated_at":1773917288158,"ttl_left":258234442}

  - `policies.imported_policies.cache_response.cache_state` (string)
    Cache state (UNKNOWN_STATE, VALID_CACHE, STALE_CACHE)
    Example: "STALE_CACHE"

  - `policies.imported_policies.cache_response.is_sync_enabled` (boolean)
    Whether sync is enabled for this resource
    Example: true

  - `policies.imported_policies.cache_response.last_updated_at` (integer)
    Timestamp (millis) when cache was last updated
    Example: 1773917288158

  - `policies.imported_policies.cache_response.ttl_left` (integer)
    Remaining time-to-live in milliseconds
    Example: 258234442

  - `policies.imported_policies.created` (integer, required)
    Time the policy was created
    Example: 1636669297674

  - `policies.imported_policies.git_commit_sha` (string)
    The commit sha of the commit that last effected the file
    Example: "1369b45c20fc685113adcfd1a08a914180ff3c0d"

  - `policies.imported_policies.git_connector_ref` (string)
    The harness connector used for authenticating on the git provider
    Example: "."

  - `policies.imported_policies.git_default_branch` (string)
    The default branch, the service pulls in changes from this branch for policy evaluation
    Example: "main"

  - `policies.imported_policies.git_default_branch_commit_sha` (string)
    The commit sha of the commit that last effected the file in the default branch
    Example: "1369b45c20fc685113adcfd1a08a914180ff3c0d"

  - `policies.imported_policies.git_default_branch_file_id` (string)
    The file id of the file in the default branch, may be empty for bitbucket files
    Example: "1369b45c20fc685113adcfd1a08a914180ff3c0d"

  - `policies.imported_policies.git_default_branch_file_url` (string)
    The url of the file in the default branch

  - `policies.imported_policies.git_default_branch_update_error` (object)
    Example: {"explanation":"File with given filepath [file.rego] already exists in Github, thus couldn't create a new file","hint":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main].","message":"Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."}

  - `policies.imported_policies.git_default_branch_update_error.explanation` (string, required)
    the explanation of the error
    Example: "File with given filepath [file.rego] already exists in Github, thus couldn't create a new file"

  - `policies.imported_policies.git_default_branch_update_error.hint` (string, required)
    the hint on how to resolve the error
    Example: "Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."

  - `policies.imported_policies.git_default_branch_update_error.message` (string, required)
    the message is a human-readable explanation specific to this occurrence of the problem
    Example: "Please check if there's already a file [file.rego] in Github repository [rego-demo] for the given filepath and branch [main]."

  - `policies.imported_policies.git_default_branch_updated` (integer)
    The last time the service successfully pulled in changes from the default branch
    Example: 1636669297674

  - `policies.imported_policies.git_file_id` (string)
    The file id of the file, may be empty for bitbucket files
    Example: "1369b45c20fc685113adcfd1a08a914180ff3c0d"

  - `policies.imported_policies.git_file_url` (string)
    The url of the file on the fit provider

  - `policies.imported_policies.git_path` (string)
    The path to the file in the git repo
    Example: ".harness/policy.rego"

  - `policies.imported_policies.git_repo` (string)
    The git repo the policy resides in
    Example: "github.com/org/repo,omitempty"

  - `policies.imported_policies.identifier` (string, required)
    identifier of the policy
    Example: "policy-1"

  - `policies.imported_policies.name` (string, required)
    Name of the policy
    Example: "Pipeline Approval"

  - `policies.imported_policies.org_id` (string, required)
    Harness organization ID associated with this policy
    Example: "test-org"

  - `policies.imported_policies.parent_unique_id` (string)
    Parent unique identifier for the policy
    Example: "Repellat in molestias aliquid et eligendi quia."

  - `policies.imported_policies.polciy_size_in_bytes` (integer)
    Size of the policy in bytes
    Example: 6630888188299982000

  - `policies.imported_policies.policy_package_name` (string)
    Package name of the policy
    Example: "Quae porro vel cumque voluptatem modi."

  - `policies.imported_policies.policy_set_count` (integer)
    Count of policy sets associated with this policy
    Example: 3

  - `policies.imported_policies.project_id` (string, required)
    Harness project ID associated with this policy
    Example: "test-project"

  - `policies.imported_policies.rego` (string, required)
    Rego that defines the policy

  - `policies.imported_policies.unique_id` (string)
    Unique identifier for the policy
    Example: "Quibusdam omnis atque saepe voluptas magni quas."

  - `policies.imported_policies.updated` (integer, required)
    Time the policy was last updated
    Example: 1636669297674

  - `policies.name` (string, required)
    Name of the policy
    Example: "Pipeline Approval"

  - `policies.org_id` (string, required)
    Harness organization ID associated with this policy
    Example: "test-org"

  - `policies.parent_unique_id` (string)
    Parent unique identifier for the policy
    Example: "Officiis quo."

  - `policies.polciy_size_in_bytes` (integer)
    Size of the policy in bytes
    Example: 1624002190453069600

  - `policies.policy_package_name` (string)
    Package name of the policy
    Example: "Illum incidunt."

  - `policies.project_id` (string, required)
    Harness project ID associated with this policy
    Example: "test-project"

  - `policies.rego` (string, required)
    Rego that defines the policy

  - `policies.severity` (string, required)
    The severity of this policy in this context
    Enum: "warning", "error"

  - `policies.unique_id` (string)
    Unique identifier for the policy
    Example: "Quam magni perspiciatis sed explicabo officia aut."

  - `policies.updated` (integer, required)
    Time the policy was last updated
    Example: 1636669297674

  - `project_id` (string, required)
    Harness project ID associated with this policy set
    Example: "test-project"

  - `resource_groups` (array)
    The groups of resources that this policy set should be applied to
    Example: [{"account_id":"Exercitationem harum consequatur dolorum minima molestiae aperiam.","created":3521594352669719600,"identifier":"Voluptates dolor aut corporis qui doloremque possimus.","name":"Doloremque nihil.","org_id":"Maxime pariatur ut architecto quisquam earum suscipit.","project_id":"Iste qui molestias qui."},{"account_id":"Exercitationem harum consequatur dolorum minima molestiae aperiam.","created":3521594352669719600,"identifier":"Voluptates dolor aut corporis qui doloremque possimus.","name":"Doloremque nihil.","org_id":"Maxime pariatur ut architecto quisquam earum suscipit.","project_id":"Iste qui molestias qui."},{"account_id":"Exercitationem harum consequatur dolorum minima molestiae aperiam.","created":3521594352669719600,"identifier":"Voluptates dolor aut corporis qui doloremque possimus.","name":"Doloremque nihil.","org_id":"Maxime pariatur ut architecto quisquam earum suscipit.","project_id":"Iste qui molestias qui."}]

  - `resource_groups.account_id` (string, required)
    resource group account id
    Example: "Ut et quo."

  - `resource_groups.created` (integer, required)
    resource group timestamp
    Example: 2651535724499236400

  - `resource_groups.identifier` (string, required)
    resource group identifier
    Example: "Alias eaque incidunt est."

  - `resource_groups.name` (string, required)
    resource group name
    Example: "Adipisci aut reprehenderit omnis quis est et."

  - `resource_groups.org_id` (string, required)
    resource group org id
    Example: "Error officiis."

  - `resource_groups.project_id` (string, required)
    resource group project identifier
    Example: "Qui non quod aut."

  - `type` (string, required)
    Type of input suitable for the policy set
    Example: "pipeline"

  - `updated` (integer, required)
    Time the policy set was last updated
    Example: 1636669297674

  - `yaml_version` (string)
    Harness yaml version associated with this policySet
    Enum: "0", "1"

## Response 400 fields (application/vnd.goa.error):

  - `fault` (boolean, required)
    Is the error a server-side fault?
    Example: true

  - `id` (string, required)
    ID is a unique identifier for this particular occurrence of the problem.
    Example: "123abc"

  - `message` (string, required)
    Message is a human-readable explanation specific to this occurrence of the problem.
    Example: "parameter 'p' must be an integer"

  - `name` (string, required)
    Name is the name of this class of errors.
    Example: "bad_request"

  - `temporary` (boolean, required)
    Is the error temporary?

  - `timeout` (boolean, required)
    Is the error a timeout?
    Example: true


