28 Oct 2021

Share app bundle and activity with other Forge apps

Just by simply checking the various endpoints of Design Automation it's not obvious that you can share your app bundles and activities with other APS apps. 

The POST aliases endpoint of both app bundles and activities accepts a parameter called "receiver" where you can provide the Client ID of the APS app that you want to share the given version of your resource with. 
To share your app bundle named "MyAppBundle" with the APS app that has the Client ID "gGn0m69jVSsD2zBEDm9MStXQQwsa61z0" you could send a message like this:

POST https://developer.api.autodesk.com/da/us-east/v3/appbundles/MyAppBundle/aliases

{
  "version": 1,
  "id": "shared",
  "receiver": "gGn0m69jVSsD2zBEDm9MStXQQwsa61z0"
}

or

{
  "version": 1,
  "id": "shared",
  "receiver": ["gGn0m69jVSsD2zBEDm9MStXQQwsa61z0", "rtn0m6tryeiuisDm9MSt6sfghwrty"]
}

The "receiver" property accepts either a single Client ID/NickName or an array of Client IDs/NickNames (currently max 30), so if you want to share a given version of your app bundle or activity with APS apps more than that, then you need to create a separate alias for each batch - see picture on top.

Note: In case of providing an array of Client IDs/NickNames, you have to make sure that all the APS apps whose Client ID/NickName you pass in have some DA resources: at least one app bundle or activity, otherwise the request will fail.

Once you do that, the resource becomes available for the other APS app:

Shared app bundle

Related Article