- TaskService
  - post Create a new task
  - post Search tasks
  - get Get task by ID
  - put Update task state

API docs by Redocly

# Raft Warfighting Data Model (WDM) Task Service API (1.0)

Download OpenAPI specification:

REST API for managing task lifecycle and execution in the Raft Warfighting Data Model (WDM). Handles task creation, assignment to principals (persons, units, systems), state tracking, and real-time distribution for execution.

Note: Streaming APIs (StreamTasks) are only available via gRPC and are not supported over standard REST/HTTP at this time.

## TaskService

## Create a new task

Creates a new task in the system. If task.id is not provided, a UUID will be generated. Initial state defaults to DRAFT unless specified.

Important: Tasks are immutable after creation except for state transitions. To modify task details, cancel the existing task (set state to CANCELLED) and create a new one.

##### Authorizations:

rdp_basic rdp_jwt rdp_api_key

##### Request Body schema: application/json
required

Request body for creating a new task. Note: Tasks are immutable after creation except for state transitions.

required | object (v1Task) A directed action to be performed by a principal (e.g., person, unit, or system). Tasks represent the command and control (C2) layer: orders, requests, and assignments that drive operations. They connect requestors (who wants something done) with executors (who will do it). IMPORTANT: Tasks are immutable after creation except for state transitions. If task details need to change, cancel the existing task (set state to TASK_STATE_CANCELLED) and create a new one with the correct information. Examples: ISR collection request, fire mission, movement order, logistics request, sensor tasking.

### Responses

/api/v1/wdm/tasks

### Request samples

- Payload

Content type
application/json
`
{

- "task":
  {
  - "assignedTo":
    {
    - "id": "unit-123",
    - "type": "PRINCIPAL_TYPE_ENTITY"
    },
  - "description": "Conduct ISR collection on target area",
  - "name": "ISR Collection Alpha",
  - "priority": "TASK_PRIORITY_HIGH",
  - "provenance":
    {
    - "name": "ops-center-01",
    - "requestId": "7c2a1234-5678-90ab-cdef-1234567890ab",
    - "source": "C2",
    - "sourceNodeId": "8d4b2f90-5678-90ab-cdef-1234567890cd",
    - "updatedAt": "2024-01-15T10:30:00Z"
    },
  - "requestedBy":
    {
    - "id": "user-456",
    - "type": "PRINCIPAL_TYPE_USER"
    },
  - "state": "TASK_STATE_DRAFT",
  - "type": "isr_collection"
  }

}`

### Response samples

- 200
- 400
- 401
- 403
- 500
- default

Content type
application/json
`
{

- "task":
  {
  - "assignedTo":
    {
    - "id": "unit-123",
    - "type": "PRINCIPAL_TYPE_ENTITY"
    },
  - "description": "Conduct ISR collection on target area",
  - "id": "550e8400-e29b-41d4-a716-446655440000",
  - "name": "ISR Collection Alpha",
  - "priority": "TASK_PRIORITY_HIGH",
  - "provenance":
    {
    - "name": "ops-center-01",
    - "updatedAt": "2024-01-15T10:30:00Z"
    },
  - "requestedBy":
    {
    - "id": "user-456",
    - "type": "PRINCIPAL_TYPE_USER"
    },
  - "state": "TASK_STATE_DRAFT",
  - "type": "isr_collection"
  }

}`

## Search tasks

Retrieves a paginated list of tasks matching the specified filter criteria.

##### Authorizations:

rdp_basic rdp_jwt rdp_api_key

##### Request Body schema: application/json
required

Request message for retrieving multiple tasks.

| object (v1TaskQuery) Query criteria for retrieving tasks from storage. Uses a flat structure where all criteria are combined with AND logic between fields, and OR logic within repeated fields. Optimized for efficient bulk retrieval. Empty query returns all tasks. Logic semantics: Multiple values within a repeated field use OR (e.g., states=[1,2] means state=DRAFT OR state=PENDING) Different fields are combined with AND (e.g., states=[7] AND priorities=[3]) Examples: Query high-priority in-progress tasks:
    {
      "states": [7],
      "priorities": [3]
    }
Matches: `state=IN_PROGRESS AND priority=HIGH` Query tasks assigned to specific principals:
    {
      "assigned_to": [
        {"id": "unit-123", "type": "PRINCIPAL_TYPE_ENTITY"}
      ]
    }
