Can I assign a job to a worker via the API?

Yes, Absolutely.  There are two ways for you to do it:


Option 1 - Assign an existing job to a worker.

You will need to update the existing job using a PUT.  To complete this, you will need to know:

  • The Job ID
  • The Worker ID
  • Your API Key

Send the PUT to:[JOB_ID].xml?api_key=[API_KEY]

Include the XML below:
<published_at type="datetime">2012-01-26T05:30:00+00:00</published_at>
<planned_start_at type="datetime">2012-01-26T05:30:00+00:00</planned_start_at>

Replace the JOB_ID, the API_KEY, the WORKER_ID and the two timestamps with the correct values for your account.  The timestamps for <published_at> and <planned_start_at> can be the same thing. They should be the time that the worker is supposed to start the job, but could be the time right now.


Option 2 - Create and assign a job in one step.

To create a new job and assign it to the worker in one step, create your job as your normally would with a POST to:[API_KEY]

But include the additional XML above in the initial job POST.

Need more information? ask us hereHave more questions? Submit a request