Ole Martin Helgesen
Ole Martin Helgesen

Reputation: 11

Autodesk Forge, .Net API POST methods do not return new object Id

in a C# project, I have included the Autodesk Forge package. It offers high level objects rather than using the REST API. For get methods it works fine. However, for post methods there is a problem because you are not getting the return object with new Id you need for further calls.

For example, when creating a new folder: You create a CreateFolder object and call void ForlderApi.PostFolder(projectId, CreateFolder) In this case you can iterate the parent folder, but that's an overhead.

For uploading files, you first need to create a Storage, and in this case I don't now how to get the new Id: projectsApi.PostStorage(projectid, createStorage)

It seems it is better to use the REST API directly, I have found some good examples on this. Or have anyone found out how to make this work??

Upvotes: 0

Views: 172

Answers (1)

Petr Broz
Petr Broz

Reputation: 9942

You can certainly use the REST APIs directly if you want. The higher-level SDKs (for C#, Node.js, etc.) are something we provide for people who don't want to deal with the raw HTTP requests/responses. The SDK initiative is still relatively new, so it's possible that there are some missing pieces. In that case I'd encourage you to submit an issue to the github repo, and we'll get to it :)

Upvotes: 0

Related Questions