Skip to main content
POST
/
events
/
correction
Correct an ingested event
curl --request POST \
  --url https://api.togai.com/events/correction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": {
    "schemaName": "<string>",
    "timestamp": "2022-06-15T07:30:35.123",
    "accountId": 1,
    "attributes": [
      {
        "name": "message",
        "value": 100,
        "unit": "characters"
      }
    ],
    "dimensions": {},
    "id": "c0b1306d-f506-43a6-856b-69221efaee6b"
  }
}
'
{
  "data": [
    {
      "referenceId": "<string>",
      "eventPayload": {
        "schemaName": "<string>",
        "timestamp": "2022-06-15T07:30:35.123",
        "accountId": 1,
        "attributes": [
          {
            "name": "message",
            "value": 100,
            "unit": "characters"
          }
        ],
        "dimensions": {},
        "id": "c0b1306d-f506-43a6-856b-69221efaee6b"
      },
      "ingestionStatus": {
        "status": "INGESTION_COMPLETED",
        "statusDescription": "Ingestion Completed successfully"
      },
      "createdAt": "2022-06-15T07:30:35.123",
      "status": "REVERTED",
      "reason": "<string>",
      "customerId": "1",
      "source": {
        "id": "<string>",
        "type": "<string>"
      }
    }
  ]
}

Query Parameters: Allowed filter combinations

All matching events will be considered for correction
  • Sync mode: Maximum of first 30 events matching the filters with the default sort order being EVENT_SOURCE_TIME DESC, EVENT_ID ASC can be corrected in a single request.
  • Async mode: When query parameter async = true is given, events matching the filters will be considered for correction and takes place in background.
    Status of background job can be obtained using List Jobs API
account_id
string
required
Unique identifier of the account corresponding to the event
id
string
Unique identifier of an event generated by Togai for reference
event_id
string
Identifier of an event provided by the user
event_source_time
string
Timestamp of an event provided by the user
created_at
string
Timestamp corresponding to the event ingestion time in Togai
async
boolean
Determines the mode of the correction. Defaults to false
account_idaccount_id, idaccount_id, event_idaccount_id, event_source_timeaccount_id, event_id, created_ataccount_id, event_id, event_source_time

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

action
enum<string>
required

Action to perform in event correction

Available options:
UNDO,
REDO,
REDO_EVENT
Example:

"UNDO"

require_confirmation
boolean

Specifies whether to start a migration only after a confirmation

Example:

false

Body

application/json

Event Correction Payload for event correction

event
object

Contents of the event

Response

Success response

Events Correction response

data
object[]
required
Required array length: 1 - 50 elements