/api/import/:id
Posts data to BellaDati in JSON format.
Resource Information
Resource URL | |
HTTP Method |
|
Parameters
Parameters | Detail |
---|---|
| ID of the data set. You can find the ID in the response to |
| Data content to submit, in JSON format. For each field, the key is the ID of the form element to save as the given value.
{ "columns" : [ { "code" : "L_COUNTRY_OR_AREA" }, { "code" : "L_DATE" "format" : "yyyy-MM-dd" } ], "overwrite": { "policy": "DELETE_ALL", "dateFrom": "yyyy-MM-dd", "dateTo": "yyyy-MM-dd", "dateAttribute": "L_DATE", "attributesAll": true | false "overwriteAttributes": [ "L_ID", "L_DATE" ] } "data" : [ [ "Country or Area-data-0", "2014-01-01" ], [ "Country or Area-data-1", "2014-01-01" ] ] }
|
Sample Request / Response
Using curl
:
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "data={\"columns\" : [ { \"code\" : \"L_COUNTRY_OR_AREA\" }, { \"code\" : \"L_DATE\" \"format\" : \"yyyy-MM-dd\" } ], \"data\" : [ [ \"Country or Area-data-0\", \"2014-01-01\" ], [ \"Country or Area-data-1\", \"2014-01-01\" ] ] }" https://service.belladati.com/api/import/15
When the form has been submitted successfully, the server replies with an HTTP status code of 200 and an empty body.