Code pipeline runs
14 calls. Every request needs the Authorization header: see the overview.
pipelineRuns.list
Section titled “pipelineRuns.list”GET /code-pipelines/processesEvery pipeline run of the tenant (unbounded; prefer runs.list({ types: ["CodePipeline"] })).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: CodePipelineProcess[] (200)
curl -X GET "https://api.maitento.com/code-pipelines/processes" \ -H "Authorization: $MAITENTO_AUTH"const runs = await mt.pipelineRuns.list();mt.pipeline_runs.list()pipelineRuns.listActive
Section titled “pipelineRuns.listActive”GET /code-pipelines/processes/aliveEvery pipeline run that has not finished.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: CodePipelineProcess[] (200)
curl -X GET "https://api.maitento.com/code-pipelines/processes/alive" \ -H "Authorization: $MAITENTO_AUTH"const active = await mt.pipelineRuns.listActive();mt.pipeline_runs.list_active()pipelineRuns.get
Section titled “pipelineRuns.get”GET /code-pipelines/processes/by-id/{id}The run with this id. Throws NotFoundError when there is none.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: CodePipelineProcess (200)
curl -X GET "https://api.maitento.com/code-pipelines/processes/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH"const run = await mt.pipelineRuns.get("aa11bb22-cc33-4d44-8e55-ff6677889900");mt.pipeline_runs.get("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f")pipelineRuns.answer
Section titled “pipelineRuns.answer”POST /code-pipelines/processes/by-id/{id}/answerAnswers the question a run is waiting on.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: CodePipelineProcessAnswerRequest
| Field | Type | Required | Description |
|---|---|---|---|
requestId | uuid | yes | The question’s id, from the step’s humanInteractionRequests. |
answer | string | yes | The answer: one of the suggested answers, or your own. |
Response: no body (204)
curl -X POST "https://api.maitento.com/code-pipelines/processes/by-id/<id>/answer" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"requestId":"...","answer":"..."}'await mt.pipelineRuns.answer("aa11bb22-cc33-4d44-8e55-ff6677889900", { requestId: "3e4f5a6b-7c8d-4e9f-a0b1-c2d3e4f5a6b7", answer: "Use the v2 API." });mt.pipeline_runs.answer("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f", "d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f6a", "Use PostgreSQL.")pipelineRuns.updateCredentials
Section titled “pipelineRuns.updateCredentials”PUT /code-pipelines/processes/by-id/{id}/credentialsReplaces the run’s engine credentials (each type discriminator is sent first).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: CodePipelineProcessCredentialsInput[]
Response: no body (204)
curl -X PUT "https://api.maitento.com/code-pipelines/processes/by-id/<id>/credentials" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '[{"type":"apiKey","apiKey":"...","baseUrl":"...","hostingMode":"...","modelNameOverrides":{},"boundModel":"...","contextWindowTokens":0,"awsRegion":"...","gcpProjectId":"...","gcpRegion":"...","engine":"Claude","credentialId":"...","isOwnLicense":false,"priority":0,"billingMode":"..."}]'await mt.pipelineRuns.updateCredentials("aa11bb22-cc33-4d44-8e55-ff6677889900", [{ type: "apiKey", engine: "Codex", apiKey: process.env.OPENAI_API_KEY!, isOwnLicense: true }]);mt.pipeline_runs.update_credentials("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f", [{"type": "apiKey", "engine": "Codex", "apiKey": os.environ["OPENAI_API_KEY"]}])pipelineRuns.diff
Section titled “pipelineRuns.diff”GET /code-pipelines/processes/by-id/{id}/diffThe run’s diff so far, or null when there is none yet.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: CodePipelineProcessDiff (200)
curl -X GET "https://api.maitento.com/code-pipelines/processes/by-id/<id>/diff" \ -H "Authorization: $MAITENTO_AUTH"const diff = await mt.pipelineRuns.diff("aa11bb22-cc33-4d44-8e55-ff6677889900");mt.pipeline_runs.diff("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f")pipelineRuns.rawDiff
Section titled “pipelineRuns.rawDiff”GET /code-pipelines/processes/by-id/{id}/diff/rawThe run’s raw unified diff, or null when there is none yet.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: CodePipelineProcessDiffRaw (200)
curl -X GET "https://api.maitento.com/code-pipelines/processes/by-id/<id>/diff/raw" \ -H "Authorization: $MAITENTO_AUTH"const raw = await mt.pipelineRuns.rawDiff("aa11bb22-cc33-4d44-8e55-ff6677889900");mt.pipeline_runs.raw_diff("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f")pipelineRuns.kill
Section titled “pipelineRuns.kill”PUT /code-pipelines/processes/by-id/{id}/killKills the run.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: no body (204)
curl -X PUT "https://api.maitento.com/code-pipelines/processes/by-id/<id>/kill" \ -H "Authorization: $MAITENTO_AUTH"await mt.pipelineRuns.kill("aa11bb22-cc33-4d44-8e55-ff6677889900");mt.pipeline_runs.kill("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f")pipelineRuns.payloads
Section titled “pipelineRuns.payloads”POST /code-pipelines/processes/by-id/{id}/payloads/by-idsFull tool-use and context-entry payloads by id (an unknown run answers empty lists).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: CodePipelineProcessPayloadsByIdsRequest
| Field | Type | Required | Description |
|---|---|---|---|
toolUseIds | uuid[] | The ids of the tool calls to fetch. At most 500; ask for more in further requests. Send an empty array for none. | |
contextEntryIds | uuid[] | The ids of the transcript entries to fetch. At most 500; ask for more in further requests. Send an empty array for none. |
Response: CodePipelineProcessPayloadsResponse (200)
curl -X POST "https://api.maitento.com/code-pipelines/processes/by-id/<id>/payloads/by-ids" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"toolUseIds":[],"contextEntryIds":[]}'const payloads = await mt.pipelineRuns.payloads("aa11bb22-cc33-4d44-8e55-ff6677889900", { toolUseIds: ["6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d"], contextEntryIds: [] });mt.pipeline_runs.payloads("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f", tool_use_ids=["e3f4a5b6-c7d8-4e9f-8a0b-1c2d3e4f5a6b"])pipelineRuns.stepPayloads
Section titled “pipelineRuns.stepPayloads”GET /code-pipelines/processes/by-id/{id}/payloads/steps/{stepExecutionId}The payloads of one step execution.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
stepExecutionId | uuid | yes |
Response: CodePipelineProcessPayloadsResponse (200)
curl -X GET "https://api.maitento.com/code-pipelines/processes/by-id/<id>/payloads/steps/<stepExecutionId>" \ -H "Authorization: $MAITENTO_AUTH"const payloads = await mt.pipelineRuns.stepPayloads("aa11bb22-cc33-4d44-8e55-ff6677889900", "5d6e7f80-91a2-4b3c-8d4e-5f60718293a4");mt.pipeline_runs.step_payloads("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f", "f4a5b6c7-d8e9-4f0a-9b1c-2d3e4f5a6b7c")pipelineRuns.updateRepos
Section titled “pipelineRuns.updateRepos”PUT /code-pipelines/processes/by-id/{id}/reposReplaces the run’s repos (each type discriminator is sent first).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: CodePipelineProcessRepoInput[]
Response: no body (204)
curl -X PUT "https://api.maitento.com/code-pipelines/processes/by-id/<id>/repos" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '[{"type":"http","url":"...","credentials":"...","name":"...","branchSource":"...","branchWork":"...","mcpServer":{},"resolvedCommitSha":"...","runBaseCommitSha":"...","finalCommitSha":"...","dateLastCommitUtc":"2026-01-01T00:00:00Z"}]'await mt.pipelineRuns.updateRepos("aa11bb22-cc33-4d44-8e55-ff6677889900", [{ type: "http", name: "app", url: "https://github.com/acme/app.git", credentials: process.env.GIT_TOKEN!, branchSource: "main", branchWork: "fix/login" }]);mt.pipeline_runs.update_repos("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f", [{"type": "http", "name": "app", "url": "https://github.com/acme/app.git", "branchSource": "main", "branchWork": "maitento/health-check"}])pipelineRuns.restart
Section titled “pipelineRuns.restart”PUT /code-pipelines/processes/by-id/{id}/restartStarts a NEW run from this one’s context. Never retried.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: CodePipelineProcess (200)
curl -X PUT "https://api.maitento.com/code-pipelines/processes/by-id/<id>/restart" \ -H "Authorization: $MAITENTO_AUTH"const next = await mt.pipelineRuns.restart("aa11bb22-cc33-4d44-8e55-ff6677889900");mt.pipeline_runs.restart("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f")pipelineRuns.resume
Section titled “pipelineRuns.resume”PUT /code-pipelines/processes/by-id/{id}/resumeResumes a stopped run where it left off.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: no body (204)
curl -X PUT "https://api.maitento.com/code-pipelines/processes/by-id/<id>/resume" \ -H "Authorization: $MAITENTO_AUTH"await mt.pipelineRuns.resume("aa11bb22-cc33-4d44-8e55-ff6677889900");mt.pipeline_runs.resume("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f")pipelineRuns.resumeWithPrompt
Section titled “pipelineRuns.resumeWithPrompt”PUT /code-pipelines/processes/by-id/{id}/resume-with-promptResumes a run with a continuation prompt. Returns the run as it was before the update: re-read it.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: CodePipelineProcessResumeWithPromptRequest
| Field | Type | Required | Description |
|---|---|---|---|
continuationPrompt | string | yes | What to tell the agent, for example what went wrong and how to carry on. |
credentials | CodePipelineProcessCredentialsInput[] | null | New credentials for the run’s engines, to replace the ones it started with, for example when a token has expired. Null or empty: keep the run’s credentials. | |
credentialStack | string | null | A credential stack (name or id) to run on from here, snapshotted now, in place of the credentials or stack the run started with. Not with credentials. Null: keep the run’s stack. Sending credentials instead moves the run off its stack and onto them. | |
repos | CodePipelineProcessRepoInput[] | null | New repositories, with fresh git credentials, to replace the ones the run started with, for example when a short-lived token has expired. Null or empty: keep the run’s repositories. |
Response: CodePipelineProcess (200)
curl -X PUT "https://api.maitento.com/code-pipelines/processes/by-id/<id>/resume-with-prompt" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"continuationPrompt":"..."}'await mt.pipelineRuns.resumeWithPrompt("aa11bb22-cc33-4d44-8e55-ff6677889900", { continuationPrompt: "Also add a regression test." });mt.pipeline_runs.resume_with_prompt("b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f", continuation_prompt="Also add a test for it.")