1. Home
  2. Docs
  3. Detection & Identification API document
  4. Sentry People Finder API

Sentry People Finder API

Sentry People Finder feature detects the people in a given image and provides the bounding box coordinates encapsulating the area.

The feature works on two requests on a single endpoint. The image has to be submitted through a POST request which returns a unique image ID. This ID has to be used to get the results using a GET request on the endpoint. 

The API details are given below.

/people
Endpoint URL:  https://6plof56cpj.execute-api.us-west-2.amazonaws.com/v1/people
Request Type: POST
Header:
 {
"content-type": "application/json", 
"x-api-key": "<API Key>", 
"cache-control": "no-cache"
}

X-api-key: Get your API key from Sentry.

Request Body:
{
"body": {
		"Site_Id": "string",
		"Camera_Name": "string",
		"Image_Bytes": "string"
  	}
}
ParameterDescriptionData Type
Site_IdUniquely identifies the site where camera is hosted. You can get this ID from Sentry.string
Camera_NameName for the camera.string
Image_BytesImage byte stream in base64 encoded format.Base64 encoded

Response: 

Here is an example of a successful response containing the unique ID for image.

200 Response
{
'image_id': 'Site-Id_Camera-Name_timestamp', 
}


/people
Endpoint URL: https://6plof56cpj.execute-api.us-west-2.amazonaws.com/v1/people
Request Type: GET
Header:
 {
"content-type": "application/json", 
"x-api-key": "<API Key>", 
"cache-control": "no-cache"
}

X-api-key: Get your API key from Sentry.

Query String:
{
	“Image_id” : “<Image ID returned from the POST request above>”
}

Response:

Here is an example response containing the Bounding Box coordinates.

200 Response
{
‘BoundingBoxes’:  '[[94, 184, 327, 419], [185, 535, 323, 630]]'

}

The bounding boxes are ordered [top, left, bottom, right] in pixels. If the image processing is not yet completed the response will be “PROCESSING”.

On errors, the “Status Message” field will contain a description for the error.

Was this article helpful to you? Yes No

How can we help?