Mikeumus
Mikeumus

Reputation: 3878

How to share buckets in the Autodesk Data Management API?

How might one share access to their Autodesk bucket to enable other users to view and collaborate on their uploaded models? If the Autodesk Forge Data Management API supports sharing of bucket access or something similar it was clear to me in the docs here: https://developer.autodesk.com/en/docs/data/v2/reference/http/

Maybe I'm just looking in the wrong place.

Upvotes: 3

Views: 485

Answers (4)

Bryan Huang
Bryan Huang

Reputation: 5342

Now it's possible to share buckets with other Forge apps - see here for details.

 {
    "bucketKey":"apptestbucket",
    "policyKey":"transient",
    "permissions": [{
       "authId": "clientCredentialToShareWith1",
       "access": "full/read"
    },
    {
       "authId": "clientCredentialToShareWith2",
       "access": "full/read"
    }
    ...
    ]
  }

However as of now these permissions can only be assigned when the bucket is created so you won't be able to update them afterwards...

Upvotes: 0

Gregra
Gregra

Reputation: 803

Since buckets and files belong to the application (2-legged credentials) and not to the users that created them, the bucket and the files in it are shareable between all the users that use that application.

Upvotes: 1

Felipe
Felipe

Reputation: 4375

I'm not entirely sure sharing a bucket is not possible - as far as OSS API is concerned - looking at the doc for the create bucket endpoint, it clearly seems that the "allow" field of the body is designed for that purpose:

Allow: Objects representing applications to which the owner wants to grant access at bucket creation time

Concretely this is an array of {authId (another app clientId), access (read/full)} identifying applications with which you want to share content of that bucket.

I was testing that with two different Apps I created but was unable to let the second App load the model uploaded on a shared bucket by the first one... I'm checking that with our development team and will update that thread once I gathered more info...

Now if you are talking about the data you have on A360, then Augusto's reply remains valid, you can share with other users an entire hub or invite them to a specific project (granting access to a root folder), but at the time of this writing this is doable only from our UI and will be exposed to API at a later stage. That shared data will be accessible if the user authenticate using their credentials.

If you are interested about sharing content to users and not API access, you could implement your own web application using 2-legged authentication, storing data on OSS and managing your own user accounts where you could have several of your users accessing same models and collaborate around them.

You can also expose your own API to third party users, which access your files using Autodesk APIs in the background

Upvotes: 2

Augusto Goncalves
Augusto Goncalves

Reputation: 8574

You can share using A360 sharing tools (not via API), such as invite to a project. This is not yet available on the API.

Via API, you can create a 3-legged token. During this process, you might share the token or refresh code. The other developer can then access your files (on the scopes you defined), but will act as the user that authorized the access (not a true sharing).

Upvotes: 2

Related Questions