# Activities

Activities record actions on deployment nodes, such as start, stop, restart, and reconfigure. Each node reports its own status. The record shows the action, its time, and the person who requested it.

## Runtime Actions

You can request these actions:

| Action | Description |
| --- | --- |
| start | Start a stopped runtime |
| stop | Stop a running runtime |
| restart | Restart a runtime |
| reconfigure | Apply a specific configuration by ID |

### Supported Runtimes

| Runtime | Supported Actions |
| --- | --- |
| `iggy` | start, stop, restart, reconfigure |
| `connectors` | start, stop, restart, reconfigure |
| `kafka_gateway` | enable, disable, start, stop, restart, and upgrade on clusters |

## Activity Status

| Status | Meaning |
| --- | --- |
| processing | Action dispatched, waiting for node to complete |
| completed | Action finished successfully |
| rejected | Action failed or was rejected |

## How It Works

An action follows this sequence:

1. You request the action through the Console or API.
2. The Supervisor sends a task to each target node.
3. Warden on each node runs the task.
4. The node reports completion or rejection, and the activity status changes.

You can target selected nodes or the entire deployment. Each target receives a separate activity entry.

## API Reference

### Execute a Runtime Action

```bash
curl -X POST {supervisor_url}/deployments/{deployment_id}/activities/{runtime}/{action} \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

To select the target nodes, include their IDs:

```bash
curl -X POST {supervisor_url}/deployments/{deployment_id}/activities/iggy/restart \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "nodes": [610809900976570889]
  }'
```

Set `runtime` to `iggy` or `connectors`. Set `action` to `start`, `stop`, `restart`, or `reconfigure:{config_id}`. For the [Kafka gateway](/kafka-gateway), set `runtime` to `kafka_gateway` and `action` to `enable`, `disable`, `start`, `stop`, `restart`, or, on a cluster, `upgrade`. The optional `nodes` array selects nodes. Omit the body or send `{}` to target all nodes.

The endpoint requires `deployment:manage` and returns `202 Accepted`.

### List Activities

```bash
curl "{supervisor_url}/deployments/{deployment_id}/activities?page=1&results=10" \
  -H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "items": [
    {
      "id": 1,
      "tenant_id": 1,
      "workspace_id": 1,
      "environment_id": 1,
      "deployment_id": 1,
      "author_id": 608123456789012345,
      "runtime": "iggy",
      "action": "restart",
      "node_id": 610809900976570889,
      "status": "completed",
      "created_at": "2026-03-16T12:00:00Z",
      "finished_at": "2026-03-16T12:00:05Z"
    }
  ],
  "page": 1,
  "total_results": 1,
  "total_pages": 1
}
```

This endpoint requires `deployment:read`.

- [Configuration](/deployments/configuration)
- [Snapshots](/deployments/snapshots)
- [Monitoring](/observability)

Source: https://docs.laserdata.com/deployments/activities
