Create attribute categories
Creates attribute categories that organize assets, such as Region or Product line.
Prerequisites
- Authentication and setup: A valid access token.
Endpoint
Section titled “Endpoint”POST /api/assethub/v2/attribute_categoriesBase URL: the standard REST host for your region. See Base URLs.
Headers: Authorization: Bearer ACCESS_TOKEN, Content-Type: application/json.
Request
Section titled “Request”| Parameter | Type | Required | Description |
|---|---|---|---|
categories |
array | Required | Array of categories to create. Maximum 50 categories per request. |
categories[].category_name |
string | Required | Name of the category. Maximum 50 characters. Cannot be empty. |
user_id |
string | Required | ID of the user performing the operation. Must have the ATTRIBUTE_MANAGEMENT permission. |
Request example
Section titled “Request example”{ "categories": [{ "category_name": "Region" }, { "category_name": "Product" }], "user_id": "123456789abcd101"}Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
categories[].category_id |
string | Unique ID of the created category. |
categories[].category_name |
string | Name of the created category. |
request_id |
string | Unique ID for the request. |
Response example
Section titled “Response example”{ "categories": [ { "category_id": "123456789012345102", "category_name": "Region" }, { "category_id": "123456789012345103", "category_name": "Product" } ], "request_id": "req_101"}- Limits: Maximum 50 categories per request. Category name 50 characters.
- Validation: The category name cannot be empty.
- Duplicates: Category names must be unique within the organization. If a category name already exists, the response is a
Duplicate Attribute Categoryerror.