---
title: "Assign a dataset to profiles, into the slot its mode implies; a taken slot is refused unless force."
method: POST
path: "/v1/datasets/{id}/assign"
---

# Assign a dataset to profiles, into the slot its mode implies; a taken slot is refused unless force.

`POST /v1/datasets/{id}/assign`

## Request

- Base URL: `http://127.0.0.1:10108`
- URL: `http://127.0.0.1:10108/v1/datasets/{id}/assign`
- Auth: HTTP bearer

Puts the dataset into these profiles' identity slot (fixed) or content slot (consume); a fixed dataset also gives each profile a free row. A slot already holding another dataset is refused unless `force` is true.

## Path parameters

- `id` string, required

## Request body

- object
  - `force` boolean
  - `profile_ids` string[], required

## Response `200`

The profiles that took the dataset into its slot, and by name those a fixed dataset had no row left for.

- object
  - `assigned` string[], required
  - `datasetId` string, uuid, required
  - `slot` 'identity' | 'content', required
  - `withoutRow` object[], required
    - `name` string, required
    - `profileId` string, uuid, required

## Other responses

- `400`: The id is not a uuid, or `profile_ids` is empty or has duplicates.
- `401`: No bearer token, or not a token this app issued. The body is empty: it never says which.
- `403`: Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.
- `404`: The dataset or one of the profiles does not exist.
- `409`: A profile already has another dataset in that slot and `force` is false, or the columns clash with the other slot's dataset.
- `500`: Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

---

[API](https://skmtc.dev/veilus/apis/veilus-local-api.md) · [All operations](https://skmtc.dev/veilus/apis/veilus-local-api/llms.txt) · [OpenAPI document](https://skmtc.dev/veilus/apis/veilus-local-api/revisions/67ac3818f9d2?raw)
