---
title: "Solutions"
description: "REST endpoints for solutions. Bearer-auth required."
section: "API"
group: "REST"
order: 60
---

## GET /api/solutions

List solutions.

**Query parameters**

- `limit` (optional): Page size (1–100, default 100).
- `after` (optional): Keyset cursor — return the page after this row (next page).
- `before` (optional): Keyset cursor — return the page before this row (prev page).
- `ids` (optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).
- `filter` (optional): Nested filter expression (`<Entity>Filter`): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.
- `orderBy` (optional): Multi-key sort (`<Entity>OrderBy[]`): array of `{ field: direction }` applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.
- `workspace_id` (optional): Filter to solutions in this workspace. When omitted, returns solutions across every workspace the caller is a member of (admins see all).
- `member_entity_id` (optional): Filter to solutions that contain this entity as a member. Powers 'what solutions is this agent part of?'.
- `include_deleted` (optional): Soft-deleted solution visibility. `false` (default) — active rows only. `true` — active plus soft-deleted. `only` — soft-deleted only (trash view).
- `name` (optional): Case-insensitive substring match on name.
- `created_by` (optional): Shorthand: filter where `createdBy` equals this value.
- `retention_tier` (optional): Shorthand: filter where `retentionTier` equals this value.

**Response**

```json
{
  "data": [
    {
      "id": "<...>",
      "workspaceId": "<...>",
      "name": "<...>",
      "description": "<...>",
      "createdBy": "<...>",
      "deletedAt": "<...>",
      "retentionTier": "<...>",
      "createdAt": "<...>",
      "updatedAt": "<...>"
    }
  ],
  "pageInfo": {
    "total": "number",
    "hasNextPage": "boolean",
    "hasPreviousPage": "boolean",
    "startCursor": "string",
    "endCursor": "string"
  }
}
```

## POST /api/solutions

Create a solution

**Request body**

```json
{
  "workspaceId": "string",
  "name": "string",
  "description?": "string"
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "description": "string",
  "createdBy": "string",
  "deletedAt": "string",
  "retentionTier": "any",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## GET /api/solutions/{id}

Get a solution by ID.

**Path parameters**

- `id` (required): Solution to retrieve.

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "description": "string",
  "createdBy": "string",
  "deletedAt": "string",
  "retentionTier": "any",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## PATCH /api/solutions/{id}

Update solution name/description

**Path parameters**

- `id` (required): The solution's prefixed ID (e.g. `sol_...`).

**Request body**

```json
{
  "name?": "string",
  "description?": "string"
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "description": "string",
  "createdBy": "string",
  "deletedAt": "string",
  "retentionTier": "any",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## DELETE /api/solutions/{id}

Soft-delete a solution (overlay only — member entities are NOT touched).

**Path parameters**

- `id` (required): Solution to soft-delete (overlay only).

**Response**

```json
{
  "success": "boolean"
}
```

## GET /api/solutions/{id}/graph

Load the FK-derived solution graph

Members + edges. Edges are derived live from existing FK relationships between member entities; nothing is persisted.

**Path parameters**

- `id` (required): The solution's prefixed ID (e.g. `sol_...`).

**Response**

```json
{
  "solution": {
    "id": "<...>",
    "workspaceId": "<...>",
    "name": "<...>",
    "description": "<...>",
    "createdBy": "<...>",
    "deletedAt": "<...>",
    "retentionTier": "<...>",
    "createdAt": "<...>",
    "updatedAt": "<...>"
  },
  "members": ["<...>"],
  "edges": ["<...>"]
}
```

## DELETE /api/solutions/{id}/purge

Permanently delete a soft-deleted solution.

**Path parameters**

- `id` (required): Soft-deleted solution to permanently delete.

**Response**

```json
{
  "success": "boolean"
}
```

## POST /api/solutions/{id}/restore

Restore a soft-deleted solution.

**Path parameters**

- `id` (required): Soft-deleted solution to restore.

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "description": "string",
  "createdBy": "string",
  "deletedAt": "string",
  "retentionTier": "any",
  "createdAt": "string",
  "updatedAt": "string"
}
```
