oidc-lite

Group API

Sequence Diagram

Groups Sequence Diagram

Create Group

Request

Create Group with random Id

POST /group

Create Group with given Id

POST /group/:id

Request Headers

Request Body

Request Parameter

Response

Response Codes

Code Description
200 The request was successful. The response will contain a JSON body.
400 The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present.
401 You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty
404 The object you are trying to update doesn’t exist. The response will be empty.
500 There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty.

Retrieve All Groups

Request

Retrieve all of the configured Groups.

GET /group

Retrieve Group by ID

GET /group/:id

Request Headers

Request Parameter

Response

Response Codes

Code Description
200 The request was successful. The response will contain a JSON body.
400 The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present.
401 You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty
404 The object you are trying to update doesn’t exist. The response will be empty.
500 There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty.

Update Group

Request

Update an existing Group

PUT /group/:id

Request Headers

Request Body

Request Parameter

Response Codes

Code Description
200 The request was successful. The response will contain a JSON body.
400 The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present.
401 You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty
404 The object you are trying to update doesn’t exist. The response will be empty.
500 There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty.

Delete Group

Request

Delete a Group permanently

DELETE /group/:id

Request Headers

Request Parameter

Response Codes

| Code | Description | |——|————-| | 200 | The request was successful. The response will contain a JSON body. | | 400 | The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present. | | 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty | 404 | The object you are trying to update doesn’t exist. The response will be empty. | | 500 | There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty. |

Authorization

All endpoints are protected by authorization headers which requires authorization and x-stencil-tenanid values to be passed in headers, which are verified using the HeaderAuthService.

Error Handling

The service includes comprehensive error handling, throwing appropriate exceptions for various scenarios such as unauthorized access, bad requests, or when required data is missing.

Response Format

All endpoints return a standardized ResponseDto object containing:


Group User API

This service manages the relationship between users and groups within a multi-application system. It uses NestJS and Prisma for database operations.

Endpoints

If the authorization key provided in Authorization header is tenant scoped, then an additional header X-Stencil-Tenantid is required to specify the tenant to be used. -H "X-Stencil-Tenantid: <your_tenant_id>" or X-Stencil-Tenantid: <your_tenant_id>

Add User to Group

Request

Add Users to a Group.

POST /group/member

Request Headers

Request Body

Response

Response Codes

Code Description
200 The request was successful. The response will contain a JSON body.
400 The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present.
401 You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty
404 The object you are trying to update doesn’t exist. The response will be empty.
500 There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty.

Update User in Group

Request

Updates user memberships in groups

PUT /group/member

Request Headers

Request Body

Response

Response Codes

Code Description
200 The request was successful. The response will contain a JSON body.
400 The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present.
401 You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty
404 The object you are trying to update doesn’t exist. The response will be empty.
500 There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty.

Delete Member

Request

Delete Member by ID

DELETE /group/member/:id

Delete Member by User ID and Group ID

DELETE /group/member

Delete All Users from Group

DELETE /group/member

Delete Multiple Members

DELETE /group/member

Request Headers

Request Parameter

Request Body

Response

Response Codes

Code Description
200 The request was successful. The response will contain a JSON body.
400 The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present.
401 You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty
404 The object you are trying to update doesn’t exist. The response will be empty.
500 There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty.

Authorization

All endpoints are protected by authorization headers which requires authorization and x-stencil-tenanid values to be passed in headers, which are verified using the HeaderAuthService.

Error Handling

The service includes comprehensive error handling, throwing appropriate exceptions for various scenarios such as unauthorized access, bad requests, or when required data is missing.

Response Format

All endpoints return a standardized ResponseDto object containing: