Face Monitor Status
You can use the Check Face Status API to verify if a specific individual (identified by their externalId) is currently being monitored in the system. This helps ensure that a person’s monitoring status is active or to confirm their removal.
API Endpoint
- HTTP Method:
GET
- Private Server Base URL:
https://10.0.0.123:5022
- Cloud Server Base URL:
https://customername.econnectcloud.com/eventsbridge
Authentication
This API call requires authentication with a JWT token, which must be passed in the header of the request.
Path Parameter
externalId
: The unique ID assigned to the person during the enrollment process.
Code Examples
- C#
- Curl
- PowerShell
using eConnect.EventsBridge.Sdk;
// Assuming sdk is already initialized with authentication
// Define the externalId
string externalId = "12345";
// Check enrollment status
var status = await sdk.FaceMonitorStatusCheckAsync(externalId);
// Process the result
Console.WriteLine($"Face with External ID {externalId} is {(status.Enrolled ? "enrolled" : "not enrolled")}.");
# Define variables
API_URL="https://your-domain.com/eventsbridge"
TOKEN="your_token"
EXTERNAL_ID="12345"
# Check enrollment status
curl -X GET "$API_URL/api/v1/faces/monitor/$EXTERNAL_ID" \
-H "Authorization: Bearer $TOKEN"
# Define variables
$API_URL = "https://your-domain.com/eventsbridge"
$TOKEN = "your_token"
$EXTERNAL_ID = "12345"
# Check enrollment status
$statusResponse = Invoke-RestMethod -Uri "$API_URL/api/v1/faces/monitor/$EXTERNAL_ID" -Method Get -Headers @{ "Authorization" = "Bearer $TOKEN" }
# Process the result
Write-Output "Face with External ID $EXTERNAL_ID is $($statusResponse.enrolled ? 'enrolled' : 'not enrolled')."
Raw Sample
Here’s an example of how to use the GET method to check if a face is being monitored:
- C#
- Curl
- PowerShell
using eConnect.EventsBridge.Sdk;
// Assuming sdk is already initialized with authentication
// Define the externalId
string externalId = "12345";
// Check enrollment status
var status = await sdk.FaceMonitorStatusCheckAsync(externalId);
// Process the result
Console.WriteLine($"Face with External ID {externalId} is {(status.Enrolled ? "enrolled" : "not enrolled")}.");
# Define variables
API_URL="https://your-domain.com/eventsbridge"
TOKEN="your_token"
EXTERNAL_ID="12345"
# Check enrollment status
curl -X GET "$API_URL/api/v1/faces/monitor/$EXTERNAL_ID" \
-H "Authorization: Bearer $TOKEN"
# Define variables
$API_URL = "https://your-domain.com/eventsbridge"
$TOKEN = "your_token"
$EXTERNAL_ID = "12345"
# Check enrollment status
$statusResponse = Invoke-RestMethod -Uri "$API_URL/api/v1/faces/monitor/$EXTERNAL_ID" -Method Get -Headers @{ "Authorization" = "Bearer $TOKEN" }
# Process the result
Write-Output "Face with External ID $EXTERNAL_ID is $($statusResponse.enrolled ? 'enrolled' : 'not enrolled')."
Request
GET https://10.0.0.123:5022/api/v1/faces/monitor/12345
Authorization: Bearer <your_jwt_token>
Content-Type: application/json
Response
- 200 OK: Enrolled Response Payload
- 500 Internal Server Error: An issue occurred on the server side.
- 401 Unauthorized: Missing or invalid JWT token.
Example Response
{
"enrolled": true
}
In this example, the enrolled field will return:
true
: if the face is currently being monitored. Note, this requires that all systems return true. If there are multiple FR servers in the mix, this will return false if one is missing, even if others are there.
false
: if the face is not monitored.
Additional Notes
Make sure to use the same externalId that was supplied during enrollment. The externalId provided in the URL must match an existing enrollment to return accurate results.