WorkItems
GET
WorkItems

Returns the details of all WorkItems.
Resource Information
Method and URI | GET https://developer.api.autodesk.com/autocad.io/us-east/v2/WorkItems |
Authentication Context | app only |
Required OAuth Scopes | code:all |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained
via OAuth |
* Required
Request
Query String Parameters
$skip int | used for pagination of returned results
Initial calls to this endpoint should be made with this query string
parameter omitted. The response payload will include an
odata.nextLink
attribute that will contain the full URI for subsequent calls to this
endpoint, including the value for the $skip parameter. |
Response
HTTP Status Code Summary
200 OK | Request has succeeded |
400 Bad Request | Request could not be understood by the server due to malformed syntax |
401 Unauthorized | Access token is invalid |
404 Not Found | Resource cannot be found |
429 Too Many Requests | Rate limit exceeded; wait some time before retrying |
500 Internal Server Error | An unexpected error occurred on the server |
Response
Body Structure (200)
A WorkItem JSON object is returned inside a pagination envelope.
Expand all
value array:object | An array of JSON objects representing the available WorkItems. |
value[i] object | The ith element of the array: a WorkItem object. |
ActivityId string | Activity to be executed
The value must match the
Id attribute of the Activity object. |
Arguments object | Defines references to input and output arguments
An Argument is a container of two sub-containers: InputArguments and OutputArguments.
|
InputArguments object | An array of Argument objects
Each Argument object defines a set of input parameters that the service uses to prepare a logic “input” item (drawing, supporting file, script file, ...) along with specifying where and how to get the input.
|
Resource string: URL | Specifies the location of the resource; the value is generally a URL to download
The URL needs to be pre-signed or you have to provide the Authorization header with a valid token via Headers.
|
Name string | Unique name of the input argument; must be unique in this InputArguments array
Note: The special input argument named “$(HostDwg)” instructs the service to treat the downloaded resource of the argument as the host drawing in the AutoCAD core engine session.
|
Headers array: string | An array of “Name” - “Value” pairings that will be applied as HTTP request headers when the service tries to retrieve the input for a WorkItem.
For example, if you specify
{"Name":"Authorization", "Value":"Bearer xxxxxyyyyyzzz"} , the GET request sends Authorization="Bearer xxxxxyyyyyzzz" to the HTTP header. |
ResourceKind enum: string | Specifies the kind of resource used; when left empty “Simple” is used
Simple : Single remote resource is downloaded as-is; no further unpacking is performed.EtransmitPackage : Single remote resource is an AutoCAD eTransmit package. After the resource is downloaded locally, the contents are unpacked.RemoteFileResource : A cluster of remote resources, described as a RemoteFileResource object with relationships between these resources. The service walks-through the relationship graph and downloads all the resources described.ZipPackage : Remote resource is a single compressed file. After the resource is downloaded locally, the contents are unpacked to a working folder.Embedded : The “Resource” attribute is an in-line resource that conforms with the Data URI scheme. When such a resource is encountered, the file identified by the Resource field is downloaded locally. The Resource field should be of the formdata:[<media-type>][;base64],<data> , and at present <media-type> must be application/json .Variadic : A partial resource to be completed on use. The Resource attribute is a base URI for one or more delay-downloaded resources when access is required, typically from within the underlying application (AutoCAD core engine).When access is requested, the application supplies missing URI fragments and/or query strings.
|
StorageProvider string | Type of storage in which the input resource come from; can be left empty
Generic is currently the only valid value. |
HttpVerb enum: string | HTTP operation for this input argument; valid values are
GET or HEAD |
OutputArguments object | An array of Argument objects that represent the output of the WorkItem after execution
Each output item is typically uploaded to the location specified by the Resource field.
|
Resource string: URL | URL to publish a given output argument
|
Name string | Unique name of the output argument; must be unique in this OutputArguments array
|
Headers array: string | An array of “Name” - “Value” pairings that defines the HTTP header to use when publishing this output arguments.
|
ResourceKind enum: string | Specifies the kind of resource to be used; when left empty “Simple” is used
Simple : Single remote resource is downloaded as-is; no further unpacking is performed.EtransmitPackage : Single remote resource is an AutoCAD eTransmit package. After the resource is downloaded locally, the contents are unpacked.RemoteFileResource : A cluster of remote resources, described as a RemoteFileResource object with relationships between these resources. The service walks-through the relationship graph and downloads all the resources described.ZipPackage : Remote resource is a single compressed file. After the resource is downloaded locally, the contents are unpacked to a working folder.Embedded : The “Resource” attribute is an in-line resource that conforms with the Data URI scheme. When such a resource is encountered, the file identified by the Resource field is downloaded locally. The Resource field should be of the form:data:[<media-type>][;base64],<data> , and at present <media-type> must be application/json .Variadic : A partial resource to be completed on-use. The Resource attribute is a base URI for one or more delay-downloaded resources when access is required, typically from within the underlying application (AutoCAD core engine).When access is requested, the application supplies missing URI fragments and/or query strings.
|
StorageProvider string | Type of storage to use for output; can be left empty
Generic is currently the only valid value. |
HttpVerb enum: string | HTTP operation for this output argument; valid values are
PUT or POST |
Status enum: string | Result of the executed task
FailedEnvironmentSetup (-5): Indicates that the required Engine cannot be installedFailedUpload (-4): Indicates that any of the outputs have failed to uploadFailedMissingOutput (-3): Indicates when any of the outputs are missing after the AcCoreConsole.exe has successfully returnedFailedExecution (-2): Indicates that the AcCoreConsole.exe exited with a non-zero exit codeThis includes the following cases:
1. Timeout; exit code is passed to Kill(<exitcode>)
2. Crash; exit code is non-zero
3. Input drawing fails to open; produces various non-zero exit codes
FailedDownload (-1): Indicates that any of the inputs have failed to downloadPending (0): Indicates that the WorkItem is still in the queue, no worker has started processing the WorkItemInProgress (1): Indicates that the WorkItem is being processedSucceeded (256): Indicates that execution of the WorkItem was successful |
StatusDetails object | Wrapper object that contains a S3 item path for the internal reporting of the WorkItem
|
Report string: URL | URL to a downloadable report about the executed task
|
AvailabilityZone string | Geographical region in which the WorkItem is executed
Note: This attribute is currently ignored.
|
TimeQueued datetime: ISO 8601 | Time when the request entered the queue of the service; read-only
Note: This attribute is automatically set by the server and cannot be specified in API requests.
|
TimeInputTransferStarted datetime: ISO 8601 | Time when the request was picked up by the service “worker” to be executed; read-only
Note: This attribute is automatically set by the server and cannot be specified in API requests.
|
TimeScriptStarted datetime: ISO 8601 | Time when all the necessary resources were downloaded and the AutoCAD core engine was about to start; read-only
Note: This attribute is automatically set by the server and cannot be specified in API requests.
|
TimeScriptEnded datetime: ISO 8601 | Time when the AutoCAD core engine finished executing; read-only
Note: This attribute is automatically set by the server and cannot be specified in API requests.
|
TimeOutputTransferEnded datetime: ISO 8601 | Time when all the generated output was published; read-only
Note: This attribute is automatically set by the server and cannot be specified in API requests.
|
BytesTranferredIn int | Total number of bytes that were downloaded as a result of executing the WorkItem request; read-only
Note: This attribute is automatically set by the server and cannot be specified in API requests.
|
BytesTranferredOut int | Total number of bytes that were uploaded; read-only
Note: This attribute is automatically set by the server and cannot be specified in API requests.
|
Id string | Unique identifier for the WorkItem
The value is generated by the API and is a GUID. The API does not assign the ID to the WorkItem until the WorkItem has been accepted by the API.
|
Version int | Version number of the WorkItem; should always be
1 |
Timestamp datetime: ISO 8601 | Timestamp of the last modification,
YYYY-MM-DDThh:mm:ss.ssZ format; read-onlyNote: This attribute is automatically set by the server and cannot be specified in API requests.
|
odata.nextLink string | Link to next page
|
Example
All WorkItems successfully returned (200)
Request
curl -v 'https://developer.api.autodesk.com/autocad.io/us-east/v2/WorkItems' \
-X 'GET' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer Pn43z2DJnsYuaAxI4R2iT84b3UPy' \
Response
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 12 May 2014 16:55:38 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 563
Connection: keep-alive
{
"odata.metadata": "https://developer.api.autodesk.com/autocad.io/us-east/v2/$metadata#WorkItems",
"value": [{
"@odata.context": "https://developer.api.autodesk.com/autocad.io/us-east/v2/$metadata#WorkItems/$entity",
"ActivityId": "PlotToPDF",
"Arguments": {
"InputArguments": [{
"Resource": "https://s3.amazonaws.com/AutoCAD-Core-Engine-Services/TestDwg/makeall.dwg",
"Name": "HostDwg",
"Headers": [],
"ResourceKind": null,
"StorageProvider": "Generic",
"HttpVerb": null
}],
"OutputArguments": [{
"Resource": "https://acesdev.s3-us-west-2.amazonaws.com/aces-workitem-outputs/9688d314d6e94bc682f901b468ca8dbc/result.pdf?AWSAccessKeyId=ASIAIIRAOVQYGB4OA7IA&Expires=1432231792&x-amz-security-token=AQoDYXdzEGIa0AMSDjA8SIKRwWVY8YvdmMQsZ3T5atGN2gDTUwcffe%2FMejuRGezSx%2F4lDaN1NwsGCc%2B91eXvocmWaEZA%2Bm8uClMwP%2Fr69UmL6RmOiK7dokQlbQGEoPEQwF%2Frpw2jPQ6wDq4suFWXlsuxODWP24v3GJ4fZRj9V4S91Z59Nagcla6Ll46YVS6rc0PlaC4ElJ89ncABb23dR%2BK%2FAAaPsFVVn8ZV81gqDbect8YjvMH2RCfXQb7KnheNFlL77AXMeJM11ahq3UUsDk2o3uYQswJQJg5AsYZEtXjbbKU40MDkLPKjn5Ua18%2FD1pNZFm%2FFhoHMHXHvfvJdfXPWHBKYEFCvIz%2FZyKg8CORDIpK04ZMuAV68jTiHGkes7U5L5QPnCDEDAyZnod6FK7djcNYQwJBE9SNge%2FBLAXmJ5Hsiuy8HZF7GF59LPSR%2BXyygw%2Fy1ssJxmKxK4jsUG33ukj69Mj1nXlKfVdk89cdonuOScw%2BnD91%2B1kRozlIXkDT9Crf%2FceshJHY48vaPtJ5VG1sGIZoHW5fzwcbXDEJzhLJcj0UaFr5N3sgMKCX7KtZcqRYp%2Bupd7khRSAhC2LZdOyCHAQgi45F11qYZ8fwiUassVPEYIwTpYiDbgfOqBQ%3D%3D&Signature=02E4g51C2R9NsdwX0vloUmX8RCM%3D",
"Name": "Result",
"Headers": [],
"ResourceKind": null,
"StorageProvider": "Generic",
"HttpVerb": "POST"
}]
},
"Status": "Succeeded",
"StatusDetails": {
"Report": "https://acesdev.s3-us-west-2.amazonaws.com/aces-workitem-reports/9688d314d6e94bc682f901b468ca8dbc/report.log?AWSAccessKeyId=ASIAIIRAOVQYGB4OA7IA&Expires=1432231871&x-amz-security-token=AQoDYXdzEGIa0AMSDjA8SIKRwWVY8YvdmMQsZ3T5atGN2gDTUwcffe%2FMejuRGezSx%2F4lDaN1NwsGCc%2B91eXvocmWaEZA%2Bm8uClMwP%2Fr69UmL6RmOiK7dokQlbQGEoPEQwF%2Frpw2jPQ6wDq4suFWXlsuxODWP24v3GJ4fZRj9V4S91Z59Nagcla6Ll46YVS6rc0PlaC4ElJ89ncABb23dR%2BK%2FAAaPsFVVn8ZV81gqDbect8YjvMH2RCfXQb7KnheNFlL77AXMeJM11ahq3UUsDk2o3uYQswJQJg5AsYZEtXjbbKU40MDkLPKjn5Ua18%2FD1pNZFm%2FFhoHMHXHvfvJdfXPWHBKYEFCvIz%2FZyKg8CORDIpK04ZMuAV68jTiHGkes7U5L5QPnCDEDAyZnod6FK7djcNYQwJBE9SNge%2FBLAXmJ5Hsiuy8HZF7GF59LPSR%2BXyygw%2Fy1ssJxmKxK4jsUG33ukj69Mj1nXlKfVdk89cdonuOScw%2BnD91%2B1kRozlIXkDT9Crf%2FceshJHY48vaPtJ5VG1sGIZoHW5fzwcbXDEJzhLJcj0UaFr5N3sgMKCX7KtZcqRYp%2Bupd7khRSAhC2LZdOyCHAQgi45F11qYZ8fwiUassVPEYIwTpYiDbgfOqBQ%3D%3D&Signature=omaAOII4CQaMUAXGChgsvT37I%2FU%3D"
},
"AvailabilityZone": null,
"TimeQueued": "2015-05-20T18:09:47.957Z",
"TimeInputTransferStarted": "2015-05-20T18:09:48.035Z",
"TimeScriptStarted": "2015-05-20T18:09:48.707Z",
"TimeScriptEnded": "2015-05-20T18:09:52.035Z",
"TimeOutputTransferEnded": "2015-05-20T18:09:52.16Z",
"BytesTranferredIn": 169056,
"BytesTranferredOut": 53800,
"Id": "9688d314d6e94bc682f901b468ca8dbc",
"Version": 1,
"Timestamp": "2015-05-20T18:09:52.16Z"
}
],
"odata&per.nextLink": "https://developer.api.autodesk.com/autocad.io/us-east/v2/WorkItems?$skip=100"
}
Show More