BREAGEN Logo
User Management Service

Resource Attribute Management

The Resource Attribute Management service provides functionality to manage attributes associated with resources, including creation, retrieval, updating, and deletion of resource attributes.

Resource Attribute Operations

Get Resource Attribute by IDs GET /api/v1/resource-attribute/

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

Query Parameters

ParameterTypeRequiredDescription
resourceIdintegerYesID of the resource
attributeIdintegerYesID of the attribute

Example Request

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

Example Response

{
	"success": true,
	"status": "200 OK",
	"data": {
		"id": 1,
		"value": "read-write",
		"resource": {
			"id": 1,
			"resourceName": "UserDashboard",
			"description": "User dashboard access resource"
		},
		"attribute": {
			"id": 1,
			"attributeName": "permission",
			"description": "Access permission level"
		}
	}
}

Update Resource Attribute PUT /api/v1/resource-attribute/

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

Request Body

{
	"resourceId": 1,
	"attributeId": 1,
	"value": "read-only"
}

Example Request

curl -X 'PUT' \
'https://um.braegen.ai/api/v1/resource-attribute/' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-d '{
    "resourceId": 1,
    "attributeId": 1,
    "value": "read-only"
}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"message": "Resource attribute updated successfully",
	"data": {
		"id": 1,
		"value": "read-only",
		"resource": {
			"id": 1,
			"resourceName": "UserDashboard"
		},
		"attribute": {
			"id": 1,
			"attributeName": "permission"
		}
	}
}

Delete Resource Attribute DELETE /api/v1/resource-attribute/

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

Query Parameters

ParameterTypeRequiredDescription
resourceIdintegerYesID of the resource
attributeIdintegerYesID of the attribute to delete

Example Request

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

Example Response

{
	"success": true,
	"status": "200 OK",
	"message": "Resource attribute deleted successfully",
	"data": {
		"deleted_resource_attribute": {
			"resourceId": 1,
			"attributeId": 1
		}
	}
}

Get All Resource Attributes GET /api/v1/resource-attribute

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

Example Request

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

Example Response

{
	"success": true,
	"status": "200 OK",
	"data": [
		{
			"id": 1,
			"value": "read-write",
			"resource": {
				"id": 1,
				"resourceName": "UserDashboard"
			},
			"attribute": {
				"id": 1,
				"attributeName": "permission"
			}
		},
		{
			"id": 2,
			"value": "admin",
			"resource": {
				"id": 2,
				"resourceName": "AdminPanel"
			},
			"attribute": {
				"id": 1,
				"attributeName": "permission"
			}
		}
	]
}

Create Resource Attribute POST /api/v1/resource-attribute

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

Request Body

{
	"resourceId": 1,
	"attributeId": 1,
	"value": "read-write"
}

Example Request

curl -X 'POST' \
'https://um.braegen.ai/api/v1/resource-attribute' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-d '{
    "resourceId": 1,
    "attributeId": 1,
    "value": "read-write"
}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"message": "Resource attribute created successfully",
	"data": {
		"id": 3,
		"value": "read-write",
		"resource": {
			"id": 1,
			"resourceName": "UserDashboard"
		},
		"attribute": {
			"id": 1,
			"attributeName": "permission"
		}
	}
}

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}

On this page