Get workflow dispatch job details¶
Read the current status and file delivery counts of a workflow batch file dispatch job. data.dispatch_job.status reaching completed means batch file delivery processing has finished, not that the triggered per-file workflow jobs have completed; continue with View workflow jobs to track individual job execution states.
GET https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/{workflow_id}/dispatch-jobs/{dispatch_job_id}
Before you begin¶
Prepare a personal access token with read permission on the target workflow and the target workspace ID.
Obtain the workflow ID and dispatch job ID from a volume or batch-file run via Start workflow job, Retry workflow jobs in batches, or View workflow jobs.
Request parameters¶
Replace $AI_STUDIO_API_KEY, $WORKSPACE_ID, $WORKFLOW_ID, and $DISPATCH_JOB_ID with actual values.
curl "https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/$WORKFLOW_ID/dispatch-jobs/$DISPATCH_JOB_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Workflow ID that owns the dispatch job. Returns |
|
string |
Yes |
Dispatch job ID, obtained from |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"dispatch_job": {
"dispatch_job_id": "dispatch-001",
"workflow_id": "wf-001",
"status": "completed",
"total_deliveries": 12,
"pending_deliveries": 0,
"failed_deliveries": 1
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
Response status message. |
|
object |
Returned payload for this call. |
|
object |
Dispatch job state and delivery counts. |
|
string |
Dispatch job ID. |
|
string |
Associated workflow ID. |
|
string |
Dispatch job status. Possible values: |
|
integer |
Total number of file deliveries created for this dispatch job. |
|
integer |
Number of deliveries still pending, dispatching, or waiting for retry. |
|
integer |
Number of deliveries that failed after exhausting retries. |
Error response¶
An error is returned when the workflow or dispatch job does not exist, the dispatch job does not belong to the specified workflow, or the caller lacks permission to read the workflow. Verify the workspace ID, workflow ID, and dispatch job ID before retrying.
{
"code": "ErrNotFound",
"msg": "Not Found"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Readable error message. |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Suggested action |
|---|---|---|---|
400 |
|
The target workspace header is missing or a path parameter is invalid. |
Check the workspace header and the workflow ID in the path. |
401 |
|
Authentication credentials are missing or invalid. |
Check that the personal access token is valid. |
403 |
|
The current identity cannot read dispatch jobs for the target workflow. |
Use an identity with workflow read permission, or request access from an administrator. |
404 |
|
The workflow does not exist or is inactive, or the dispatch job does not belong to the current workspace and specified workflow. |
Verify |
500 |
|
Failed to read the dispatch record or persisted dispatch state is invalid. |
Retain the request details and recheck the dispatch status later. |
503 |
|
Authorization or storage dependencies are temporarily unavailable. |
Retry the query later. |