Donate using PayPal

CycleStreets API (v2)

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

API testing - run one

This API call is used internally for testing the system.

It is meant for the development team and so should be considered fluid.

The API testing system has a long list of predefined named tests. Each test defines an expected result, which can be compared with the actual result of running the test. The result of this API call indicates whether that test passed or failed.

Example

This example runs a named test:

https://api.cyclestreets.net/v2/apitesting.runtest?name=Photomap+categories

Result:

{
    "status": true,
    "time": 55,
    "call": "photomap.categories",
    "apiVersion": 2,
    "name": "Photomap categories",
    "note": false,
    "response": "Hidden",
    "percentage": false,
    "diagnosis": "",
    "diagnosisHtml": false
}

Request parameters - required

name string
Name of the test. These which can contain spaces, so must be URL-encoded.

Request parameters - optional

enablecache 0|1, default 0
Whether to enable cacheable results (generally those relating to journey planning) to be read from the cache, if already cached.
comparison 0|1, default 0
Whether to include a detailed report, in HTML, showing the comparison of the test against the received data.
force 0|1
Tests can be set to be skipped by default. Reasons for doing that include that the test takes time to run, that it is work in progress or that the relevant area data is not loaded. This option forces the test to be tried.

Response

JSON object as above, showing the outcome of the test.

Error response

JSON object containing an error key and a text string.

Example error (text string will vary):

{
    "error": "Cannot find named test."
}

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

My comments relate to: *






Your comments: *
URL of page: * https://newcastle.cyclestreets.net/api/v2/apitesting.runtest/
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.