---
title: "Assign terms to attributes in batch"
method: POST
path: "/catalog/v1/attributes/term-assignments/batch/assign"
tags: ["Catalog Attributes"]
---

# Assign terms to attributes in batch

`POST /catalog/v1/attributes/term-assignments/batch/assign`

## Request

- Base URL: `https://your-environment.ataccama.one/api`
- URL: `https://your-environment.ataccama.one/api/catalog/v1/attributes/term-assignments/batch/assign`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api/docs/catalog/v1/attributes/term-assignments/batch/assign/post.ts> (a function with typed inputs; its response is checked against the schema)

Assign terms to catalog item attributes.

Terms assigned through the API always have the source `MANUAL`.

The request accepts a `data` array of 1 to 100 items, where each item names one attribute in `attributeUrn` and the terms to assign to it in `termUrns`.
Each item is processed independently: a failure on one item doesn't affect the other items.
Results are returned in the same order as the request items, and each item can carry an optional `id` of your choice, which is returned in the corresponding result item.

An item fails with the status `TERM_ALREADY_ASSIGNED` when a term is already assigned to the attribute.
To make a migration safe to rerun, treat this status as success or skip the terms that are already assigned.

## Request body

- object
  - `data` CatalogAttributeTermAssignmentBatchItem[], required
    - `id` string: Correlation identifier of your choice. It is returned in the corresponding result item.
    - `attributeUrn` string, uri, required: A URN identifying a catalog attribute resource in the Catalog API. Format: urn:ata:{tenant}:catalog:catalog-attribute:{uuid} Example: urn:ata:acme-corp:catalog:catalog-attribute:123e4567-e89b-12d3-a456-426614174000.
    - `termUrns` TermUrn[], required: URNs of the terms to assign to the attribute. At least one term is required.

## Response `207`

Batch request processed. The `meta` summary reports the totals (`total`, `success`, `fail`), and `results` reports the per-item outcomes in the same order as the request items.
Each result reports its own `status`: `OK` when all terms in the item were processed. Any other value indicates failure and is accompanied by an `error` whose `type` matches the status.

The results don't return the attribute's assigned terms. To verify the outcome, retrieve the attribute with `GET /catalog/v1/attributes/{urn}`.

- object
  - `meta` BatchOperationMeta, required: Summary of a batch operation outcome. Lets clients assess batch health without iterating every item.
    - `total` integer, required: Number of items in the request.
    - `success` integer, required: Number of items with `OK` status.
    - `fail` integer, required: Number of items with non-`OK` status. `success + fail` equals `total`.
  - `results` CatalogAttributeTermBatchResultItem[], required
    - `id` string: Caller-supplied correlation identifier echoed back in the corresponding result item.
    - `status` string, required: @ExtensibleEnum Outcome status for this item. `OK` indicates success; any non-`OK` value indicates failure and equals the `type` of the accompanying `error`. `RESOURCE_NOT_FOUND` — the attribute or one of the terms does not exist; the `TERM_*` statuses are operation-specific and described on each endpoint.
    - `error` ProblemDetail
      - `type` string, required: Error type identifier.
      - `title` string, required: Short, human-readable summary of the problem type.
      - `detail` string, required: Detailed specific explanation of the problem.

## Other responses

- `400`: Bad request. The request parameters or body are invalid.
- `403`: Forbidden. You do not have permission to access the requested resource.

---

[API](https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api.md) - [All operations](https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api/revisions/46f16e0487f8?raw)
