Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest Api For Storage Questions/Suggestions #441

Open
dorryspears opened this issue Feb 25, 2024 · 2 comments
Open

Rest Api For Storage Questions/Suggestions #441

dorryspears opened this issue Feb 25, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@dorryspears
Copy link

Improve documentation

Link

https://supabase.github.io/storage/#

Describe the problem

  • For a lot of these endpoints in the link I have above, they have "wildcard" specified.
    This seems ambiguous to me since this isn't a wild card in the sense that I can do something like this
    to grab all of the text files within an object for the GET object/authenticated endpoint
*.txt

Unless it is and I am using it wrong.

  • Also, I am unsure where the user reading these docs would find the full endpoint. For example, there is the Supabase URL and the endpoints specified in the link above but there is still the storage/v1 part of the URL that the user still needs to find. Not sure where this is. I managed to find it in the source code here
  • The swagger docs are also unusable for executing any of the endpoints.

Describe the improvement

  • Change wildcard to path
  • Prepend storage/v1 to the endpoints
  • Make a REST API md file or some sort of other REST documenation.

Additional context

I am currently building a Rust wrapper for the Storage Product 🥳

@dorryspears dorryspears added the documentation Improvements or additions to documentation label Feb 25, 2024
@fenos
Copy link
Contributor

fenos commented Mar 5, 2024

Hi @dorryspears thanks a lot for your suggestions.

For a lot of these endpoints in the link I have above, they have "wildcard" specified.
This seems ambiguous to me since this isn't a wild card in the sense that I can do something like this
to grab all of the text files within an object for the GET object/authenticated endpoint
*.txt

The "wildcard" parameter in the url structure is meant to match any url segment past object/{bucket}/ for instance, if you want to store a file under the following key: {bucket}/one-folder/second-folder/file.png the wildcard parameter will be one-folder/second-folder/file.png maybe the name wildcard is a bit too generic, we could probably change that.

Also, I am unsure where the user reading these docs would find the full endpoint. For example, there is the Supabase URL and the endpoints specified in the link above but there is still the storage/v1 part of the URL that the user still needs to find. Not sure where this is. I managed to find it in the source code here

It is a good point, we could probably document the endpoint more in our docs.
Currently, the only place that is visible is here: https://supabase.com/docs/guides/storage/serving/downloads

The swagger docs are also unusable for executing any of the endpoints.
👍 we'll improve on that

@mb21
Copy link

mb21 commented Apr 2, 2024

Relatedly, would be great to have the localhost URL documented somewhere.

What's the equivalent to https://${SUPABASE_PROJECT_ID}.supabase.co/storage/v1/upload/resumable on localhost? http://localhost:54323/storage/v1/upload/resumable gives a CORS error, so probably not the right endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants