0

I'm working on the step-by-steptutorial Design automation for Revit. I'm trying to get the [GET] /activities/:id to work to get detailed info of an activity. At first, I retrieved all the activities available to me:

enter image description here

When I try to call the [GET] /activities/:id with any of the activities except for the first one, I receive a json with detailed info of the activity. That works just fine. But when I try to do the same with the first activityId "GZZQ.....DeleteWallsActivity+$LATEST" I consequently receive a "The remote server returned an error: (400) Bad Request".

I tried this with no encoding:

https://developer.api.autodesk.com/da/us-east/v3/activities/GZZQabcdefghijklmnopqrNroJTafTze.DeleteWallsActivity+$LATEST

and with HttpUtility.UrlEncode:

https://developer.api.autodesk.com/da/us-east/v3/activities/GZZQabcdefghijklmnopqrNroJTafTze.DeleteWallsActivity%2b%24LATEST

But the result is the same: the (400) bad request error. Has anyone any idea why this doesn't work?

Environment: Visual Studio 2019, C#.

1 Answers1

1

If you check the document at https://forge.autodesk.com/en/docs/design-automation/v3/developers_guide/aliases-and-ids/ it mentioned the purpose of $LATEST alias:

For every AppBundle and Activity, the system always creates a special Alias named “$LATEST”. The main purpose of this Alias is for listing AppBundles and Activities. It can also be used in

  • [GET] /appbundles/:id/aliases/$LATEST
  • [GET] /activities/:id/aliases/$LATEST

calls. Note however, that it must not be used in other calls where an Alias (as part of fully qualified id, see later) is expected. You must use the real Alias that you created for the AppBundle or the Activity in those calls.

Zhong Wu
  • 1,721
  • 1
  • 8
  • 9