Donate using PayPal

CycleStreets API (v2)

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

API testing - multiple

This API call runs multiple tests.

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

The output for each test within the overall response is the same format as apitesting.runtest.

The API testing system has a long list of predefined named tests, as listed in the apitesting.runtests page.

Example

This example runs all tests whose name matches the string categories:

https://api.cyclestreets.net/v2/apitesting.runtests?name=categories

Result:

{
    "summary": {
        "testsTotal": 21,
        "testsPassed": 9,
        "testsPassedPercentage": 43,
        "testsAllPassed": false,
        "partsTotal": 31,
        "partsPassedTotal": 13,
        "partsPassedPercentage": 42,
        "timeTotalMs": 4481
    },
    "results": {
        "Photomap categories": {
            "status": true,
            "time": 517,
            "call": "photomap.categories",
            "apiVersion": 2,
            "name": "Photomap categories",
            "note": false,
            "response": "Hidden",
            "parts": 1,
            "partsPassed": 1,
            "percentage": 100
        },
        "PhotomapCategories v1": {
            "status": true,
            "time": 3007,
            "call": "photomapcategories",
            "apiVersion": 1,
            "name": "PhotomapCategories v1",
            "note": false,
            "response": "Hidden",
            "parts": 1,
            "partsPassed": 1,
            "percentage": 100
        },
        …
    }
}

Request parameters - required

None.

Request parameters - optional

name string
Filter to only those tests whose name matches the supplied string, matched case-insensitively. Partial name matches are supported; e.g. name=categories would match the tests "Photomap categories" and "PhotomapCategories v1".
call string
Filter to only those tests whose call name (e.g. journey.plan) matches the supplied string. Partial name matches are supported; e.g. call=journey would match journey.plan, journey.retrieve, and others containing journey.
apiVersion 1|2
Filter to only those tests whose API version matches the specified value.
set string
If a server has more than one set of tests installed, filter to only those tests within the specified set.
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.

Response

JSON object as above, showing the outcome of each test, with a summary at the top.

Error response

JSON object containing an error key and a text string.

Example error (text string will vary):

{
    "error": "Unknown error."
}

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

My comments relate to: *






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