Activities
PATCH
Activities(‘:id’)

Updates an Activity by specifying only the changed attributes.
Resource Information
Method and URI | PATCH https://developer.api.autodesk.com/autocad.io/us-east/v2/Activities(‘:id’) |
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 |
Content-Type* string | Must be application/json |
* Required
Request
Body Structure
The changed attributes of an Activities JSON object are passed as the request body.
Expand all
AppPackages array: string | IDs of the AppPackages to reference
If a custom Activity uses only native AutoCAD commands, this attribute should be empty.
|
HostApplication string | Name of the application to execute a specified WorkItem
By default, this field should be empty. When the field is empty, the AutoCAD core engine (accoreconsole.exe) is used. A client can specify a RealDWG host application to carry out a WorkItem. Host applications are typically submitted via custom AppPackages
|
RequiredEngineVersion enum: string | Version of the AutoCAD core engine to execute the Activity. Possible values:
20.1 , 21.0 , 22.0 .Note: Use the
ACADVER system variable within your local install of the AutoCAD program to see which version you are using locally. |
Parameters object | Input and output parameters that map the names of actual drawings to the drawing names specified in the
Instruction objectParameters is a container object that contains two sub-containers: InputParameters and OutputParameters. Each container is an array of Parameter objects. A Parameter object is closely related to an Argument object in a WorkItem that defines the general in
and output setup of a WorkItem.
For example, if an Activity specifies an input Parameter with a name of “MyParameter” and it’s not optional, then any WorkItem that targets this Activity has to have an input Argument with the same name.
|
InputParameters array:object | Array of input Argument objects
|
InputParameters[i] object | The ith element of the array: an input argument object.
|
Name string | Name of an input Argument object; must be unique within this InputParameters array
|
LocalFileName string | File name for a locally saved WorkItem input Argument after the resource has been downloaded
|
Optional bool | Specifies whether an input Argument can be missing
If the value is
true , the missing Argument with the same name of this Parameter is allowed. |
OutputParameters array:object | Array of output Argument objects
|
OutputParameters[i] object | The ith element of the array: an output argument object.
|
Name string | Name of an output Argument object; must be unique within this OutputParameters array
|
LocalFileName string | Name of a locally available file that the Publish process is looking for to upload for this output Argument
|
Optional bool | Specifies whether an output Argument can be missing
If the value is
true , the missing Argument with the same name of this Parameter is allowed. |
Instruction object | Describes the actions to be taken
|
CommandLineParameters string | Additional command line parameters that are passed from the service worker to the new session of the AutoCAD core engine
|
Script string | Contents that the service worker uses to create an AutoCAD script file locally for the AutoCAD core engine to execute
|
AllowedChildProcesses array: object | Child processes that will be spawned by the Activity
Note: Any spawned child processes not specified here are disabled.
|
IsPublic bool | Specifies whether the Activity can be publicly targeted
A public Activity can be used by clients outside of your account.
Note: Only one Activity with the same “Id” (or name) can be public.
|
Version int | Version number of the Activity
|
Description string | Additional details about the Activity; optional
|
Id string | Name of the Activity
The name is used to associate the Activity to a WorkItem. The name of the Activity must be assigned to the WorkItem’s ActivityId attribute.
|
Response
HTTP Status Code Summary
204 No Content | Resource updated successfully |
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 |
Example
Activity Successfully Updated (204)
Request
curl -v "https://developer.api.autodesk.com/autocad.io/us-east/v2/Activities('CreateALine')" \
-X 'PATCH' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer Ct43z2DJnsYuaAxI4R2iT84b3UPy' \
-d ' \
{
"Instruction": {
"CommandLineParameters": null,
"Script": "_tilemode 1 _line 0,0 3,3 _save result.dwg\n"
}
}'
Show More
Response
HTTP/1.1 204 No Content
Cache-Control: no-cache
Date: Mon, 12 May 2014 18:36:51 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Connection: keep-alive
Show More