How do I get a bucket ID to be able to upload files via API?

I’ve referenced the post below, but there is no mention of how to obtain the value to use for {key} in the call “/odata/Buckets({key})/UiPath.Server.Configuration.OData.GetWriteUri”. Is there a call that can be made to return the key based on the folder and storage bucket name?

https://docs.uipath.com/orchestrator/automation-cloud/latest/api-guide/storage-bucket-requests

Hi @joe.foster

Assuming that you are working on Azure cloud, please try this API:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers?api-version=2021-08-01

Make the necessary changes by replacing the relevant data. The response to this request will contain a list of containers in your storage account, including their IDs.

Hope this helps,
Best Regards.

We are not using Azure specifically in this instance. I am trying to get the Orchestrator ID for the storage bucket.

@joe.foster

Yes you have a get buckets call…which would give you the key or unique identifier value for the bucket…get buckets can be filtered on bucket name to get the key…

Please check the swagger endpoint

<OrchestratorUrL>/swagger/index.html#/Buckets/Buckets_Get

https://docs.uipath.com/orchestrator/automation-cloud/latest/api-guide/authorizing-api-calls-in-swagger

Cheers

Thank you, @Anil_G !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.