User Attributes API
The User Attributes API allows you to define and manage custom attribute schemas that can be assigned to users.
The User Attributes API allows you to define and manage custom attribute schemas that can be assigned to users.
| Base URL | https://api.alertops.com/api/v2 |
| Authentication | api-key request header |
| Endpoints | 5 |
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v2/user_attributes | List user attributes |
| POST | /api/v2/user_attributes | Create a user attribute |
| GET | /api/v2/user_attributes/{id} | Get a user attribute |
| PUT | /api/v2/user_attributes/{id} | Update a user attribute |
| DELETE | /api/v2/user_attributes/{id} | Delete a user attribute |
List user attributes
GET /api/v2/user_attributes
Responses
200 OK
[
{
"attribute_id": 307,
"attribute_name": "Test Attribute",
"user_attribute_data_type": "ShortString",
"reg_ex_validation": "test",
"active": true,
"list_values": "test1=test11|test2=test22",
"required": true,
"sequence": 1
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/user_attributes" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Create a user attribute
POST /api/v2/user_attributes
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
attribute_name | string | Optional |
user_attribute_data_type | string | Optional |
reg_ex_validation | string | Optional |
active | boolean | Required |
list_values | string | Optional |
required | boolean | Required |
sequence | integer | Required |
Example body
{
"attribute_name": "string",
"user_attribute_data_type": "string",
"reg_ex_validation": "string",
"active": true,
"list_values": "string",
"required": true,
"sequence": 0
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X POST "https://api.alertops.com/api/v2/user_attributes" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"attribute_name":"string","user_attribute_data_type":"string","reg_ex_validation":"string","active":true,"list_values":"string","required":true,"sequence":0}'Get a user attribute
GET /api/v2/user_attributes/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | User Attribute ID or User Attribute Name |
Responses
200 OK
{
"attribute_id": 307,
"attribute_name": "Test Attribute",
"user_attribute_data_type": "ShortString",
"reg_ex_validation": "test",
"active": true,
"list_values": "test",
"required": true,
"sequence": 1
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/user_attributes/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a user attribute
PUT /api/v2/user_attributes/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | User Attribute ID or User Attribute Name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
attribute_name | string | Optional |
user_attribute_data_type | string | Optional |
reg_ex_validation | string | Optional |
active | boolean | Required |
list_values | string | Optional |
required | boolean | Required |
sequence | integer | Required |
Example body
{
"attribute_name": "string",
"user_attribute_data_type": "string",
"reg_ex_validation": "string",
"active": true,
"list_values": "string",
"required": true,
"sequence": 0
}Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X PUT "https://api.alertops.com/api/v2/user_attributes/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"attribute_name":"string","user_attribute_data_type":"string","reg_ex_validation":"string","active":true,"list_values":"string","required":true,"sequence":0}'Delete a user attribute
DELETE /api/v2/user_attributes/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | User Attribute ID or User Attribute Name |
Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X DELETE "https://api.alertops.com/api/v2/user_attributes/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"