Skip to content
  • There are no suggestions because the search field is empty.

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 URLhttps://api.alertops.com/api/v2
Authenticationapi-key request header
Endpoints5

Endpoints

MethodPathDescription
GET/api/v2/user_attributesList user attributes
POST/api/v2/user_attributesCreate 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).

FieldTypeRequired
attribute_namestringOptional
user_attribute_data_typestringOptional
reg_ex_validationstringOptional
activebooleanRequired
list_valuesstringOptional
requiredbooleanRequired
sequenceintegerRequired

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

NameTypeRequiredDescription
idstringRequiredUser 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

NameTypeRequiredDescription
idstringRequiredUser Attribute ID or User Attribute Name

Request body

JSON object (required).

FieldTypeRequired
attribute_namestringOptional
user_attribute_data_typestringOptional
reg_ex_validationstringOptional
activebooleanRequired
list_valuesstringOptional
requiredbooleanRequired
sequenceintegerRequired

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

NameTypeRequiredDescription
idstringRequiredUser 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"