By the looks of things I need to pass a raw json value instead of form data.
I've managed to make further progress when using the Chrome Postman extension but when using Ebase I get errors.
Code: Select all
var d = {
"name":"my_dataset_name",
"notes":"A long description of my dataset",
"owner_org":"organisation"
}
var response = services.rest.post(u, null, headers, d);
Code: Select all
Bad request - JSON Error: Error decoding JSON data. Error: JSONDecodeError('Expecting value: line 1 column 1 (char 0)',) JSON data extracted from the request: 'notes=A long description of my dataset&name=my_dataset_name&owner_org=organisation'
How can I pass the raw value in using Ebase? Or has anyone any experience of calling CKAN api from in Ebase?
Thanks