As the API documentation is generated from the comments to functions in the /api/ folder in GitHub the best way to contribute would probably be a Pull Request adding to these comments.
And BTW it seems this specific API here does not work like many others as stated in the above wiki documentation page.
Other listed parameters (except for URL parameters like :id) should go inside the JSON in the HTTP request body.
Hi, I am trying call /api/card/433/query/json with [{“type”:“category”,“target”:[“variable”,[“template-tag”,“session_id”]],“value”:“4c9188fe-b79e-416f-b432-cdff8466ce88”}],
like this one
curl -X POST
-H “Content-Type: application/json”
-H “X-Metabase-Session: <SESSION_ID>”
“https:///api/card/433/query/json?parameters=%5B%7B%22type%22%3A%22category%22%2C%22target%22%3A%5B%22variable%22%2C%5B%22template-tag%22%2C%22session_id%22%5D%5D%2C%22value%22%3A%224c9188fe-b79e-416f-b432-cdff8466ce88%22%7D%5D”. But I receive an error Illegal clause (no matching fn found): :template-tag
Can you help me?
[SOLVED]: In my case the json stayed look like this [{“type”:“category”,“target”:[“variable”,[“field-id”,6939]],“value”:"<FIRST_FILTER_VALUE>"},{“type”:“category”,“target”:[“variable”,[“field-id”,6935]],“value”:"<SECOND_FILTER_VALUE>"}]
Hi. I’m trying to do exactly what you describe and include the parameters in the URL. Do the special characters (like {) need to be encoded? And do you know if parameters will work at all for CSV? I’m trying to ultimately have these data show up in a spreadsheet.
Thanks for any help you may be able to provide!
Brandon
This worked perfectly, you use the same parameters as the query , but in the "query/json" you put them in the url, and in the plain query, you put them in the data.