Donate using PayPal

CycleStreets API (v2)

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

Photomap categories

This API call returns all the photo categories (e.g. cycleparking,obstruction,etc.) and metacategories (e.g. good,bad,event,etc.) available in the Photomap (e.g. see the categorisation page or the legend on the main Photomap page).

The data will include a Unixtime value indicating the cache validity, e.g.: validuntil: 1284497262 . Clients should cache the data until this time.

Example

Example which retrieves the data.

https://api.cyclestreets.net/v2/photomap.categories

Result:

{
    "validuntil": 1402189242,
    "categories": {
        "cycleparking": {
            "name": "Cycle parking",
            "description": "Photos of parked cycles, on racks, railings, in shelters. Or photos of cycle racks themselves."
        },
        "obstructions": {
            "name": "Obstruction",
            "description": "A narrow place, difficult for cycles to pass."
        },
        
        ...
		
        "general": {
            "name": "Other",
            "description": "A general photo."
        }
    },
    "metacategories": {
        "bad": {
            "name": "Problem",
            "description": "A problem that needs to be fixed"
        },
        "good": {
            "name": "Good practice",
            "description": "An example of good practice"
        },
        "other": {
            "name": "Infrastructure",
            "description": "Other (infrastructure-related)"
        },
        "any": {
            "name": "Misc",
            "description": "Non-specific"
        },
        "event": {
            "name": "Event",
            "description": "Event or temporary issue"
        }
    }
}

Request parameters - required

None.

Request parameters - optional

None.

Response

JSON structure as per example above.

Error response

JSON object containing an error key and a text string.

Example error (text string will vary):

{
    "error": "Problem retrieving the categories/metacategories."
}

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

My comments relate to: *






Your comments: *
URL of page: * https://portsmouth.cyclestreets.net/api/v2/photomap.categories/
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.