POST /group
POST /group/:id
string
{"roleIDs" : string[], "name" : string}
string
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. |
Sample cURL:
```sh
curl -X POST http://localhost:3000/group
-H “Content-Type: application/json”
-H “Authorization: Basic
Sample HTTPie:
```sh
http POST http://localhost:3000/group
Authorization:”Basic
GET /group
GET /group/:id
string
string
required when retreival needed for a particular groupCode | 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. |
Sample cURL:
```sh
curl -X GET http://localhost:3000/group
-H “Authorization: Bearer
Sample HTTPie:
```sh
http GET http://localhost:3000/group
Authorization:”Bearer
PUT /group/:id
string
string
,string[]
string
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. |
Sample cURL:
```sh
curl -X PUT http://localhost:3000/group/
Sample HTTPie:
```sh
http PUT http://localhost:3000/group/
DELETE /group/:id
string
string
| 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. |
Sample cURL:
```sh
curl -X DELETE http://localhost:3000/group/
Sample HTTPie:
```sh
http DELETE http://localhost:3000/group/
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
.
The service includes comprehensive error handling, throwing appropriate exceptions for various scenarios such as unauthorized access, bad requests, or when required data is missing.
All endpoints return a standardized ResponseDto
object containing:
success
: Boolean indicating operation successmessage
: Descriptive message about the operation resultdata
: The requested or manipulated data (when applicable)This service manages the relationship between users and groups within a multi-application system. It uses NestJS and Prisma for database operations.
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>"
orX-Stencil-Tenantid: <your_tenant_id>
POST /group/member
string
{groupIDs : string[], userIDs : string[]}
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. |
PUT /group/member
string
{groupIDs : string[], userIDs : string[]}
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. |
Sample cURL:
```sh
curl -X PUT http://localhost:3000/group/member
-H “Content-Type: application/json”
-H “Authorization: Basic
Sample HTTPie:
```sh
http PUT http://localhost:3000/group/member
Authorization:”Basic
DELETE /group/member/:id
DELETE /group/member
DELETE /group/member
DELETE /group/member
string
string
required when group is to be deleted through IDuserId
: The ID of the user && gpId
: The ID of the group required when group is to be deleted through userID and GroupIDgpId
: The ID of the group required when group is to be deleted thorugh group ID{membership : string[]}
required when multiple members of a gp to be deletedCode | 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. |
Sample cURL:
```sh
curl -X DELETE http://localhost:3000/group/member/
Sample HTTPie:
```sh
http DELETE http://localhost:3000/group/member/
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
.
The service includes comprehensive error handling, throwing appropriate exceptions for various scenarios such as unauthorized access, bad requests, or when required data is missing.
All endpoints return a standardized ResponseDto
object containing:
success
: Boolean indicating operation successmessage
: Descriptive message about the operation resultdata
: The requested or manipulated data (when applicable)