R2 site REST API?
I just want to check if this is relatively doable since I’m an ultra basic cloudflare user and don’t know my way around the system too well - I have a simple R2 bucket setup to serve a static website to a squarespace domain. What I would love to do is have a super simple REST API for my site that returns some json when given json, doesn’t even need to be authenticated and can be 100% public. I’m more than happy to do this by other means than an R2 as long as it’s free, and am also totally fine with using JavaScript or python to get the job done. Just looking for some pointers here or someone to tell me cloudflare isn’t the right tool for it! Thanks 🙂
4 Replies
I should mention that the REST API should be under a directory of my squarespace domain as opposed to a random cloudflare-assigned domain, so like mysite.com/myapi/dostuff
That sounds like a Worker, but I don’t quite understand what you are trying to get the API to do
I just want to convert a Spotify song url to its equivalent on YouTube, and there are both python and JavaScript libraries that are able to do it
I think that would just be Workers then? You wouldn’t need R2, unless you want to store the lookup?