Skip to content

Cancel a queued job enqueued through the functions API.

POST
/api/workspace/functions/jobs/{jobId}/cancel
curl --request POST \
--url https://example.com/api/workspace/functions/jobs/example/cancel
  • None
jobId
required
string

Queued job identifier.

access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

OK

Media typeapplication/json
object
Data

Status of a job enqueued through the functions API.

object
JobId

Queued job identifier.

string
nullable
FunctionKey

Callable key of the enqueued function.

string
nullable
Status
integer format: int32
Allowed values: 0 1 2 3 4
CreatedAt

Enqueue timestamp.

string format: date-time
NextRunAt

Earliest execution timestamp.

string format: date-time
nullable
AttemptCount

Execution attempts so far.

integer format: int32
DeduplicationKey

Deduplication key of the job, when supplied.

string
nullable
CorrelationId

Correlation identifier of the job, when supplied.

string
nullable
LastError

Bounded last execution error summary.

string
nullable
TimeoutSeconds

Optional execution timeout captured on the job and preserved across retries.

integer format: int32
nullable
CanCancel

Whether the job can still be cancelled.

boolean
Run

Latest execution of a job enqueued through the functions API.

object
RunId

Function run identifier.

string
nullable
Status
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8
StartedAt

Run start timestamp.

string format: date-time
CompletedAt

Run completion timestamp.

string format: date-time
nullable
DurationMs

Run duration in milliseconds.

integer format: int64
nullable
ResultSummary

Bounded result summary.

string
nullable
ResultData

Structured JSON result payload.

object
ErrorSummary

Bounded error summary.

string
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Status": 0,
"Run": {
"Status": 0
}
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Bad Request

Media typeapplication/json
object
Data

Status of a job enqueued through the functions API.

object
JobId

Queued job identifier.

string
nullable
FunctionKey

Callable key of the enqueued function.

string
nullable
Status
integer format: int32
Allowed values: 0 1 2 3 4
CreatedAt

Enqueue timestamp.

string format: date-time
NextRunAt

Earliest execution timestamp.

string format: date-time
nullable
AttemptCount

Execution attempts so far.

integer format: int32
DeduplicationKey

Deduplication key of the job, when supplied.

string
nullable
CorrelationId

Correlation identifier of the job, when supplied.

string
nullable
LastError

Bounded last execution error summary.

string
nullable
TimeoutSeconds

Optional execution timeout captured on the job and preserved across retries.

integer format: int32
nullable
CanCancel

Whether the job can still be cancelled.

boolean
Run

Latest execution of a job enqueued through the functions API.

object
RunId

Function run identifier.

string
nullable
Status
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8
StartedAt

Run start timestamp.

string format: date-time
CompletedAt

Run completion timestamp.

string format: date-time
nullable
DurationMs

Run duration in milliseconds.

integer format: int64
nullable
ResultSummary

Bounded result summary.

string
nullable
ResultData

Structured JSON result payload.

object
ErrorSummary

Bounded error summary.

string
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Status": 0,
"Run": {
"Status": 0
}
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Forbidden

Media typeapplication/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/json
object
Data

Status of a job enqueued through the functions API.

object
JobId

Queued job identifier.

string
nullable
FunctionKey

Callable key of the enqueued function.

string
nullable
Status
integer format: int32
Allowed values: 0 1 2 3 4
CreatedAt

Enqueue timestamp.

string format: date-time
NextRunAt

Earliest execution timestamp.

string format: date-time
nullable
AttemptCount

Execution attempts so far.

integer format: int32
DeduplicationKey

Deduplication key of the job, when supplied.

string
nullable
CorrelationId

Correlation identifier of the job, when supplied.

string
nullable
LastError

Bounded last execution error summary.

string
nullable
TimeoutSeconds

Optional execution timeout captured on the job and preserved across retries.

integer format: int32
nullable
CanCancel

Whether the job can still be cancelled.

boolean
Run

Latest execution of a job enqueued through the functions API.

object
RunId

Function run identifier.

string
nullable
Status
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8
StartedAt

Run start timestamp.

string format: date-time
CompletedAt

Run completion timestamp.

string format: date-time
nullable
DurationMs

Run duration in milliseconds.

integer format: int64
nullable
ResultSummary

Bounded result summary.

string
nullable
ResultData

Structured JSON result payload.

object
ErrorSummary

Bounded error summary.

string
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Status": 0,
"Run": {
"Status": 0
}
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}