Trillet AI logo

Cancel a job

Trillet Partner API: Cancels a queued or running job.

POSThttps://api.trillet.ai/partner/v1/jobs/{jobId}/cancel

Cancels a queued or running job. A queued job is cancelled at once. A running one comes back with cancelRequested: true and stops at the next point it can: a provisioning job then removes everything it built (agents, call flows, knowledge base, workflows) and its receptionist is failed; a test run places no more calls. Cancelling a job that is already cancelled returns it unchanged. Needs resources:write.

Loading code example
Loading code example

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

jobIdstringrequired
Pattern: ^[a-fA-F0-9]{24}$

Header Parameters

Idempotency-Keystring

Optional. Works as on the endpoints that require it.

Length: >= 1, <= 255

Response

application/json

The job, cancelled, or running with cancelRequested true.

objectstringrequired
idstringrequired
Pattern: ^[a-fA-F0-9]{24}$
type"provision" | "test_run"required

provision: building a receptionist. test_run: testing one that exists.

Allowed values: "provision" | "test_run"
status"queued" | "running" | "succeeded" | "failed" | "cancelled"required
Allowed values: "queued" | "running" | "succeeded" | "failed" | "cancelled"
stage"reading" | "building" | "testing" | "finishing" | null

Where a running job is. null otherwise.

Allowed values: "reading" | "building" | "testing" | "finishing" | null
cancelRequestedboolean

A running job you cancelled. It stops at the next point it can.

tenantIdstring | null
attemptsinteger
resultobject | null

Set when a job succeeds. A provisioning job has receptionistStatus, reviewReason, frontDoorAgentId, agents and tests. A test run has total, passed, passRate, requiredPassRate and meetsPassRate.

result.receptionistStatus"ready" | "needs_review"
Allowed values: "ready" | "needs_review"
result.reviewReason"tests_failed" | "tests_unavailable" | "approval_required" | null
Allowed values: "tests_failed" | "tests_unavailable" | "approval_required" | null
result.frontDoorAgentIdstring
result.agentsarray<object>
result.testsobject
result.totalinteger

Test run. Calls that connected and were judged.

result.passedinteger

Test run.

result.passRatenumber

Test run.

result.requiredPassRatenumber

Test run.

result.meetsPassRateboolean

Test run.

errorobject | null
error.codestring
error.messagestring
createdAtstring | null<date-time>
startedAtstring | null<date-time>
finishedAtstring | null<date-time>

Last updated on