Activity

An activity is an action which can be executed in Design Automation. You create and post your own activities to run against target appbundles.

APIs for activity

This page will explain the first of the sample activity APIs below:

The other three are similar to the appbundle APIs.

The base URL is https://developer.api.autodesk.com/da/us-east.

More APIs for activity can be found here.

Create a New Activity

To create a new activity with the id DeleteWallsActivity, post this request:

curl -X POST \
  https://developer.api.autodesk.com/da/us-east/v3/activities \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer LongStringAccessTokenObtainedDuringAuthenthication' \
  -d '{
            "id": "DeleteWallsActivity",
            "commandLine": [ "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[DeleteWallsApp].path)" ],
            "parameters": {
              "rvtFile": {
                "zip": false,
                "ondemand": false,
                "verb": "get",
                "description": "Input Revit model",
                "required": true,
                "localName": "$(rvtFile)"
              },
              "result": {
                "zip": false,
                "ondemand": false,
                "verb": "put",
                "description": "Results",
                "required": true,
                "localName": "result.rvt"
              }
            },
            "engine": "Autodesk.Revit+2018",
            "appbundles": [ "YourNickname.DeleteWallsApp+test" ],
            "description": "Delete walls from Revit file."
    }'

Response

{
    "commandLine": [
        "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[DeleteWallsApp].path)"
    ],
    "parameters": {
        "rvtFile": {
            "verb": "get",
            "description": "Input Revit model",
            "required": true,
            "localName": "$(rvtFile)"
        },
        "result": {
            "verb": "put",
            "description": "Results",
            "required": true,
            "localName": "result.rvt"
        }
    },
    "engine": "Autodesk.Revit+2018",
    "appbundles": [
        "YourNickname.DeleteWallsApp+test"
    ],
    "description": "Delete walls from Revit file.",
    "version": 1,
    "id": "YourNickname.DeleteWallsActivity"
}

The response to the new activity post includes: