-
Notifications
You must be signed in to change notification settings - Fork 4
Start Harvest Job
Tony Pujals edited this page Oct 21, 2013
·
4 revisions
Start a harvest job to import retailer information published in USDA files into MongoDB.
POST jobs/harvest
curl -X POST http://api.snapfinder.org/v1/jobs/harvest
When the harvest job is complete, a POST request can be submitted to a designated callback URI. If callback-data is provided, this will be included in the data posted to the callback URI.
curl -X POST http://api.snapfinder.org/v1/jobs/harvest
-d '{"callback-uri":"http://callbackuri/","callback-data":"{\"key\":\"value\"}"'
Returns immediately with HTTP 202 (Accepted). The job will start running.
Job status can be retrieved with a GET request.
{
"status": "success",
"count": 193627,
"timestamp": "Tue Sep 17 2013 13:12:44 GMT-0700 (PDT)",
"callback-data": {
"key": "value"
},
"_id": {
"$oid": "5238b7bc1db286f61103c702"
}
}