GET
workitems/:id
Gets the status of a specific WorkItem.
Typically used to ‘poll’ for the completion of a WorkItem, but see the use of the ‘onComplete’ argument for an alternative that does not require ‘polling’.
Limits:
- Retention period (LimitWorkItemRetentionPeriod). WorkItem status is retained for 3 days after the WorkItem completes.
Resource Information
| Method and URI | GET https://developer.api.autodesk.com/da/us-east/v3/workitems/:id |
| Authentication Context | user context optional |
| Required OAuth Scopes | code:all |
| Data Format | JSON |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is obtained via either a two-legged or three-legged OAuth flow. |
* Required
Request
URI Parameters
| id string | The GUID used to identify the WorkItem. |
Response
HTTP Status Code Summary
| 200 OK | Successfully get the status of a WorkItem. |
| 403 Forbidden | The user is not authorized to get the WorkItem status. |
| 404 Not Found | The WorkItem status doesn’t exist. |
Response
Body Structure (200)
Expand all
| status enum:string | Status value of a WorkItem.
Possible values: pending, inprogress, cancelled, failedLimitProcessingTime, failedDownload, failedInstructions, failedUpload, failedUploadOptional, success |
| progress string | The current status of the workitem. |
| reportUrl string | The detailed report about the workitem, report url is valid for 24 hours from first receiving it. |
| stats object | Basic statistics about workitem processing. |
| timeQueued datetime: ISO 8601 | The time in UTC when the workitem was queued. |
| timeDownloadStarted datetime: ISO 8601 | The time in UTC when the system started processing the workitem by transferring input data to the processing node. |
| timeInstructionsStarted datetime: ISO 8601 | The time in UTC when the system finished downloading input and started processing instructions from the Activity associated with this workitem. |
| timeInstructionsEnded datetime: ISO 8601 | The time in UTC when the system finished executing instructions and started uploading outputs. |
| timeUploadEnded datetime: ISO 8601 | The time in UTC when the system finished uploading outputs. |
| timeFinished datetime: ISO 8601 | The time in UTC when the system finished the workitem and reported the status. |
| bytesDownloaded int | The file size of bytes the job downloads for input. |
| bytesUploaded int | The file size of bytes the job uploads for output. |
| megabytesPeakRam int | (Beta) The approximate peak memory, in megabytes, used while the WorkItem was processed. Only present for Revit WorkItems submitted with memoryGb. |
| id string | |
| activityId string | The activityId the WorkItem posted for. |
| approximateQueuePosition int | null | (Beta) The approximate 1-based position of this workitem in the engine queue. Only present when status is pending. Returns null if the workitem is in the overflow queue. This is a best-effort estimate and may change as the queue is processed. |
| priority string | (Beta) P1, only for a WorkItem that ran on a priority queue. Not present for any other WorkItem, including one submitted with P3, so an explicit P3 cannot be told apart from omitting the field. |
| memoryGb int | (Beta) The memoryGb value the workitem was submitted with. Only present when the workitem was submitted with memoryGb (Revit only). |
| gpu boolean | (Beta) true when the workitem was submitted with gpu set to true (Revit only). Not present otherwise. |
Example 1
Successfully get the status of a completed WorkItem.
Request
curl -v 'https://developer.api.autodesk.com/da/us-east/v3/workitems/:id' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"status": "success",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/Revit/wi1234/report.txt?xxxxxxx",
"stats": {
"timeQueued": "2022-12-16T05:04:46.8214232Z",
"timeDownloadStarted": "2022-12-16T05:04:46.994739Z",
"timeInstructionsStarted": "2022-12-16T05:04:47.7968341Z",
"timeInstructionsEnded": "2022-12-16T05:04:48.189266Z",
"timeFinished": "2022-12-16T05:04:48.7960863Z",
"bytesDownloaded": 169,
"bytesUploaded": 2000
},
"id": "wi1234",
"activityId": "mynickname.myactivity+prod"
}
Show More
Example 2
Successfully get the status of a pending WorkItem, including its approximate queue position.
Request
curl -v 'https://developer.api.autodesk.com/da/us-east/v3/workitems/:id' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"status": "pending",
"stats": {
"timeQueued": "2022-12-16T05:04:46.8214232Z"
},
"id": "wi1234",
"activityId": "mynickname.myactivity+prod",
"approximateQueuePosition": 5
}
Show More
Example 3
(Beta) Successfully get the status of a completed WorkItem that ran on a priority queue. The response includes priority.
Request
curl -v 'https://developer.api.autodesk.com/da/us-east/v3/workitems/:id' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"status": "success",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/Revit/wi1234/report.txt?xxxxxxx",
"stats": {
"timeQueued": "2022-12-16T05:04:46.8214232Z",
"timeDownloadStarted": "2022-12-16T05:04:46.994739Z",
"timeInstructionsStarted": "2022-12-16T05:04:47.7968341Z",
"timeInstructionsEnded": "2022-12-16T05:04:48.189266Z",
"timeFinished": "2022-12-16T05:04:48.7960863Z",
"bytesDownloaded": 169,
"bytesUploaded": 2000
},
"id": "wi1234",
"activityId": "mynickname.myactivity+prod",
"priority": "P1"
}
Show More
Example 4
(Beta) Successfully get the status of a completed Revit WorkItem that was submitted with memoryGb set to 64 and gpu set to true. The response echoes both values and reports the peak memory used.
Request
curl -v 'https://developer.api.autodesk.com/da/us-east/v3/workitems/:id' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"status": "success",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/Revit/wi1234/report.txt?xxxxxxx",
"stats": {
"timeQueued": "2022-12-16T05:04:46.8214232Z",
"timeDownloadStarted": "2022-12-16T05:04:46.994739Z",
"timeInstructionsStarted": "2022-12-16T05:04:47.7968341Z",
"timeInstructionsEnded": "2022-12-16T05:09:12.189266Z",
"timeFinished": "2022-12-16T05:09:13.7960863Z",
"bytesDownloaded": 104857600,
"bytesUploaded": 98566144,
"megabytesPeakRam": 41250
},
"id": "wi1234",
"activityId": "mynickname.myactivity+prod",
"memoryGb": 64,
"gpu": true
}
Show More