Hi legends,
I'm testing the Metabase API and I'm eager to use the POST /api/table/:id/replace-csv
endpoint. I would love some help understanding what is meant by raw-params
in the API docs for that endpoint
I'll add my questions below and please also feel free to point me to any existing resources or links on this topic - I couldn't find any in my own searches in the Discourse community or in the GitHub issue tracker. The most relevant link I could find is the Pull Request that originally created the endpoint: Basic version of CSV replacement, with only basic testing by crisptrutski · Pull Request #40363 · metabase/metabase · GitHub
Questions:
- Are there any code samples/examples available for using this endpoint?
- Based on the PR linked above, it appears the
raw-params
relates to a request body that looks something like the below, but I can't get it to work. What's the correct structure for theraw-params
argument?{ "raw-params": { "file": "...contents of csv file...", } }
- Are the
file
contents supposed to be a literal CSV structure containing the full data as a string (i.e. no base64 encoding or anything), something like the below?{ "file": "id,first_name,email\n1,Jo,jo@example.com\n2,Mary,mary@example.com", }
Thanks in advance for any help you can offer and please let me know if there is any extra clarity I can add!