aida

AIDA API's for Harness OPA

aida#analyze

Describe Policy On Basis of rego

Request
query Parameters
accountIdentifier
string
Default: ""

Harness account ID

Example: accountIdentifier=eBqAoNchMLKigC_qZ5EdC
orgIdentifier
string
Default: ""

Harness organization ID

Example: orgIdentifier=test-org
projectIdentifier
string
Default: ""

Harness project ID

Example: projectIdentifier=test-project
header Parameters
x-api-key
string

Harness PAT key used to perform authorization

Example: Fugit molestiae harum nesciunt non.
Request Body schema: application/json
required
entityType
string

Type of entity on which rego is written on

rego
string

Rego Policy

Responses
200

OK response.

400

BadRequest: Bad Request response.

401

Unauthorized: Unauthorized response.

403

Forbidden: Forbidden response.

404

NotFound: Not Found response.

500

InternalServer: Internal Server Error response.

502

BadGateway: Bad Gateway response.

post/pm/api/v1/aida/analyze
Request samples
application/json
{
  • "entityType": "encryptedJsonData example",
  • "rego": "query example"
}
Response samples
application/json
{
  • "desc": "policy example",
  • "status": "SUCCESS"
}

aida#generate

Generate Policy On Basis of free Text

Request
query Parameters
accountIdentifier
string
Default: ""

Harness account ID

Example: accountIdentifier=eBqAoNchMLKigC_qZ5EdC
orgIdentifier
string
Default: ""

Harness organization ID

Example: orgIdentifier=test-org
projectIdentifier
string
Default: ""

Harness project ID

Example: projectIdentifier=test-project
header Parameters
x-api-key
string

Harness PAT key used to perform authorization

Example: Sapiente rerum excepturi ut omnis deleniti.
Request Body schema: application/json
required
policyData
string

policySample Data

query
string

Text query

Responses
200

OK response.

400

BadRequest: Bad Request response.

401

Unauthorized: Unauthorized response.

403

Forbidden: Forbidden response.

404

NotFound: Not Found response.

500

InternalServer: Internal Server Error response.

502

BadGateway: Bad Gateway response.

post/pm/api/v1/aida/generate
Request samples
application/json
{
  • "policyData": "encryptedJsonData example",
  • "query": "query example"
}
Response samples
application/json
{
  • "policy": "policy example",
  • "status": "SUCCESS"
}