1

I want to create a new Folder in my BIM360 Project by using the C# SDK. Unfortunately, I do not manage to get a ResourceId to define my parent folder. I tried it like this:

        CreateFolder folder = new CreateFolder();
        string root_folder = "...";
        folder.Data.Relationships.Parent.Data.Id = root_folder;

But the parent id must be from type ResourceId and I only have a string which contains the id. Until now, I have not found a conversion between string and resource id(ResourceId only supports the standard-constructor)

I have also tried to make a GET request on the root folder to receive all its information. But there I also receive an id as a string. So how am I supposed to create a resource id for my folder?

And just one little additional question: If I succeed in creating a folder, how can I manage the permission? Is it even possible to do so via webservice?

Thanks in advance

Andreas
  • 309
  • 1
  • 8

1 Answers1

2

I want to create a new Folder in my BIM360 Project by using the C# SDK

As of August/2017, to create a BIM 360 Docs folder you need to POST Command with this JSON body. In any case, the resource id is the parent folder, it must be another folder, either one default folder on BIM 360 Docs (e.g. Plans) or topFolder on BIM 360 Team.

But there I also receive an id as a string. So how am I supposed to create a resource id for my folder?

The parent full href can be spliced by / (forward slash) so you can access the parent folder. This sample demonstrates it.

If I succeed in creating a folder, how can I manage the permission? Is it even possible to do so via webservice?

Again, as of August/2017, we cannot manage permissions by API.

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
  • But there ist the FoldersAPI in c# providing a PostFolder Method. And as a paremeter I can use an object of type CreateFolder. I just want to set the parent attribute of this object which is form type ResourceId (and I only have a string). Is this not possible? – Andreas Aug 09 '17 at 13:37
  • sorry the confusion, the FoldersAPI on the SDKs are not contemplating this... we're working to improve it. – Augusto Goncalves Aug 09 '17 at 15:17
  • @AugustoGoncalves Has there been an update on the ability to manage permissions? I certainly can't find it in the official documentation, but perhaps you know something I'm missing. – tfrascaroli May 16 '18 at 14:25
  • @tfrascaroli sorry not yet – Augusto Goncalves May 16 '18 at 14:33
  • Sorry to bother you again, and if this belongs on a new question I can post it as such, but one of our clients is asking for this. Is there any way in which we can assign users to a project with "default permissions"? Because right now every user we create, even those that we give 'admin' access level on the document_management service, has no access to even see the folders that we create through the api. Is there any way to remedy this? Again, if this is too much for a comment I will post it as a new question. – tfrascaroli May 16 '18 at 14:46
  • @tfrascaroli check `access_level` at http://developer.autodesk.com/en/docs/bim360/v1/reference/http/projects-project_id-users-import-POST/ – Augusto Goncalves May 16 '18 at 15:33
  • Yes, exactly. We are already giving `admin` access to both of those services. But we find that users that get created in this manner have no permissions on the folders. Maybe it is because we are creating users before we create the folders of the project? Basically they can access the project document management section, but then are told to contact the administrator because they have no permissions to view the folder structure. And they are set up as account and project `admin`s. – tfrascaroli May 16 '18 at 18:37
  • It is in esence different than what you get when you check permissions via [CheckPermission command](http://developer.autodesk.com/en/docs/data/v2/reference/http/CheckPermission/). This are the permissions that I'm talking about and the ones that I think that we need to set up. And I presume they are the ones you basically say Forge doesn't support as of now. – tfrascaroli May 16 '18 at 18:43
  • I'm sorry, you were right. If we set both `project_administration` and `document_management` to `admin` access_level (because it is required by the API that both are set if `document_management` is set to admin), then the user has **full rights** to all the folders. We're still struggling with assigning individual permissions on users, but I guess that is what you refer to as 'not yet' possible in your previous comment. Thanks for all the help. – tfrascaroli May 17 '18 at 06:54
  • @tfrascaroli great, if you have additional questions, please start a new thread :) – Augusto Goncalves May 17 '18 at 10:56