How to get a list of all safety cameras in a country
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:
GET
{header}
.../alerts/v1/data/<data_type>/<data_handle>
GET
{header}
.../v2/<data_type>/<data_handle>
Authorization
Each request requires authentication with a valid bearer token in the HTTP authorization header:
Authorization: Bearer <token>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.
If-None-Match: "<etag_value>"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.
ETag: "19db065f2ad7ace37a82ea71949e103171296a79"Updated last month