Skip to content

Ingest event for indicator evaluation

POST
/api/v2/events/ingest
curl --request POST \
--url https://localhost:10001/api/v2/events/ingest \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "correlationId": "example", "eventSubtype": "example", "eventType": "indicator", "indicatorId": "example", "metadata": {}, "payload": {}, "projectId": "example", "provider": "example", "service": "example", "source": "example", "timestamp": "example" }'

Accepts an indicator event and queues it for asynchronous indicator evaluation

Event to ingest

Media type application/json
object
correlationId
string
eventSubtype

“resource_state” | etc.

string
eventType

Event metadata

string
Allowed values: indicator
indicatorId

Project indicator fan-out routing

string
metadata
object
payload

Payload

object
projectId

Context

string
provider
string
service
string
source

“aws” | “external”

string
timestamp
string

Event accepted for processing

Media type application/json
object
declarationsCreated
Array<integer>
errors
Array<string>
evaluationsCreated
integer
eventId
string
status

“processed” | “no_route”

string
Example generated
{
"declarationsCreated": [
1
],
"errors": [
"example"
],
"evaluationsCreated": 1,
"eventId": "example",
"status": "example"
}

Bad request - Invalid event payload

Media type application/json
object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}

Unauthorized - Authentication required

Media type application/json
object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}

Forbidden - No access to project

Media type application/json
object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}

Internal server error

Media type application/json
object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}