Pause, Resume, Stop
Three requests change the state of a pipe. They share the same format.
POST /public/v1/pipes/{id}/pause
Pauses a running pipe. The pipe commits its position and stops reading. It goes on from there when it is resumed.
POST /public/v1/pipes/{id}/resume
Lets a paused or failed pipe go on where it left off.
POST /public/v1/pipes/{id}/stop
Ends a pipe for good. A stopped pipe cannot be started again.
Request
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | string (UUID) | Identifier of the pipe | Yes |
The requests have no body parameters. Send the header Content-Type: application/json and an empty JSON object.
Allowed States
| Request | The pipe must be | Afterwards it is |
|---|---|---|
pause | RUNNING | PAUSED |
resume | PAUSED or FAILED | RUNNING |
stop | RUNNING, PAUSED or FAILED | STOPPED |
Example Request
curl --location --request POST 'https://your-instance.com/public/v1/pipes/4551b12c-e35d-4d79-b6b4-5cb04cdf8f6a/pause' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your-api-key>' \
--data-raw '{}'
Response
HTTP Status Code: 200 OK
Response Body: the pipe object in its new state.
{
"id": "4551b12c-e35d-4d79-b6b4-5cb04cdf8f6a",
"name": "Fix account ids",
"state": "PAUSED",
"stateDetail": "Paused by ada",
"...": "..."
}
A pipe reacts within a few seconds: a paused pipe finishes the records it is working on and commits its position; a resumed pipe is picked up by one of the Kadeck nodes.
Possible Errors
| Status Code | Description | Solution |
|---|---|---|
| 400 | The request is not possible in the state of the pipe, for example resuming a stopped pipe | Read the state with Get a pipe |
| 401 | Unauthorized | Check your API key |
| 403 | The API key may see the pipe but lacks the right to manage it | It needs to read the source topic and write the target topic |
| 404 | The pipe does not exist or is not visible to the API key | Check the id |
Best Practices
- Pause instead of stop when a pipe should go on later, for example during a maintenance window of the target cluster.
- After a failure, fix the cause first and then resume: the pipe repeats the records since its last committed position, so none is left out.
- To run a stopped or completed pipe again, create a new pipe with the same settings.