Query pending or approved fire missions:
    {
      "states": [2, 3],
      "type": ["fire_mission"]
    }
Matches: `(state=PENDING OR state=APPROVED) AND type="fire_mission"` Query ISR tasks where details.sensor_type is "EO":
    {
      "type": ["isr_collection"],
      "filter": {
        "taskPredicate": {
          "field": {
            "fieldPath": "details.sensor_type",
            "comparator": "FIELD_COMPARATOR_EQ",
            "value": { "stringValue": "EO" }
          }
        }
      }
    }
Matches: `type="isr_collection" AND details.sensor_type == "EO"` Query tasks where details.sensor is EO or IR, and details.priority > 5:
    {
      "filter": {
        "and": {
          "statements": [
            {
              "or": {
                "statements": [
                  {
                    "taskPredicate": {
                      "field": {
                        "fieldPath": "details.sensor",
                        "comparator": "FIELD_COMPARATOR_EQ",
                        "value": { "stringValue": "EO" }
                      }
                    }
                  },
                  {
                    "taskPredicate": {
                      "field": {
                        "fieldPath": "details.sensor",
                        "comparator": "FIELD_COMPARATOR_EQ",
                        "value": { "stringValue": "IR" }
                      }
                    }
                  }
                ]
              }
            },
            {
              "taskPredicate": {
                "field": {
                  "fieldPath": "details.priority",
                  "comparator": "FIELD_COMPARATOR_GT",
                  "value": { "numberValue": 5 }
                }
              }
            }
          ]
        }
      }
    }
Matches: `(details.sensor == "EO" OR details.sensor == "IR") AND details.priority > 5` Query in-progress tasks:
    {
      "filter": {
        "taskPredicate": {
          "field": {
            "fieldPath": "state",
            "comparator": "FIELD_COMPARATOR_EQ",
            "value": { "stringValue": "TASK_STATE_IN_PROGRESS" }
          }
        }
      }
    }
cursor | string Pagination cursor from previous response. Omit or leave empty for first page.
pageSize | integer <int32> <= 1000 Default: "10" Maximum number of tasks per page.

### Responses

/api/v1/wdm/tasks/search

### Request samples

- Payload

Content type
application/json
`
{

- "pageSize": 100,
- "query":
  {
  - "priorities":
    [
    - "TASK_PRIORITY_HIGH"
    ],
  - "states":
    [
    - "TASK_STATE_IN_PROGRESS"
    ]
  }

}`

### Response samples

- 200
- 400
- 401
- 403
- 500
- default

Content type
application/json
`
{

- "nextCursor": "a2919858-75bf-42c4-8850-2bbb2b94d154",
- "tasks":
  [
  - {
    - "assignedTo":
      {
      - "id": "unit-123",
      - "type": "PRINCIPAL_TYPE_ENTITY"
      },
    - "description": "Conduct ISR collection on target area",
    - "id": "550e8400-e29b-41d4-a716-446655440000",
    - "name": "ISR Collection Alpha",
    - "priority": "TASK_PRIORITY_HIGH",
    - "provenance":
      {
      - "name": "ops-center-01",
      - "updatedAt": "2024-01-15T10:30:00Z"
      },
    - "requestedBy":
      {
      - "id": "user-456",
      - "type": "PRINCIPAL_TYPE_USER"
      },
    - "state": "TASK_STATE_IN_PROGRESS",
    - "type": "isr_collection"
    }
  ]

}`

## Get task by ID

Retrieves a single task by its UUID.

##### Authorizations:

rdp_basic rdp_jwt rdp_api_key

##### path Parameters

taskId required | string UUID of the task to retrieve

### Responses

/api/v1/wdm/tasks/{taskId}

### Response samples

- 200
- 400
- 401
- 403
- 404
- 500
- default

Content type
application/json
`
{

- "task":
  {
  - "assignedTo":
    {
    - "id": "unit-123",
    - "type": "PRINCIPAL_TYPE_ENTITY"
    },
  - "description": "Conduct ISR collection on target area",
  - "id": "550e8400-e29b-41d4-a716-446655440000",
  - "name": "ISR Collection Alpha",
  - "priority": "TASK_PRIORITY_HIGH",
  - "provenance":
    {
    - "name": "ops-center-01",
    - "updatedAt": "2024-01-15T10:30:00Z"
    },
  - "requestedBy":
    {
    - "id": "user-456",
    - "type": "PRINCIPAL_TYPE_USER"
    },
  - "state": "TASK_STATE_IN_PROGRESS",
  - "type": "isr_collection"
  }

}`

