Policy & Governance
Retrieves insights for a specific account with optional filtering and field projection
JWT authentication token
Comma-separated list of fields to include in the response
id,name,description,statusSearch query string
Labels for filtering insights
Comma-separated labels
security,complianceArray of labels
["security","compliance"]Array of framework filters
Category filter
Default filter flag
Filter for subscribed insights only
falseFilter for production insights only
falseFilter for insights with matching assets
falseFilter for enabled insights only
falseFilter for available providers only
trueShow exclusion rules
falseArray of type filters
Array of provider filters
Array of integration filters
Array of specific insight ID filters or null
Array of specific insight ID filters
["665088e83438d32bdda77193","661bf411f3a3638decfea721"]No ID filter applied
Page number for pagination
1Number of items per page
50Array of sorting criteria
Array of provider account filters
["awsobjects","k8sobjects","akamaiobjects","datadogobjects","oktaobjects","githubobjects","newrelicobjects","cloudflareobjects","gcpobjects","pagerdutyobjects","mongodbatlasobjects","azurermobjects","aws","kubernetes","akamai","datadog","okta","github","newrelic","cloudflare","google","pagerduty","mongodbatlas","azurerm"]Insights retrieved successfully
Bad request - missing required parameters
Unauthorized
Internal server error
POST /v2/governance/insights HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 740
{
"query": "",
"labels": "security,compliance",
"frameworks": [],
"category": "",
"isDefault": null,
"onlySubscribed": false,
"onlyProduction": false,
"onlyMatchingAssets": false,
"onlyEnabled": false,
"onlyAvailableProviders": true,
"showExclusion": false,
"type": [],
"providers": [],
"integrations": [],
"severity": [
"text"
],
"id": [
"665088e83438d32bdda77193",
"661bf411f3a3638decfea721"
],
"page": 1,
"page_size": 50,
"sorting": [],
"providersAccounts": [
"awsobjects",
"k8sobjects",
"akamaiobjects",
"datadogobjects",
"oktaobjects",
"githubobjects",
"newrelicobjects",
"cloudflareobjects",
"gcpobjects",
"pagerdutyobjects",
"mongodbatlasobjects",
"azurermobjects",
"aws",
"kubernetes",
"akamai",
"datadog",
"okta",
"github",
"newrelic",
"cloudflare",
"google",
"pagerduty",
"mongodbatlas",
"azurerm"
]
}{
"data": [
{}
],
"total": 1,
"page": 1,
"page_size": 1
}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.
JWT authentication token
Name of the insight
Description of the insight
Rego code for the insight rule (can be base64 encoded)
ZmlyZWZseSB7CiAgICBtYXRjaAp9CgptYXRjaCB7CiAgICBpbnB1dC5iYXRjaF90YXJnZXQgPT0gInRlc3QiCn0=Array of insight types
["aws_cloudwatch_event_target"]Array of provider IDs this insight applies to
["aws_all","6616a2dbf4992fc0bab0463f"]Labels for the insight
Comma-separated labels
security,complianceArray of labels
["security","compliance"]Severity level of the insight
Category of the insight
MisconfigurationArray of compliance frameworks this insight relates to
["SOC2"]Insight created successfully
Bad request - missing required parameters (name, code, type, providerIds), empty field values, or invalid Rego rule
Unauthorized
Internal server error
POST /v2/governance/insights/create HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 322
{
"name": "text",
"description": "text",
"code": "ZmlyZWZseSB7CiAgICBtYXRjaAp9CgptYXRjaCB7CiAgICBpbnB1dC5iYXRjaF90YXJnZXQgPT0gInRlc3QiCn0=",
"type": [
"aws_cloudwatch_event_target"
],
"providerIds": [
"aws_all",
"6616a2dbf4992fc0bab0463f"
],
"labels": "security,compliance",
"severity": 1,
"category": "Misconfiguration",
"frameworks": [
"SOC2"
]
}{
"id": "text",
"name": "text",
"description": "text",
"code": "text",
"type": [
"text"
],
"providerIds": [
"text"
],
"labels": "security,compliance",
"severity": "text",
"category": "text",
"frameworks": [
"text"
]
}Updates an existing insight with the provided configuration. The endpoint validates required fields (name, code, type, providerIds) and tests the Rego code for validity before updating.
JWT authentication token
The ID of the insight to update
Name of the insight
Description of the insight
Rego code for the insight rule (can be base64 encoded)
ZmlyZWZseSB7CiAgICBtYXRjaAp9CgptYXRjaCB7CiAgICBpbnB1dC5iYXRjaF90YXJnZXQgPT0gInRlc3QiCn0=Array of insight types
["aws_cloudwatch_event_target"]Array of provider IDs this insight applies to
["aws_all","6616a2dbf4992fc0bab0463f"]Labels for the insight
Comma-separated labels
security,complianceArray of labels
["security","compliance"]Severity level of the insight
Category of the insight
MisconfigurationArray of compliance frameworks this insight relates to
["SOC2"]Insight updated successfully
Bad request - missing required parameters (name, code, type, providerIds), empty field values, or invalid Rego rule
Unauthorized
Insight not found
Internal server error
PUT /v2/governance/insights/{id} HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 322
{
"name": "text",
"description": "text",
"code": "ZmlyZWZseSB7CiAgICBtYXRjaAp9CgptYXRjaCB7CiAgICBpbnB1dC5iYXRjaF90YXJnZXQgPT0gInRlc3QiCn0=",
"type": [
"aws_cloudwatch_event_target"
],
"providerIds": [
"aws_all",
"6616a2dbf4992fc0bab0463f"
],
"labels": "security,compliance",
"severity": 1,
"category": "Misconfiguration",
"frameworks": [
"SOC2"
]
}{
"id": "text",
"name": "text",
"description": "text",
"code": "text",
"type": [
"text"
],
"providerIds": [
"text"
],
"labels": "security,compliance",
"severity": "text",
"category": "text",
"frameworks": [
"text"
]
}Deletes a specific insight by ID
JWT authentication token
The ID of the insight to delete
Insight deleted successfully
Bad request - missing required parameters
Unauthorized
Insight not found
Internal server error
DELETE /v2/governance/insights/{id} HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?

