Aida
AIDA API's for Harness OPA
Record explicit AI acceptance from UI
Harness account ID
""Example: eBqAoNchMLKigC_qZ5EdCHarness organization ID
""Example: test-orgHarness project ID
""Example: test-projectHarness PAT key used to perform authorization
Voluptas consequatur voluptas.Generated rego output
package policy ...Text query
make a policy that...No Content response.
No content
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
POST /gateway/pm/api/v1/aida/accept HTTP/1.1
Host: app.harness.io/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"output": "package policy\n...",
"prompt": "make a policy that..."
}No content
Describe Policy On Basis of rego
Harness account ID
""Example: eBqAoNchMLKigC_qZ5EdCHarness organization ID
""Example: test-orgHarness project ID
""Example: test-projectHarness PAT key used to perform authorization
Et delectus harum eius.Type of entity on which rego is written on
encryptedJsonData exampleRego Policy
query exampleOK response.
Description of Policy
Build identifier
policy examplestatus
SUCCESSBadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
POST /gateway/pm/api/v1/aida/analyze HTTP/1.1
Host: app.harness.io/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"entityType": "encryptedJsonData example",
"rego": "query example"
}{
"desc": "policy example",
"status": "SUCCESS"
}Generate Policy On Basis of free Text
Harness account ID
""Example: eBqAoNchMLKigC_qZ5EdCHarness organization ID
""Example: test-orgHarness project ID
""Example: test-projectHarness PAT key used to perform authorization
Quae ad blanditiis labore illo sed ullam.policySample Data
encryptedJsonData exampleText query
query exampleOK response.
Sample of Policy
Build identifier
policy examplestatus
SUCCESSBadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
InternalServer: Internal Server Error response.
BadGateway: Bad Gateway response.
POST /gateway/pm/api/v1/aida/generate HTTP/1.1
Host: app.harness.io/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"policyData": "encryptedJsonData example",
"query": "query example"
}{
"policy": "policy example",
"status": "SUCCESS"
}Last updated
Was this helpful?