Simple Restful Flask API (Python) for campaigns.
If category is not provided you need to extract it from the dummy category extraction service. Here
Also, to visulaize the data based on some paramters passed on in the query and show it up in a UI generated.
To run the API server.
execute the command “python api_server.py”
There is 5 Endpoints in the Server:
[‘Post’] http://127.0.0.1:5000/campaign/api/
[‘Delete’] http://127.0.0.1:5000/campaign/api/
This
For Post and Put you enter your params in the body of request using Postman or any other utility as a JSON object including the columns of data.
E.g
{
“name”: “n6”,
“country”: “USA”,
“budget”: 149,
“goal”: “Success”,
“category”: “Sports”
}
E.g:
{
“dimensions”: “country”,
“fields”: [“goal”,”name”]
}
where, Dimensions and Fields both can be an array of data colns and Dimensions are used to group data by these fields
while Fields is the array of fields to return in each campaign.