Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
/custom/savedquery/schedulejob/{jobtitle}/{jobdesc}/{communityIds}/{timeToRun}/{frequencyToRun}/{query}/{inputcollection}/{outputKey}/{outputValue}
Info

Schedules a query job. Returns the output collection id in the data field of the response if successfully queued to run.

A simple web-based utility is available for scheduling jobs.

Authentication

Required, see Auth - Login.

Arguments

jobtitle (required)
A descriptive name of the job being submitted.

...

frequencyToRun (required)
How often the job should be ran, either: NONE, HOURLY, DAILY, WEEKLY, MONTHLY. This will cause the job to get resubmitted after running, use NONE if you only want the job to run once.

query (required)
The mongo query to use to get the jobs data. {} is a blank query or you can submit null.  A typical place to get a query is by using the gui at infinite.ikanow.com and going to Advanced -> Save.JSON object to call. 

inputcollection (required)
The mongo collection you want to use as input. DOC_METADATA is the only currently available option.

...

outputValue (required)
Currently set to "null" will be used in the future.

Example

http://infinite.ikanow.com/api/custom/savedquery/schedulejob/TestJob/Testing%20map%20reduce/4e9c77ef17ef3523b657a890/0/NONE/null/DOC_METADATA/null/null

Example Response
Info
Code Block
{"response":{"action":"Schedule MapReduce Job","success":true,"message":"Job scheduled successfully, will run on: Wed Dec 31 19:00:00 EST 1969","time":246},"data":"4f2007dd8196fe53a52c25a1"}
Error Response
Info
Code Block
{"response":{"action":"Schedule MapReduce Job","success":false,"message":"You are not allowed to use the given input collection.","time":142}}