Skip to content

Runs (all kinds)

9 calls. Every request needs the Authorization header: see the overview.

GET /processes

Runs, newest first, as compact summaries. Await it for the first page, or iterate every run: for await (const run of mt.runs.list({ state: "Active" })) { … }.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Query parameters

NameTypeRequiredDescription
idsstringCSV of process ids (at most 50): only these runs, whatever their type. Combines with every other filter. Unknown ids, and ids of another tenant’s runs, are simply absent from the page.
typesstringCSV of App|Interaction|Capsule|CodePipeline (case-insensitive). Empty means all four.
statestringactive|waiting|terminal (case-insensitive).
statusesstringCSV of raw, type-specific status names (case-insensitive), e.g. Running,PendingApproval.
definitionIduuidOnly runs of this interaction, app, capsule or code pipeline (its id).
namespaceIduuidRuns of any definition in this namespace.
namespacestring[]Namespace names — repeatable (namespace=a&namespace=b), and each value may also be a CSV: runs of any definition in any of them, including deleted definitions. Names are exact (case-sensitive) and resolved in your tenant only; a name that matches no namespace there matches nothing — if no name matches, the page is empty. At most 50 distinct names. Combines with namespaceId (AND).
rootProcessIduuidOnly the runs in this run’s tree: the runs whose rootProcessId is this.
parentProcessIduuidOnly the runs this run started directly: the runs whose parentProcessId is this.
resumeFromProcessIduuidOnly the runs restarted from this one (their resumeFromProcessId). Only code pipeline runs are ever restarted as a new run, so with this filter no app, interaction or capsule run matches.
retainedbooleantrue: only runs a retention lease keeps (their own lease or one inherited from a retained ancestor); false: only runs without one. Absent: both.
createdAfterdatetimeInclusive lower bound on creation time.
createdBeforedatetimeExclusive upper bound on creation time.
cursorstringThe nextCursor of the previous page.
limitinteger1–200, default 50.

Response: ProcessPage (200)

curl -X GET "https://api.maitento.com/processes" \
-H "Authorization: $MAITENTO_AUTH"
GET /processes/by-id/{id}

One run of any kind, as a summary. 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

NameTypeRequiredDescription
iduuidyes

Response: ProcessSummary (200)

curl -X GET "https://api.maitento.com/processes/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
GET /processes/summary

The runs dashboard: counts, active runs, failures, throughput and tokens over the last hours (1–168).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Query parameters

NameTypeRequiredDescription
hoursinteger
namespaceIduuid
namespacestring[]

Response: ProcessDashboard (200)

curl -X GET "https://api.maitento.com/processes/summary" \
-H "Authorization: $MAITENTO_AUTH"
POST /processes/{processType}/{processId}/kill

Kills a run of any kind.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
processTypeProcessTypeyes
processIduuidyes

Response: no body (204)

curl -X POST "https://api.maitento.com/processes/<processType>/<processId>/kill" \
-H "Authorization: $MAITENTO_AUTH"
GET /processes/{processType}/{processId}/lane

Whether a run is waiting for a lane before it starts: since when, why, and how many of your runs are ahead of it.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
processTypeProcessTypeyes
processIduuidyes

Response: RunLaneWait (200)

curl -X GET "https://api.maitento.com/processes/<processType>/<processId>/lane" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /processes/{processType}/{processId}/retention-lease

Releases a run’s retention lease: it is then cleared up like any other.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
processTypeProcessTypeyes
processIduuidyes

Response: ProcessRetentionStatus (200)

curl -X DELETE "https://api.maitento.com/processes/<processType>/<processId>/retention-lease" \
-H "Authorization: $MAITENTO_AUTH"
GET /processes/{processType}/{processId}/retention-lease

How long a run will be kept, and its retention lease.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
processTypeProcessTypeyes
processIduuidyes

Response: ProcessRetentionStatus (200)

curl -X GET "https://api.maitento.com/processes/<processType>/<processId>/retention-lease" \
-H "Authorization: $MAITENTO_AUTH"
PUT /processes/{processType}/{processId}/retention-lease

Keeps a run (and the runs under it) until released. Idempotent.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
processTypeProcessTypeyes
processIduuidyes

Request body: ProcessRetentionLeaseRequest

FieldTypeRequiredDescription
notestring | nullOptional: why the run is being retained (shown with the lease). Trimmed; empty is the same as none. Ignored when the run already has its own lease — a retain never rewrites an existing lease.

Response: ProcessRetentionStatus (200)

curl -X PUT "https://api.maitento.com/processes/<processType>/<processId>/retention-lease" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"note":"..."}'
GET /web/usage/by-process/{processId}

The metered web searches and fetches a run made.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
processIduuidyes

Response: WebUsageRecord[] (200)

curl -X GET "https://api.maitento.com/web/usage/by-process/<processId>" \
-H "Authorization: $MAITENTO_AUTH"