API operation to get the device count in the specified area during a certain time interval.
POST/regiondevicecount/count
Get the number of devices in the specified area during a certain time interval.
- The query area can be a circle or a polygon composed of longitude and latitude points.
- If the areaType is circle, the circleCenter and circleRadius must be provided; if the area is a polygon, the point list must be provided.
- If starttime and endtime are not passed in,this api should return the current number of devices in the area.
- If the device appears in the specified area at least once during the certain time interval, it should be counted.
Body ParametersJSON
endtime: optional string
Ending timestamp for counting the number of devices in the area. It must follow RFC 3339 and must have time zone.
formatdate-time
sink: optional string
The URL where the API response will be asynchronously delivered, using the HTTP protocol.
formaturi
starttime: optional string
Starting timestamp for counting the number of devices in the area. It must follow RFC 3339 and must have time zone.
formatdate-time
API operation to get the device count in the specified area during a certain time interval.
curl https://api.example.com/camara/regiondevicecount/count \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CAMARA_BEARER_TOKEN" \
-d '{
"endtime": "2023-07-04T14:27:08.312+02:00",
"sink": "https://endpoint.example.com/sink",
"starttime": "2023-07-03T14:27:08.312+02:00"
}'{
"count": 100,
"status": "SUPPORTED_AREA"
}{
"count": 100,
"status": "PART_OF_AREA_NOT_SUPPORTED"
}{
"status": "AREA_NOT_SUPPORTED"
}{
"status": "DENSITY_BELOW_PRIVACY_THRESHOLD"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.TIME_INVALID_ARGUMENT",
"message": "starttime and endtime cannot be passed separately. Either both are passed or neither is passed."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.INVALID_END_DATE",
"message": "Indicated endTime is earlier than the startTime."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.INVALID_CIRCLE_AREA",
"message": "Missing circle center or radius."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.INVALID_POLYGON_AREA",
"message": "The area is not a polygon shape or has an arbitrary complexity."
}{
"status": 400,
"code": "INVALID_CREDENTIAL",
"message": "Only Access token is supported"
}{
"status": 400,
"code": "INVALID_TOKEN",
"message": "Only bearer token is supported"
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.UNSUPPORTED_SYNC_RESPONSE",
"message": "Indicated combination of area or time interval is too big for a sync response"
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.UNSUPPPORTED_REQUEST",
"message": "Indicated combination of area or time interval is too big"
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 403,
"code": "INVALID_TOKEN_CONTEXT",
"message": "{{field}} is not consistent with access token."
}{
"status": 429,
"code": "QUOTA_EXCEEDED",
"message": "Out of resource quota."
}{
"status": 429,
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit reached."
}Returns Examples
{
"count": 100,
"status": "SUPPORTED_AREA"
}{
"count": 100,
"status": "PART_OF_AREA_NOT_SUPPORTED"
}{
"status": "AREA_NOT_SUPPORTED"
}{
"status": "DENSITY_BELOW_PRIVACY_THRESHOLD"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.TIME_INVALID_ARGUMENT",
"message": "starttime and endtime cannot be passed separately. Either both are passed or neither is passed."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.INVALID_END_DATE",
"message": "Indicated endTime is earlier than the startTime."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.INVALID_CIRCLE_AREA",
"message": "Missing circle center or radius."
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.INVALID_POLYGON_AREA",
"message": "The area is not a polygon shape or has an arbitrary complexity."
}{
"status": 400,
"code": "INVALID_CREDENTIAL",
"message": "Only Access token is supported"
}{
"status": 400,
"code": "INVALID_TOKEN",
"message": "Only bearer token is supported"
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.UNSUPPORTED_SYNC_RESPONSE",
"message": "Indicated combination of area or time interval is too big for a sync response"
}{
"status": 400,
"code": "REGION_DEVICE_COUNT.UNSUPPPORTED_REQUEST",
"message": "Indicated combination of area or time interval is too big"
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 403,
"code": "INVALID_TOKEN_CONTEXT",
"message": "{{field}} is not consistent with access token."
}{
"status": 429,
"code": "QUOTA_EXCEEDED",
"message": "Out of resource quota."
}{
"status": 429,
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit reached."
}