List all policy sets
OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
curl -i -X GET \ 'https://app.harness.io/pm/api/v1/policysets?accountIdentifier=eBqAoNchMLKigC_qZ5EdC&orgIdentifier=test-org&projectIdentifier=test-project&per_page=20&page=4&identifierFilter=test-projectId1%2C%20test-projectId2&searchTerm=poli&sort=name%2CDESC&type=pipeline&action=onrun&yaml_version=0' \ -H 'x-api-key: Omnis vel.'
[- {
- "account_id": "eBqAoNchMLKigC_qZ5EdC",
- "action": "onrun",
- "created": 1636669297674,
- "description": "Captures critical production policies",
- "enabled": true,
- "entity_selector": "all_entities_in_scope",
- "identifier": "policyset-1",
- "name": "Production Policies",
- "org_id": "test-org",
- "policies": [
- {
- "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
}
], - "project_id": "test-project",
- "resource_groups": [
- {
- "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."
}, - {
- "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."
}
], - "type": "pipeline",
- "updated": 1636669297674,
- "yaml_version": "0"
}, - {
- "account_id": "eBqAoNchMLKigC_qZ5EdC",
- "action": "onrun",
- "created": 1636669297674,
- "description": "Captures critical production policies",
- "enabled": true,
- "entity_selector": "all_entities_in_scope",
- "identifier": "policyset-1",
- "name": "Production Policies",
- "org_id": "test-org",
- "policies": [
- {
- "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
}
], - "project_id": "test-project",
- "resource_groups": [
- {
- "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."
}, - {
- "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."
}
], - "type": "pipeline",
- "updated": 1636669297674,
- "yaml_version": "0"
}, - {
- "account_id": "eBqAoNchMLKigC_qZ5EdC",
- "action": "onrun",
- "created": 1636669297674,
- "description": "Captures critical production policies",
- "enabled": true,
- "entity_selector": "all_entities_in_scope",
- "identifier": "policyset-1",
- "name": "Production Policies",
- "org_id": "test-org",
- "policies": [
- {
- "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
}
], - "project_id": "test-project",
- "resource_groups": [
- {
- "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."
}, - {
- "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."
}
], - "type": "pipeline",
- "updated": 1636669297674,
- "yaml_version": "0"
}, - {
- "account_id": "eBqAoNchMLKigC_qZ5EdC",
- "action": "onrun",
- "created": 1636669297674,
- "description": "Captures critical production policies",
- "enabled": true,
- "entity_selector": "all_entities_in_scope",
- "identifier": "policyset-1",
- "name": "Production Policies",
- "org_id": "test-org",
- "policies": [
- {
- "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
}
], - "project_id": "test-project",
- "resource_groups": [
- {
- "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."
}, - {
- "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."
}
], - "type": "pipeline",
- "updated": 1636669297674,
- "yaml_version": "0"
}
]
Create a policy set
Created response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
{- "action": "onrun",
- "description": "Captures critical production policies",
- "enabled": true,
- "identifier": "policyset-1",
- "name": "Production Policies",
- "type": "pipeline",
- "yaml_version": "0"
}
{- "account_id": "eBqAoNchMLKigC_qZ5EdC",
- "action": "onrun",
- "created": 1636669297674,
- "description": "Captures critical production policies",
- "enabled": true,
- "entity_selector": "all_entities_in_scope",
- "identifier": "policyset-1",
- "name": "Production Policies",
- "org_id": "test-org",
- "policies": [
- {
- "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
}
], - "project_id": "test-project",
- "resource_groups": [
- {
- "account_id": "Qui ut rem eum similique repudiandae consequatur.",
- "created": 983020986697831200,
- "identifier": "Libero dolore in velit.",
- "name": "Quibusdam soluta officiis qui qui.",
- "org_id": "Doloribus id.",
- "project_id": "Qui quod doloremque aspernatur modi sit."
}, - {
- "account_id": "Qui ut rem eum similique repudiandae consequatur.",
- "created": 983020986697831200,
- "identifier": "Libero dolore in velit.",
- "name": "Quibusdam soluta officiis qui qui.",
- "org_id": "Doloribus id.",
- "project_id": "Qui quod doloremque aspernatur modi sit."
}, - {
- "account_id": "Qui ut rem eum similique repudiandae consequatur.",
- "created": 983020986697831200,
- "identifier": "Libero dolore in velit.",
- "name": "Quibusdam soluta officiis qui qui.",
- "org_id": "Doloribus id.",
- "project_id": "Qui quod doloremque aspernatur modi sit."
}
], - "type": "pipeline",
- "updated": 1636669297674,
- "yaml_version": "0"
}
Delete a policy set by identifier
No Content response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
curl -i -X DELETE \ 'https://app.harness.io/pm/api/v1/policysets/{identifier}?accountIdentifier=eBqAoNchMLKigC_qZ5EdC&orgIdentifier=test-org&projectIdentifier=test-project' \ -H 'x-api-key: Omnis perferendis fuga aut eum qui.'
Find a policy set by identifier
OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
curl -i -X GET \ 'https://app.harness.io/pm/api/v1/policysets/{identifier}?accountIdentifier=eBqAoNchMLKigC_qZ5EdC&orgIdentifier=test-org&projectIdentifier=test-project' \ -H 'x-api-key: Ut sit fugit officia.'
{- "account_id": "eBqAoNchMLKigC_qZ5EdC",
- "action": "onrun",
- "created": 1636669297674,
- "description": "Captures critical production policies",
- "enabled": true,
- "entity_selector": "all_entities_in_resource_groups",
- "identifier": "policyset-1",
- "name": "Production Policies",
- "org_id": "test-org",
- "policies": [
- {
- "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
}
], - "project_id": "test-project",
- "resource_groups": [
- {
- "account_id": "Qui ut rem eum similique repudiandae consequatur.",
- "created": 983020986697831200,
- "identifier": "Libero dolore in velit.",
- "name": "Quibusdam soluta officiis qui qui.",
- "org_id": "Doloribus id.",
- "project_id": "Qui quod doloremque aspernatur modi sit."
}, - {
- "account_id": "Qui ut rem eum similique repudiandae consequatur.",
- "created": 983020986697831200,
- "identifier": "Libero dolore in velit.",
- "name": "Quibusdam soluta officiis qui qui.",
- "org_id": "Doloribus id.",
- "project_id": "Qui quod doloremque aspernatur modi sit."
}, - {
- "account_id": "Qui ut rem eum similique repudiandae consequatur.",
- "created": 983020986697831200,
- "identifier": "Libero dolore in velit.",
- "name": "Quibusdam soluta officiis qui qui.",
- "org_id": "Doloribus id.",
- "project_id": "Qui quod doloremque aspernatur modi sit."
}, - {
- "account_id": "Qui ut rem eum similique repudiandae consequatur.",
- "created": 983020986697831200,
- "identifier": "Libero dolore in velit.",
- "name": "Quibusdam soluta officiis qui qui.",
- "org_id": "Doloribus id.",
- "project_id": "Qui quod doloremque aspernatur modi sit."
}
], - "type": "pipeline",
- "updated": 1636669297674,
- "yaml_version": "0"
}
Update a policy set by identifier
No Content response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
{- "action": "onrun",
- "description": "Captures critical production policies",
- "enabled": true,
- "entity_selector": "all_entities_in_scope",
- "name": "Production Policies",
- "policies": [
- {
- "identifier": "policy-1",
- "severity": "warning"
}, - {
- "identifier": "policy-1",
- "severity": "warning"
}, - {
- "identifier": "policy-1",
- "severity": "warning"
}
], - "resource_groups": [
- {
- "account_id": "Aperiam iusto ut exercitationem delectus.",
- "identifier": "Impedit et.",
- "org_id": "Aut atque necessitatibus est maxime.",
- "project_id": "Natus voluptas dolor sint."
}, - {
- "account_id": "Aperiam iusto ut exercitationem delectus.",
- "identifier": "Impedit et.",
- "org_id": "Aut atque necessitatibus est maxime.",
- "project_id": "Natus voluptas dolor sint."
}, - {
- "account_id": "Aperiam iusto ut exercitationem delectus.",
- "identifier": "Impedit et.",
- "org_id": "Aut atque necessitatibus est maxime.",
- "project_id": "Natus voluptas dolor sint."
}
], - "type": "pipeline"
}