Pipelines
Run agents in a fixed order, as one run.
A pipeline runs its agents one after another. Each stage starts only when the previous stage succeeds; if a stage fails, the chain stops there, so nothing downstream runs on a broken result.
Stages don't pass data to each other
Each stage runs with its agent's default inputs. A pipeline sequences agents; it doesn't feed one stage's output into the next stage's inputs.
List pipelines
/ api/ pipelines/ api/ pipelines/ {id}One pipeline, with its steps in order. Each step has its sortOrder, scraperAgentId, and externalAgentId.
| Field | Meaning |
|---|---|
isActive | false when the pipeline is disabled and can't be run. |
stepCount, steps | The agents in the chain, in order. |
activeRunCount | Runs of this pipeline still in progress. |
lastRunStatus, lastRunAt | The latest run's status and when it started. null if it has never run. |
canManage | Whether you can edit or delete it — true for pipelines you created. |
Run a pipeline
/ api/ pipelines/ {pipelineId}/ runcurl -X POST "$NEXQDATA_API/api/pipelines/$PIPELINE_ID/run" \
-H "X-Api-Key: $NEXQDATA_API_KEY"{
"success": true,
"message": "Pipeline started — running 4 agents in order.",
"data": {
"pipelineRunId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"stepCount": 4
}
}You get 403 FORBIDDEN if the pipeline includes an agent that isn't assigned to you.
Follow a pipeline run
/ api/ pipelines/ runs/ {pipelineRunId}| Field | Meaning |
|---|---|
status | Running, Completed, or Failed. |
currentStepIndex, stepCount | Which stage is running, out of how many. |
startedAt, finishedAt | When the run started and ended. |
steps | One entry per stage, with its status, error, and the agentJobHistoryId it started. |
Each stage reports Pending, Running, Succeeded, Failed, or Skipped (for stages after a failure).
List pipeline runs
/ api/ pipelines/ runsYour past pipeline runs, newest first. This list is paged by page number.
| Query parameter | Default | Description |
|---|---|---|
pipelineId | — | Only this pipeline's runs. |
status | all | Running, Completed, or Failed. |
q | — | Matches the pipeline name or the run id. |
from, to | — | Only runs started in this date range. |
page, pageSize | 1, 25 | pageSize up to 100. |
The response has items, total, and metrics — total, completed, inProgress, and issues across all your pipeline runs.
Download the results
/ api/ pipelines/ runs/ {pipelineRunId}/ exportOne zip containing every stage's output.
Create and manage pipelines
You can build pipelines from the agents assigned to you, and edit or delete the pipelines you created. Pipelines set up for you by NexqData can be run but not changed — for those, canManage is false and edits return 404.
/ api/ pipelines{
"name": "Licence check, then court records",
"description": "Stops if the licence lookup fails.",
"agentIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"3fa85f64-5717-4562-b3fc-2c963f66afa7"
]
}agentIds are agent ids (GUIDs), in the order the stages run. A pipeline can have up to 25 stages, and each agent can appear only once. Breaking either rule, or including an agent that isn't assigned to you, returns 400.
| Endpoint | Does |
|---|---|
PUT /api/pipelines/{id} | Change name or description, or disable the pipeline with isActive: false. Fields you leave out stay as they are. |
PUT /api/pipelines/{id}/steps | Replace the chain with { "agentIds": [...] }, in order. |
DELETE /api/pipelines/{id} | Delete the pipeline. Its past runs are kept. |
DELETE /api/pipelines/runs/{pipelineRunId} | Delete one of your pipeline runs, with its jobs and run history. |
Deleting a run is permanent
Deleting a pipeline run removes its jobs and run history, and it can't be undone.