label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

Route `api/storages/azure` does not exist

Open jpavel opened this issue 2 years ago • 2 comments

Describe the bug At least one of the API routes described in the documentation does not exist. Namely it is the command to list all storages on Azure: api/storages/azure. Nevertheless, direct call to storage by its ID (e.g. http://localhost:8080/api/storages/azure/1) works as expected

To Reproduce Steps to reproduce the behavior:

  1. Go to http://localhost:8080/api/storages/azure (for local deployment)
  2. See 404 Not found

Expected behavior Response including the list of storages as described in the documentation.

Environment (please complete the following information):

  • OS: Ubuntu 20.04
  • Label Studio Version 1.4.1

jpavel avatar Jun 10 '22 08:06 jpavel

Thank you for pointing us to this issue, we've created a ticket. This endpoint is not fully implemented.

makseq avatar Jun 14 '22 01:06 makseq

I have got the same issue with the route api/storages/gcs too

chaowatson avatar Jul 18 '22 10:07 chaowatson

Also affecting api/storages/s3. @makseq is there a recommended workaround for the time being? I need to be able to programmatically sync storage (which requires the storage ID that I'm trying to get from the missing endpoint)

addisonklinke avatar Aug 27 '22 03:08 addisonklinke

Try to add project parameter.

api/storages/s3?project=YOUR_PROJECT_ID

triklozoid avatar Aug 29 '22 08:08 triklozoid

Thanks @triklozoid ! This indeed works as expected. I can also see it in the documentation for API in 1.5.0post0. As a closing suggestion, you might perhaps indicate that the project id is a compulsory query parameter and show it in the example (https://labelstud.io/api#operation/api_storages_azure_list).

From my point of view, the issue is resolved, thus closing it.

jpavel avatar Aug 29 '22 10:08 jpavel