Functions of data uploading management - datawizio/pythonAPI GitHub Wiki
Parameter | Value |
function | upload_to_service clear_client cache_data |
<email> E-mail to which a notification will come when the function is done. |
The function uploads data of a user to service and starts randomising. Example of request:
POST /api/v1/utils/
{
"function": "upload_to_service"
"email": "[email protected]"
}
Server's response:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: POST
{"results": "Task was started."}
Example of response with an error:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: POST
{"results": "Task start failed. Perhaps, another task still running"}
The function starts data caching process. It accepts 2 not obligatory parameters:
date_from
- starting date from when the data has to be cached
date_to
- final date till when the data has to be cached
Example of the request:
POST /api/v1/utils/
{
"function": "cache_data"
"date_from": "2016-1-1",
"date_to": "2016-2-1",
"email": "[email protected]"
}
Server's response:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: POST
{"results": "Task was started."}
Server's response with an error:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: POST
{"results": "Task start failed. Perhaps, another task still running"}
The function clears all data of the client
POST /api/v1/utils/
{
"function": "clear_client",
"email": "[email protected]"
}
Server's response:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: POST
{"results": "Task was started."}
Server's response with an error:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: POST
{"results": "Task start failed. Perhaps, another task still running"}