Event Management
Undo ingested events.
This API lets you to revert the changes caused by events.
- Usages: Reduction of all usages associated with this event
- Revenue: Reduction of all revenues associated with this event
- Entitlements: Entitlements(Feature Credits) consumed by this event are granted back to the account.
DELETE
/
events
curl --request DELETE \
--url https://api.togai.com/events \
--header 'Authorization: <authorization>'
{
"data": [
{
"referenceId": "event.21OpEx4DHQu.CZlyh",
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "travelCompletedEvent",
"id": "c0b1306d-f506-43a6-856b-69221efaee6b",
"accountId": "1",
"attributes": [
{
"name": "distanceTravelled",
"value": 50,
"unit": "Miles"
},
{
"name": "timeSpent",
"value": 60,
"unit": "Minutes"
}
],
"dimensions": {
"location": "Seattle",
"costCenterCode": 1234,
"travelType": "Business"
}
},
"ingestionStatus": {
"status": "INGESTION_COMPLETED_EVENT_NOT_BILLED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
},
"customerId": "CUS0001",
"source": {
"id": "ENTITLED",
"type": "ENTITLED"
},
"createdAt": "2023-02-23T14:25:10Z",
"status": "REVERTED",
"reason": "Event Reverted"
},
{
"referenceId": "event.23OrTx4FGQu.XVpzf",
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "smsSentEvent",
"id": "sdvb325j-f506-43a6-856b-69221efaee6b",
"accountId": "1",
"attributes": [
{
"name": "smsCount",
"value": 50,
"unit": "count"
}
]
},
"ingestionStatus": {
"status": "INGESTION_COMPLETED_EVENT_NOT_BILLED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
},
"customerId": "CUS0001",
"source": {
"id": "",
"type": ""
},
"createdAt": "2023-01-01T14:25:10Z",
"status": "FAILED",
"reason": "Event was ingested in past pricing cycle"
}
]
}
Query Parameters: Allowed filter combinations
All matching events will be considered for deletion
Maximum of 5 events will be deleted per request. This behavior might change in future
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200 - application/json
data
object[]
requiredcurl --request DELETE \
--url https://api.togai.com/events \
--header 'Authorization: <authorization>'
{
"data": [
{
"referenceId": "event.21OpEx4DHQu.CZlyh",
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "travelCompletedEvent",
"id": "c0b1306d-f506-43a6-856b-69221efaee6b",
"accountId": "1",
"attributes": [
{
"name": "distanceTravelled",
"value": 50,
"unit": "Miles"
},
{
"name": "timeSpent",
"value": 60,
"unit": "Minutes"
}
],
"dimensions": {
"location": "Seattle",
"costCenterCode": 1234,
"travelType": "Business"
}
},
"ingestionStatus": {
"status": "INGESTION_COMPLETED_EVENT_NOT_BILLED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
},
"customerId": "CUS0001",
"source": {
"id": "ENTITLED",
"type": "ENTITLED"
},
"createdAt": "2023-02-23T14:25:10Z",
"status": "REVERTED",
"reason": "Event Reverted"
},
{
"referenceId": "event.23OrTx4FGQu.XVpzf",
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "smsSentEvent",
"id": "sdvb325j-f506-43a6-856b-69221efaee6b",
"accountId": "1",
"attributes": [
{
"name": "smsCount",
"value": 50,
"unit": "count"
}
]
},
"ingestionStatus": {
"status": "INGESTION_COMPLETED_EVENT_NOT_BILLED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
},
"customerId": "CUS0001",
"source": {
"id": "",
"type": ""
},
"createdAt": "2023-01-01T14:25:10Z",
"status": "FAILED",
"reason": "Event was ingested in past pricing cycle"
}
]
}