Skip to main content
The Emergency API provides endpoints for managing emergency alerts in FreeTAKServer. Emergency alerts notify connected clients of urgent situations and can include location data.

Get Emergencies

Retrieve all active emergency alerts.
curl -X GET "http://localhost:19023/ManageEmergency/getEmergency" \
  -u "username:password"

Authentication

This endpoint requires HTTP Basic Authentication.

Response

json_list
array
Array of emergency objects

Response Example

{
  "json_list": [
    {
      "uid": "emergency-uid-123",
      "name": "ALPHA-1",
      "type": "911 Alert",
      "lat": 40.7128,
      "lon": -74.0060
    }
  ]
}

Create Emergency Alert

Create and broadcast a new emergency alert to all connected clients.
curl -X POST "http://localhost:19023/ManageEmergency/postEmergency" \
  -u "username:password" \
  -H "Content-Type: application/json" \
  -d '{
    "emergencyType": "911 Alert",
    "latitude": 40.7128,
    "longitude": -74.0060,
    "name": "ALPHA-1",
    "remarks": "Medical emergency"
  }'

Authentication

This endpoint requires HTTP Basic Authentication.

Request Body

emergencyType
string
required
Type of emergency. Valid values:
  • 911 Alert - General emergency alert
  • Ring The Bell - Urgent attention required
  • Geo-fence Breached - Location boundary violation
  • In Contact - Contact with hostile forces
latitude
float
required
Latitude coordinate of the emergency location
longitude
float
required
Longitude coordinate of the emergency location
name
string
Callsign or name of the emergency source
remarks
string
Additional details about the emergency

Response

message
string
The UID of the created emergency event

Response Example

{
  "message": "emergency-uid-abc123"
}

Delete Emergency Alert

Cancel an active emergency alert and notify all clients.
curl -X DELETE "http://localhost:19023/ManageEmergency/deleteEmergency" \
  -u "username:password" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "emergency-uid-123"
  }'

Authentication

This endpoint requires HTTP Basic Authentication.

Request Body

uid
string
required
The UID of the emergency alert to cancel

Response

message
string
The UID of the cancelled emergency

Response Example

{
  "message": "emergency-uid-123"
}

Emergency Types

FreeTAKServer supports the following emergency types:
TypeCoT Type CodeDescription
911 Alertb-a-o-tblGeneral emergency alert
Ring The Bellb-a-o-panUrgent attention required
Geo-fence Breachedb-a-gLocation boundary violation
In Contactb-a-o-opnContact with hostile forces

Emergency Broadcasting

When an emergency is created or deleted:
  1. The event is serialized to CoT format
  2. Broadcast to all clients on TCP CoT service
  3. Broadcast to all clients on SSL CoT service
  4. Stored in emergency persistence for retrieval

Error Responses

Emergency endpoints return standard error responses for authentication failures and internal errors. If an emergency object is missing required attributes, it will be logged but not included in the response list.

Build docs developers (and LLMs) love