> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/dynamic-lookup-table-api/update-attribute-library-entry.md).

# Update attribute library entry

Update the **values** and **usage** of an entry inside a group, by the entry's ID. This is how you add, remove or change the predefined values of a lookup table.

Use the entry's `data.id` from Create attribute library entry as `entity-id`.

You can change an entry's `options` and `usageType`. You can't change its `name` or `dataType`.

The `checksum` is required. Use the one from the last **Create entry** or **Update entry** response. If it doesn't match the server's current checksum, the update is rejected.

On success, the response returns a new `data.checksum`. Store it for the next update.

## Update attribute library entry

> Update the values and usage of an entry inside a group.\
> \
> \*\*\`entity-id\` is the ID of the entry\*\* you want to update (\`data.id\` from \*\*Create attribute library entry\*\*), \*\*not\*\* the ID of the group.\
> \
> \*\*What you can change:\*\* the entry's \`options\` and \`usageType\`. You can't change its \`name\` or \`dataType\`.\
> \
> \*\*Checksum:\*\* \`checksum\` is required. Use the one from the last \*\*Create entry\*\* or \*\*Update entry\*\* response. If it doesn't match the server's current checksum, the update is rejected.\
> \
> On success, the response returns a new \`data.checksum\` — store it for the next update.

```json
{"openapi":"3.0.3","info":{"title":"Nected Dynamic Lookup Table API (Attribute Library, Dev V1)","version":"1.0"},"tags":[{"name":"Dynamic Lookup Table API (Attribute Library)","description":"The Dynamic Lookup Table API lets you list, create, read and update **attribute library groups** (lookup tables) in your workspace. Each group holds one or more **attributes**, and each attribute has a name, a data type, a list of predefined values and a usage.\n\nUse it to update lookup values in bulk, sync them from your systems of record, or promote them between environments in CI/CD. For a no-code walkthrough, see Dynamic Lookup Tables (Attribute Library).\n\n**Entity type:** all paths use the entity type `module`.\n\n**Supported operations:** list, create, get and update only. Publish, test, schedule and version listing are not available for attribute libraries.\n\n**Update rules:** after an attribute is created, you can change its predefined values and usage. You can't change its name or data type, the same as in the UI.\n\n**Data types:** `String`, `Numeric`, `Date`, `DateTime`, `Boolean`, `List`, `JSON`.\n\n## Why use the API?\n\nUse the API when you need:\n\n* **Bulk updates** (large value lists in one or a few calls)\n* **Automated sync** from your systems of record\n* **CI/CD / environment promotion** of lookup values\n* **Programmatic governance** with controlled access and auditability\n\n## How it works\n\nAttribute libraries are created in two steps:\n\n1. **Create the group** with `POST /dev/v1/module`. The response returns the group's `id`.\n2. **Create the entries inside the group** with `POST /dev/v1/module_schema`, passing the group's `id` as `moduleId`.\n\nTo change things later, use `PATCH /dev/v1/module/{entity-id}` to rename the group or change its description, and `PATCH /dev/v1/module_schema/{entity-id}` to change the values or usage of an entry. Both need the current `checksum`."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"security":[{"DevAuth":[]}],"components":{"securitySchemes":{"DevAuth":{"type":"apiKey","in":"header","name":"Nected-API-Key","description":"Your Nected API key. Obtain from your workspace settings."}},"schemas":{"UpdateAttributeEntryPayload":{"type":"object","required":["checksum"],"properties":{"dataType":{"type":"string","description":"Data type of the entry. Can't be changed."},"usageType":{"type":"string","description":"Whether the entry is required"},"options":{"type":"array","description":"The predefined values of the entry","items":{"$ref":"#/components/schemas/AttributeOption"}},"checksum":{"type":"string","description":"Current checksum of the entry"}}},"AttributeOption":{"type":"object","description":"One predefined value","properties":{"value":{"description":"The value"}}},"UpdateResponse":{"type":"object","description":"Success response for update calls","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"checksum":{"type":"string","description":"New checksum — store it for the next update"}}}}},"ErrorResponse":{"type":"object","description":"Error response wrapper","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Human-readable error message"},"data":{"nullable":true}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/dev/v1/module_schema/{entity-id}":{"patch":{"operationId":"updateAttributeEntry","tags":["Dynamic Lookup Table API (Attribute Library)"],"summary":"Update attribute library entry","description":"Update the values and usage of an entry inside a group.\n\n**`entity-id` is the ID of the entry** you want to update (`data.id` from **Create attribute library entry**), **not** the ID of the group.\n\n**What you can change:** the entry's `options` and `usageType`. You can't change its `name` or `dataType`.\n\n**Checksum:** `checksum` is required. Use the one from the last **Create entry** or **Update entry** response. If it doesn't match the server's current checksum, the update is rejected.\n\nOn success, the response returns a new `data.checksum` — store it for the next update.","parameters":[{"name":"Nected-Branch","in":"header","required":false,"description":"Branch name (optional)","schema":{"type":"string"}},{"name":"entity-id","in":"path","required":true,"description":"ID of the **entry** you want to update (`data.id` from the create entry response). This is not the ID of the group.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAttributeEntryPayload"}}}},"responses":{"200":{"description":"OK — `data.checksum` is the entry's new checksum.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

### Request body

| Field       | Type   | Required | Description                                                        |
| ----------- | ------ | -------- | ------------------------------------------------------------------ |
| `dataType`  | string | No       | Data type of the entry, for example `string`. It can't be changed. |
| `usageType` | string | No       | Whether the entry is required, for example `Mandatory`.            |
| `options`   | array  | No       | The predefined values. Each item is an object with a `value` key.  |
| `checksum`  | string | Yes      | Current checksum of the entry.                                     |
