latestOpenAPI 3.0.32026-08-10152216352.3 KB

eea119b4113f

Governance

Create a new Insight

Creates a new insight with the provided configuration. The endpoint validates required fields (name, code, type, providerIds, category) and tests the Rego code for validity before creation.

post/governance/insights/create

Request body

namestring required

Name of the insight

descriptionstring

Description of the insight

codestring required

Rego code for the insight rule (can be base64 encoded)

typestring[] required

Array of insight types

providerIdsstring[] required

Array of provider IDs this insight applies to

severityinteger

Severity level of the insight

categorystring required

Category of the insight

frameworksstring[]

Array of compliance frameworks this insight relates to

Example request

{
  "code": "ZmlyZWZseSB7CiAgICBtYXRjaAp9CgptYXRjaCB7CiAgICBpbnB1dC5iYXRjaF90YXJnZXQgPT0gInRlc3QiCn0=",
  "type": [
    "aws_cloudwatch_event_target"
  ],
  "providerIds": [
    "aws_all",
    "6616a2dbf4992fc0bab0463f"
  ],
  "labels": "security,compliance",
  "category": "Misconfiguration",
  "frameworks": [
    "SOC2",
    "ISO27001"
  ]
}

Response

Insight created successfully

idstring

The ID of the created insight

namestring

Name of the insight

descriptionstring

Description of the insight

codestring

Rego code for the insight rule

typestring[]

Array of insight types

providerIdsstring[]

Array of provider IDs

severitystring

Severity level

categorystring

Category

frameworksstring[]

Array of compliance frameworks

Example response

{
  "labels": "security,compliance"
}