This skill is used to query the status of a specific task in the AICNIC job management system.
When the user needs to query a task status:
jobId parameter provided by the userjobState fieldtext
GET http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/{jobId}
bash
curl -X GET "http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/{jobId}" -H "accept: */*"
The API returns a JSON response:
json
{
"code": 0,
"message": null,
"data": {
"id": 20452,
"jobId": "15000",
"jobState": "COMPLETED",
...
}
}
Extract the following fields from the API response:
Field PathDescriptiondata.jobStateTask status (e.g., COMPLETED, RUNNING, PENDING, etc.)data.jobIdJob IDdata.jobNameJob namedata.startTimeStart timedata.endTimeEnd time
http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/{jobId}data.jobState fieldbash
curl -X GET "http://www.aicnic.cn/jobs/api/jobs/infos/hpcai28/15000" -H "accept: */*"
Response:
json
{
"code": 0,
"message": null,
"data": {
"jobId": "15000",
"jobState": "COMPLETED",
"endTime": "2024-12-09T09:30:10"
}
}
Parsed Result: Task status is COMPLETED
COMPLETED - CompletedRUNNING - RunningPENDING - PendingFAILED - FailedCANCELLED - Cancelled