Reset a data stream

Changed on

Asynchronously wipes all records on the stream while preserving stream config, property definitions, and reconciliation links. Always async. Poll the returned operation.

Completion is verified. The operation reaches completed only after the stream is confirmed empty in the primary database, with records_remaining set to 0. Records that land while the reset is running are swept up a bounded number of times; if any survive, the operation ends failed with records_remaining greater than 0 and an error_message asking you to stop ingestion and retry. Do not reload data onto the stream until you observe completed.

post/data_streams/{key}/reset

Request

  • Base URL
    https://api.endclose.com/v1
  • Auth
    API key in header X-API-KEY

Path parameters

keystring required

The immutable data stream key

Response

Reset accepted. Poll GET /data_streams/{key}/operations/{id} (also set in the Location header).

idstring uuid
data_stream_idstring uuid
data_stream_keystring
kind'delete' | 'reset'
status'pending' | 'running' | 'completed' | 'failed'
progressinteger

Percentage 0-100

error_messagestring nullable
records_remaininginteger nullable

Number of records still on the stream when the operation reached a terminal state, counted in the primary database (not the analytics mirror behind records_count, which can lag). 0 on completed; greater than 0 on a failed operation that left records behind; null while pending or running. After a reset, trust this field rather than re-listing /records.

started_atstring date-time nullable
completed_atstring date-time nullable
created_atstring date-time
requested_by_user_idstring uuid nullable

Changes

    • breaking

      the response's property type changed from integer to string, and format from no format to uuid for status

    • breaking

      the response's property type changed from integer to string, and format from no format to uuid for status

    • breaking

      the response's property type changed from integer to string, and format from no format to uuid for status

    • info

      added the optional property to the response with the status