Ingest event for indicator evaluation
POST
/api/v2/events/ingest
const url = 'https://localhost:10001/api/v2/events/ingest';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"correlationId":"example","eventSubtype":"example","eventType":"indicator","indicatorId":"example","metadata":{},"payload":{},"projectId":"example","provider":"example","service":"example","source":"example","timestamp":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Event to ingest
Media type application/json
object
correlationId
string
eventSubtype
“resource_state” | etc.
string
eventType
Event metadata
string
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
Responses
Section titled “ Responses ”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"}