---
title: "Solutions in the SDK"
canonical: https://trickest.com/docs/developer-tools/sdk/solutions
description: "Read solutions and datasets, with current API compatibility notes for creation, updates, and filtering."
---

# Solutions in the SDK

## List solutions and datasets

Examples use a server-side `client` from
[Client setup](/docs/developer-tools/sdk/client-setup), and resource IDs supplied
by your application.

| Method | Description |
| --- | --- |
| `list(options?)` | `AsyncGenerator<Solution>`. |
| `listPage(options?)` | One page of solutions. |
| `get(id, options?)` | Solution details. |
| `create(data, options?)` | Declared helper; its payload omits the required `space` field. |
| `update(id, data, options?)` | Declared helper sends PATCH; the current route requires PUT. |
| `delete(id, options?)` | Delete the solution through the reporting API. |
| `listDatasets(solutionId?, options?)` | Datasets generator; see the filter mismatch below. |
| `listDatasetsPage(solutionId?, options?)` | One response page; the same filter mismatch applies. |

```ts
for await (const solution of client.solutions.list()) {
  console.log(solution.name, solution.id);
}
```

A solution groups datasets. Dataset IDs are not database table IDs. Resolve the
corresponding table with `client.database` before querying it.

## Current compatibility limits

The SDK sends `solution_id` when a solution is supplied to a dataset listing.
The current route expects `solution`, so do not treat that SDK argument as a
reliable filter. Read a known solution’s datasets through the supported query:

```ts
const solutionId = "replace-with-solution-id";
const params = new URLSearchParams({ solution: solutionId });
const result = await client.http.get<unknown>(`/api/datasets?${params}`);
// Inspect or validate the backend's array/envelope before using its records.
console.log(result);
```

For creation, send `{ name, space, description? }` to `POST /api/solutions`
with `client.http.post()`. The SDK’s `workflow_id`, `is_public`, and `tags`
fields do not replace the required `space` field in this route.

For metadata updates, use `client.http.put('/api/solutions/<id>', { name })`,
replacing `<id>` with the solution ID. The route accepts `name`, `description`,
`color`, and `icon`; it does not apply `is_public` or `tags`.

Deleting a solution is a write to the reporting service, not a way to hide it
from a list. Collect any data you need before deleting it. The SDK does not
provide an undo method.

Query Live Tables through [`client.database`](/docs/developer-tools/sdk/database).

**Types:** `Solution`, `Dataset`

<Info>
  **Concepts:** [Solutions & Database](/docs/key-concepts/solutions-database).
  **CLI:** [Solutions](/docs/developer-tools/cli/solutions).
</Info>

---
_Markdown source of https://trickest.com/docs/developer-tools/sdk/solutions._