## Update task state

Updates the state of an existing task. This is the only way to modify a task after creation. State transitions should follow the task lifecycle. Terminal states (COMPLETED, FAILED, CANCELLED, REJECTED) are final and cannot be changed.

To delete a task, set state to CANCELLED. There is no separate delete endpoint.

##### Authorizations:

rdp_basic rdp_jwt rdp_api_key

##### path Parameters

taskId required | string UUID of the task to update

##### Request Body schema: application/json
required

state required | string (v1TaskState) Default: "TASK_STATE_UNSPECIFIED" Enum: "TASK_STATE_UNSPECIFIED" "TASK_STATE_DRAFT" "TASK_STATE_PENDING" "TASK_STATE_APPROVED" "TASK_STATE_ASSIGNED" "TASK_STATE_ACKNOWLEDGED" "TASK_STATE_PLANNED" "TASK_STATE_IN_PROGRESS" "TASK_STATE_PAUSED" "TASK_STATE_COMPLETED" "TASK_STATE_FAILED" "TASK_STATE_CANCELLED" "TASK_STATE_REJECTED" Task lifecycle states. State transitions follow a general flow: DRAFT -> PENDING -> APPROVED -> ASSIGNED -> ACKNOWLEDGED -> PLANNED -> IN_PROGRESS -> COMPLETED Terminal states (final, cannot be changed): COMPLETED: Successfully finished FAILED: Execution failed CANCELLED: Cancelled/deleted (the deletion mechanism for tasks) REJECTED: Refused by assignee TASK_STATE_DRAFT: Being composed - not yet submitted. TASK_STATE_PENDING: Submitted, awaiting approval. TASK_STATE_APPROVED: Approved by authority, not yet assigned. TASK_STATE_ASSIGNED: Assigned to executing principal. TASK_STATE_ACKNOWLEDGED: Executing principal acknowledged receipt of task. TASK_STATE_PLANNED: Executing principal has developed execution plan. TASK_STATE_IN_PROGRESS: Currently being executed. TASK_STATE_PAUSED: Execution temporarily halted. TASK_STATE_COMPLETED: Successfully completed (TERMINAL STATE). TASK_STATE_FAILED: Failed to complete (TERMINAL STATE). TASK_STATE_CANCELLED: Cancelled/deleted (TERMINAL STATE). This is the deletion mechanism for tasks - there is no separate delete operation. TASK_STATE_REJECTED: Rejected by assignee - unable/unwilling to execute (TERMINAL STATE).
| object (v1TaskProgress) Execution progress within a task's current state.
| object (v1Provenance) Data lineage and source attribution for trust assessment. Provenance tracks where information originated, enabling consumers to assess reliability and make informed fusion decisions. Critical for intelligence analysis where source credibility affects confidence. Loosely modeled on W3C PROV-DM (https://www.w3.org/TR/prov-dm/), but intentionally simplified so it can be attached cheaply to every record.

### Responses

/api/v1/wdm/tasks/{taskId}/state

### Request samples

- Payload

Content type
application/json
`
{

- "state": "TASK_STATE_UNSPECIFIED",
- "progress":
  {
  - "phase": "string",
  - "statusMessage": "string",
  - "metadata": { },
  - "updatedAt": "2019-08-24T14:15:22Z"
  },
- "provenance":
  {
  - "id": "string",
  - "name": "string",
  - "description": "string",
  - "updatedAt": "2019-08-24T14:15:22Z",
  - "producer": "string"
  }

}`

### Response samples

- 200
- 400
- 401
- 403
- 404
- 500
- default

Content type
application/json
`
{

- "task":
  {
  - "assignedTo":
    {
    - "id": "unit-123",
    - "type": "PRINCIPAL_TYPE_ENTITY"
    },
  - "description": "Conduct ISR collection on target area",
  - "id": "550e8400-e29b-41d4-a716-446655440000",
  - "name": "ISR Collection Alpha",
  - "priority": "TASK_PRIORITY_HIGH",
  - "provenance":
    {
    - "name": "ops-center-01",
    - "updatedAt": "2024-01-15T10:30:00Z"
    },
  - "requestedBy":
    {
    - "id": "user-456",
    - "type": "PRINCIPAL_TYPE_USER"
    },
  - "state": "TASK_STATE_COMPLETED",
  - "type": "isr_collection"
  }

}`