Evaluate arbitrary rego
OK response.
PolicySetNotFound: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
{- "input": {
- "message": "everyone"
}, - "rego": "package test\ndeny[\"should say hello world\"] {input.message != \"world\"}"
}
{- "deny_messages": [
- "deployment stage 'example-stage' does not have a HarnessApproval step",
- "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
], - "error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
- "output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
- "policy": {
- "account_id": "eBqAoNchMLKigC_qZ5EdC",
- "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",
- "project_id": "test-project",
- "rego": "",
- "updated": 1636669297674
}, - "status": "error"
}