task-status
v1.0.1Query task status from the AICNIC job management system. Use this skill when the user needs to check task status, retrieve job information, or mentions a job...
Task Status Query
Overview
This skill is used to query the status of a specific task in the AICNIC job management system.
Usage
When the user needs to query a task status:
- Obtain the
jobIdparameter provided by the user - Call the API to retrieve job information
- Parse and return the value of the
jobStatefield
API Call
Request Format
GET http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/{jobId}
Curl Example
curl -X GET "http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/{jobId}" -H "accept: */*"
Response Format
The API returns a JSON response:
{
"code": 0,
"message": null,
"data": {
"id": 20452,
"jobId": "15000",
"jobState": "COMPLETED",
...
}
}
Parsing Rules
Extract the following fields from the API response:
| Field Path | Description |
|---|---|
data.jobState | Task status (e.g., COMPLETED, RUNNING, PENDING, etc.) |
data.jobId | Job ID |
data.jobName | Job name |
data.startTime | Start time |
data.endTime | End time |
Workflow
- Receive Parameter: Get the jobId provided by the user
- Build URL:
http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/{jobId} - Send Request: Send a GET request using curl or an HTTP client
- Parse Response: Parse the JSON response and extract the
data.jobStatefield - Return Result: Display the task status to the user
Example
Query task status for jobId 15000
curl -X GET "http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/15000" -H "accept: */*"
Response:
{
"code": 0,
"message": null,
"data": {
"jobId": "15000",
"jobState": "COMPLETED",
"endTime": "2024-12-09T09:30:10"
}
}
Parsed Result: Task status is COMPLETED
Common Task States
COMPLETED- CompletedRUNNING- RunningPENDING- PendingFAILED- FailedCANCELLED- Cancelled
Version tags
latest
