/custom/mapreduce/getresults/{jobid_or_jobtitle}?limit=200
Info |
---|
Returns the results of a map reduce job. |
...
Required, see Auth - Login.
Arguments
jobid _or_jobtitle (required)
The id or title of a job you want the results of. You can find the id by writing it down when submitting a job or using Get Jobs.
find (optional)
A string representing a MongoDB query (in JSON format) that is applied to the results of the custom table. WARNING: for large custom tables, will be really slow unless the field (/fields) is (/are) indexed via "$output.indexes" or "$output.sortField" (see Schedule Job API call)
Warning |
---|
Note that MongoDB uses some JSON extensions that must be used in queries from the command line:
The full list is here: http://docs.mongodb.org/manual/reference/mongodb-extended-json/ |
sort (optional)
A string representing a MongoDB sort operator (in JSON format). WARNING: for large custom tables, will be really slow or fail unless the field (/fields) is (/are) indexed via "$output.indexes" or "$output.sortField" (see Schedule Job API call)
Info |
---|
You can always use sort={_id:1} or sort={_id:-1} to view the first or last records. |
limit (optional)
An integer of how many results you want retrieved from the database, results will be grabbed in whatever order they have been stored in the db.
Example
http://infinite.ikanow.com/api/custom/mapreduce/getresults/4e9c77ef17ef3523b657a890?limit=200
http://infinite.ikanow.com/api/custom/mapreduce/getresults/4e9c77ef17ef3523b657a890?limit=10&find={'indexed.field':'VALUE'}
http://infinite.ikanow.com/api/custom/mapreduce/getresults/customjob1?limit=50&sort={'sort.field':-1}
Example Response
Info | ||
---|---|---|
|
Error Response
Info | ||
---|---|---|
|