BREAGEN Logo
User Management Service

Access Management

The Access Management service provides functionality to check and verify user access permissions through various lookup methods.

Access Operations

Get User Access by User ID GET /api/v1/access/by-userid

Resource URL/api/v1/access/by-userid
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Query Parameters

ParameterTypeRequiredDescription
userIdintegerYesID of user to check access

Example Request

curl -X 'GET' \
'https://um.braegen.ai/api/v1/access/by-userid?userId=1' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"data": [
		{
			"userId": 1,
			"attributeId": 1,
			"value": "admin"
		},
		{
			"userId": 1,
			"attributeId": 2,
			"value": "read-write"
		}
	]
}

Get User Access by Email GET /api/v1/access/by-email

Resource URL/api/v1/access/by-email
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Query Parameters

ParameterTypeRequiredDescription
emailstringYesEmail address of user

Example Request

curl -X 'GET' \
'https://um.braegen.ai/api/v1/access/[email protected]' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}'

Example Response

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

Get User Access by Authorization Header GET /api/v1/access/by-auth-header

Resource URL/api/v1/access/by-auth-header
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Example Request

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

Example Response

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

Check Access Permission GET /api/v1/access/

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

Query Parameters

ParameterTypeRequiredDescription
emailstringYesEmail address of user
resource_namestringYesName of resource to check access

Example Request

curl -X 'GET' \
'https://um.braegen.ai/api/v1/access/[email protected]&resource_name=UserDashboard' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}'

Example Response

{
	"success": true,
	"status": "200 OK",
	"data": {
		"message": "Access granted",
		"access_grant": true
	}
}

HTTP Response Codes

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

Common Error Responses

User Not Found

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

Invalid Resource

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

Authorization Error

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

On this page