Hi folks. My team and I are starting to use D1 where we need to have one simple table and do some si
Hi folks. My team and I are starting to use D1 where we need to have one simple table and do some simple checks from a CF worker. The way we want to populate the database (regularrly, every two weeks or so) is from a Rails app, where the app downloads a CSV file, process the data and insert/update the D1 table. Pretty straight forward, but the issue we are facing is with the CF API as it's not clear how to insert the new data and populate the table.
In the POST body there are 3 possible objects that we can pass: https://developers.cloudflare.com/api/operations/cloudflare-d1-import-database but it's not clear what we should do next, because the response always have an "upload_url" which is not clear if we need to use that URL for something or not. Is there an example, even better if it's in Ruby, so we can test it? Or a written SOP or something of how should the whole process go.
Thanks in advance!
In the POST body there are 3 possible objects that we can pass: https://developers.cloudflare.com/api/operations/cloudflare-d1-import-database but it's not clear what we should do next, because the response always have an "upload_url" which is not clear if we need to use that URL for something or not. Is there an example, even better if it's in Ruby, so we can test it? Or a written SOP or something of how should the whole process go.
Thanks in advance!
Interact with Cloudflare's products and services via the Cloudflare API



