Donate using PayPal

CycleStreets API (v2)

  • Details for:
  • API overview
  • Obtain API key
  • Usage policy
  • Uptime policy

Batch routes matrix - control job

This API call controls a batch matrix job that has been created using batchroutes.createjob API call.

Note that, by default, jobs are auto-started within the batchroutes.createjob API call, so you do not normally need to use this.

It returns a URL of the batchroutes.jobdata API call that can be polled to determine when the data is available.

Example

Example which starts asyncronous planning of a batch job.

POST https://api.cyclestreets.net/v2/batchroutes.controljob?key=...
(
	[id] => 69158
	[action] => start
	[username] => myusername
	[password] => mypassword
)

Result:

{
    "id": 69158,
    "status": "open",
    "statusUrl": "https://api.cyclestreets.net/v2/batchroutes.jobdata?key=..."
}

Request parameters - required

id int
Batch job ID, as returned from batchroutes.createjob.
action string (start|pause|continue|terminate)

Action to take. Available actions are:

  • start: Start (open) job
  • pause: Pause job
  • continue: Continue (re-open) job
  • terminate: Stop job and delete generated data (leaving job definition itself in place)
username string
Your CycleStreets account username. In due course this will be replaced with an OAuth token.
password string
Your CycleStreets account password.

Request parameters - optional

None.

Response

JSON response as above, containing a result status and the URL to poll which gives the progress.

The returned status values are:

  • ready: The job is ready to be started
  • open: The job is being planned
  • paused: The job is paused
  • finalising: The job results are being finalised
  • complete: The job is complete

Error response

JSON object containing an error key and a text string.

Example error (text string will vary):

{
    "error": "An error occurred while controlling the job."
}

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *






Your comments: *
URL of page: * https://colchester.cyclestreets.net/api/v2/batchroutes.controljob/
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.