Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Aida

AIDA API's for Harness OPA

post

Record explicit AI acceptance from UI

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdentifierstringOptional

Harness account ID

Default: ""Example: eBqAoNchMLKigC_qZ5EdC
orgIdentifierstringOptional

Harness organization ID

Default: ""Example: test-org
projectIdentifierstringOptional

Harness project ID

Default: ""Example: test-project
Header parameters
x-api-keystringOptional

Harness PAT key used to perform authorization

Example: Voluptas consequatur voluptas.
Body
outputstringOptional

Generated rego output

Example: package policy ...
promptstringOptional

Text query

Example: make a policy that...
Responses
204

No Content response.

No content

post/api/v1/aida/accept
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

post

Describe Policy On Basis of rego

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdentifierstringOptional

Harness account ID

Default: ""Example: eBqAoNchMLKigC_qZ5EdC
orgIdentifierstringOptional

Harness organization ID

Default: ""Example: test-org
projectIdentifierstringOptional

Harness project ID

Default: ""Example: test-project
Header parameters
x-api-keystringOptional

Harness PAT key used to perform authorization

Example: Et delectus harum eius.
Body
entityTypestringOptional

Type of entity on which rego is written on

Example: encryptedJsonData example
regostringOptional

Rego Policy

Example: query example
Responses
200

OK response.

application/json

Description of Policy

descstringRequired

Build identifier

Example: policy example
statusstringRequired

status

Example: SUCCESS
post/api/v1/aida/analyze
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"
}
post

Generate Policy On Basis of free Text

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdentifierstringOptional

Harness account ID

Default: ""Example: eBqAoNchMLKigC_qZ5EdC
orgIdentifierstringOptional

Harness organization ID

Default: ""Example: test-org
projectIdentifierstringOptional

Harness project ID

Default: ""Example: test-project
Header parameters
x-api-keystringOptional

Harness PAT key used to perform authorization

Example: Quae ad blanditiis labore illo sed ullam.
Body
policyDatastringOptional

policySample Data

Example: encryptedJsonData example
querystringOptional

Text query

Example: query example
Responses
200

OK response.

application/json

Sample of Policy

policystringRequired

Build identifier

Example: policy example
statusstringRequired

status

Example: SUCCESS
post/api/v1/aida/generate
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?