Create entities and add capabilities
Entities are the units, equipment, people, and other things that belong to an operation.
/api/operations/{operation_id}/entities/An entity is a profile with optional state and capabilities.
profile holds identity such as the entity name, SIDC, affiliation, and capabilities. current_state holds changing information such as its GeoJSON location and readiness. metadata is an optional object for integration-specific data. The API adds the entity ID, operation ID, revision, and timestamps to its response.
Capabilities are optional typed objects inside profile.capabilities. They describe what an entity can do, such as carry personnel, move on the ground, operate a radar, or transmit over a radio.
Loading entity schemas…
Create a basic entity.
This example creates an entity without capabilities. You can add them later.
curl --request POST "$BLUE_API_URL/api/operations/$BLUE_OPERATION_ID/entities/" \
--header "Authorization: Bearer $BLUE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"profile": {
"unit_name": "Relay Alpha",
"sidc": "10031000001211000000",
"affiliation": "friendly"
},
"current_state": {
"location": {"type": "Point", "coordinates": [-93.08, 31.11]}
}
}'Copy the returned id for the next requests.
export BLUE_ENTITY_ID="YOUR_ENTITY_ID"Add a capability to the entity.
Patch profile.capabilities with capability objects from the schema table. This example adds the personnel capability to the entity created above.
curl --request PATCH "$BLUE_API_URL/api/operations/$BLUE_OPERATION_ID/entities/$BLUE_ENTITY_ID" \
--header "Authorization: Bearer $BLUE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"profile": {
"capabilities": [
{
"id": "personnel-1",
"type": "organization.personnel",
"schema_version": 1,
"model": "Assigned strength",
"config": {"total": 90}
}
]
}
}'profile.capabilities replaces the array. If the entity already has capabilities, include those existing objects along with the new one.Remove an entity from the operation.
Deleting an entity removes it from the operation's active entity list. The API retains an archived record and returns its final representation.
curl --request DELETE "$BLUE_API_URL/api/operations/$BLUE_OPERATION_ID/entities/$BLUE_ENTITY_ID" \
--header "Authorization: Bearer $BLUE_API_KEY"