BREAGEN Logo
User Management Service

Attribute Management

The Attribute Management service provides functionality to manage system attributes that can be associated with users and resources, including creation, retrieval, updating, and deletion of attributes.

Attribute Operations

Get Attribute by ID GET /api/v1/attribute/{attributeId}

Resource URL/api/v1/attribute/{attributeId}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequired
attributeIdID of attribute to retrieveYes

Example Request

curl -X 'GET' \
'https://um.braegen.ai/api/v1/attribute/1' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"message": "Attribute retrieved successfully",
	"data": {
		"id": 1,
		"attributeName": "role",
		"description": "User role attribute"
	}
}

Update Attribute PUT /api/v1/attribute/{attributeId}

Resource URL/api/v1/attribute/{attributeId}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequired
attributeIdID of attribute to updateYes

Request Body

{
	"attributeName": "updatedRole",
	"description": "Updated role attribute description"
}

Example Request

curl -X 'PUT' \
'https://um.braegen.ai/api/v1/attribute/1' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-d '{
    "attributeName": "updatedRole",
    "description": "Updated role attribute description"
}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"message": "Attribute updated successfully",
	"data": {
		"id": 1,
		"attributeName": "updatedRole",
		"description": "Updated role attribute description"
	}
}

Delete Attribute DELETE /api/v1/attribute/{attributeId}

Resource URL/api/v1/attribute/{attributeId}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequired
attributeIdID of attribute to deleteYes

Example Request

curl -X 'DELETE' \
'https://um.braegen.ai/api/v1/attribute/1' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"message": "Attribute deleted successfully",
	"data": {
		"deleted_attribute_id": 1
	}
}

Get All Attributes GET /api/v1/attribute

Resource URL/api/v1/attribute
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Example Request

curl -X 'GET' \
'https://um.braegen.ai/api/v1/attribute' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"data": [
		{
			"id": 1,
			"attributeName": "role",
			"description": "User role attribute"
		},
		{
			"id": 2,
			"attributeName": "department",
			"description": "User department attribute"
		}
	]
}

Create Attribute POST /api/v1/attribute

Resource URL/api/v1/attribute
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Request Body

{
	"attributeName": "newAttribute",
	"description": "New attribute description"
}

Example Request

curl -X 'POST' \
'https://um.braegen.ai/api/v1/attribute' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-d '{
    "attributeName": "newAttribute",
    "description": "New attribute description"
}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"message": "Attribute created successfully",
	"data": {
		"id": 3,
		"attributeName": "newAttribute",
		"description": "New attribute description"
	}
}

HTTP Response Codes

HTTP CodeMessage
200Success
204No Content
400Bad Request
401Unauthorized
403Invalid Input
404Invalid or not found type

All endpoints require proper authentication through Bearer token in the Authorization header. The token should be included in all API requests in the headers:

Authorization: Bearer {token}

Common Error Responses

Not Found Error

{
	"success": false,
	"status": "404 NOT_FOUND",
	"message": "Attribute not found",
	"data": null
}

Validation Error

{
	"success": false,
	"status": "400 BAD_REQUEST",
	"message": "Invalid attribute name",
	"data": null
}

Duplicate Entry Error

{
	"success": false,
	"status": "400 BAD_REQUEST",
	"message": "Attribute name already exists",
	"data": null
}

Authorization Error

{
	"success": false,
	"status": "401 UNAUTHORIZED",
	"message": "Invalid or expired token",
	"data": null
}