# policysets#list List all policy sets Endpoint: GET /pm/api/v1/policysets 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" - `searchTerm` (string) Filter results by partial name match Example: "poli" - `sort` (string) Sort order for results Enum: "name,ASC", "name,DESC", "updated,ASC", "updated,DESC" - `type` (string) Filter results by type Example: "pipeline" - `action` (string) Filter results by action Example: "onrun" - `yaml_version` (string) Harness yaml version associated with this policySet Enum: "0", "1" ## Header parameters: - `x-api-key` (string) Harness PAT key used to perform authorization Example: "Omnis vel." ## 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" - `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,"identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","project_id":"test-project","rego":"","severity":"warning","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","created":1636669297674,"identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","project_id":"test-project","rego":"","severity":"warning","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","created":1636669297674,"identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","project_id":"test-project","rego":"","severity":"warning","updated":1636669297674},{"account_id":"eBqAoNchMLKigC_qZ5EdC","created":1636669297674,"identifier":"policy-1","name":"Pipeline Approval","org_id":"test-org","project_id":"test-project","rego":"","severity":"warning","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.identifier` (string, required) identifier of the policy Example: "policy-1" - `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.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.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":"Nostrum sit aspernatur sit reiciendis.","created":7665029266794501000,"identifier":"Molestiae quam eos tempore voluptatibus est cupiditate.","name":"Dolor rerum.","org_id":"Aut impedit.","project_id":"Et iusto accusamus dolores ipsa animi sed."},{"account_id":"Nostrum sit aspernatur sit reiciendis.","created":7665029266794501000,"identifier":"Molestiae quam eos tempore voluptatibus est cupiditate.","name":"Dolor rerum.","org_id":"Aut impedit.","project_id":"Et iusto accusamus dolores ipsa animi sed."}] - `resource_groups.account_id` (string, required) resource group account id Example: "Nulla ut odio aut id consequatur et." - `resource_groups.created` (integer, required) resource group timestamp Example: 6225660903727564000 - `resource_groups.identifier` (string, required) resource group identifier Example: "Quisquam occaecati quis deleniti dolorum natus." - `resource_groups.name` (string, required) resource group name Example: "Expedita quia et sed aut." - `resource_groups.org_id` (string, required) resource group org id Example: "Tenetur quaerat necessitatibus excepturi." - `resource_groups.project_id` (string, required) resource group project identifier Example: "Earum aliquam dicta ipsum ipsum ducimus et." - `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? Example: true - `timeout` (boolean, required) Is the error a timeout? Example: true ## Response 401 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? Example: true - `timeout` (boolean, required) Is the error a timeout? Example: true ## Response 403 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? Example: true - `timeout` (boolean, required) Is the error a timeout? Example: true ## Response 404 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? Example: true - `timeout` (boolean, required) Is the error a timeout? Example: true ## Response 500 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? Example: true - `timeout` (boolean, required) Is the error a timeout? Example: true ## Response 502 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? Example: true - `timeout` (boolean, required) Is the error a timeout? Example: true