Retrieving safety cameras by country resource
- Last UpdatedSep 17, 2024
- 1 minute read
This example uses the country resource to retrieve a list of all known safety cameras for a country.
Note
Legal exceptions and restrictions regarding safety cameras exist for some countries.
Each request must conform to the following format:
Authorization
Each request requires authentication with a valid bearer token in the HTTP authorization header:
For more information on obtaining credentials, see the Identity and Access Management - Developer Guide.
Path parameters
The following table defines the path parameters supported by the data
resource:
Parameter | Required | Description |
---|---|---|
data_type |
Yes | Either: - static for static safety cameras, or- live for mobile (live) safety cameras. |
data_handle |
Yes | A 3-letter country code in the ISO 3166-1 alpha 3 format. |
Conditional request
The If-None-Match
HTTP header makes conditional requests. The server returns the requested resource with a 200 status only if it doesn't have an ETag matching the given status. If the requested resource has a matching ETag, the condition fails and the server returns a 304 (Not Modified) status code.
For more information on these specifications, see RFC 7232, section 3.2: If-None-Match.
Response
The response status is 200 OK
and the response contains a list of safety cameras in the JSON format.
The response includes an ETag
HTTP header, which contains a fingerprint of the response payload. This value can then make additional conditional requests.