# Missions

Mission definitions, their feature list, and the execution lifecycle — start, pause, cancel — along with recent executions.

Playground

Send these requests to your own running server. Values stay in this browser.

Not connected

Base URL  Directory _optional_  Bearer token _optional_ 

 

How this works

Start a server with `nikcli serve --hostname 127.0.0.1 --port 4096`. Requests go straight from this page to that address — the browser allows it because loopback counts as a secure origin, and the server allows it because `nikcli-ai.dev` is in its CORS allowlist.

To try things without touching your real sessions or config, start the server with `NIKCLI_TEST_HOME` pointed at a throwaway directory — see [the guided tour](/docs/guides/api-tour).

## Operations

13 endpoints, generated from the server's own [OpenAPI document](/docs/api). Every path also accepts the `directory` and `workspace` query parameters that select which instance handles the request.

<table class="api-index not-prose"><tbody><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mission">/mission</a></td><td class="api-index-id">mission.list</td></tr><tr><td class="api-index-method"><span class="api-method api-method-put">put</span></td><td><a href="#op-put-mission">/mission</a></td><td class="api-index-id">mission.upsert</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mission-templates">/mission/templates</a></td><td class="api-index-id">mission.templates</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mission-generate">/mission/generate</a></td><td class="api-index-id">mission.generate</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mission-execs-recent">/mission/execs/recent</a></td><td class="api-index-id">mission.recentExecs</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mission-id">/mission/{id}</a></td><td class="api-index-id">mission.get</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mission-id">/mission/{id}</a></td><td class="api-index-id">mission.update</td></tr><tr><td class="api-index-method"><span class="api-method api-method-delete">delete</span></td><td><a href="#op-delete-mission-id">/mission/{id}</a></td><td class="api-index-id">mission.delete</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mission-id-start">/mission/{id}/start</a></td><td class="api-index-id">mission.start</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mission-id-pause">/mission/{id}/pause</a></td><td class="api-index-id">mission.pause</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mission-id-cancel">/mission/{id}/cancel</a></td><td class="api-index-id">mission.cancel</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mission-id-feature-featureID">/mission/{id}/feature/{featureID}</a></td><td class="api-index-id">mission.feature.mutate</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mission-id-execs">/mission/{id}/execs</a></td><td class="api-index-id">mission.execs</td></tr></tbody></table>

get /mission [#](#op-get-mission) `mission.list`

Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| directory | query | string | optional |
| workspace | query | string | optional |

Responses

200 MissionListOutput application/json

{
  missions: [MissionDefinition](#schema-MissionDefinition)\[\]
  runtimes: [MissionRuntime](#schema-MissionRuntime)\[\]
}

Example response captured

```
{
  "missions": [],
  "runtimes": []
}
```

SDK example

mission.list

ts 

1

2

3

4

5

6

```
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mission.list({
  ...
})
```

Try it

directory _query_  workspace _query_

---

Source: https://nikcli-ai.dev/docs/api/mission
