Blue API documentation
Feature guides

Follow one workflow from prerequisites through its response and output.

Operation resource

Create entities and add capabilities

Entities are the units, equipment, people, and other things that belong to an operation.

GET / POST / PATCH / DELETE/api/operations/{operation_id}/entities/
01 · Entity shape

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…

02 · Create

Create a basic entity.

This example creates an entity without capabilities. You can add them later.

Create an entity
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.

Use this entity
export BLUE_ENTITY_ID="YOUR_ENTITY_ID"
03 · Add a capability

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.

Add a personnel capability
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}
        }
      ]
    }
  }'
Send the complete capability listPatching profile.capabilities replaces the array. If the entity already has capabilities, include those existing objects along with the new one.
04 · Remove

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.

Delete an entity
curl --request DELETE "$BLUE_API_URL/api/operations/$BLUE_OPERATION_ID/entities/$BLUE_ENTITY_ID" \
  --header "Authorization: Bearer $BLUE_API_KEY"