GET /tenant, DEL /tenant, PATCH /tenant
requiresX-Stencil-Tenanid
as a header also.POST /tenant
can only be accessed by atenant-scoped
authorization key
POST /tenant
POST /tenant/:id
string
string
{"name" : string, "jwtConfiguration" : JwtConfiguration}
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 HTTPie:
```sh
http POST http://localhost:3000/tenant
Authorization:”Bearer
Sample cURL:
```sh
curl -X POST http://localhost:3000/tenant
-H “Content-Type: application/json”
-H “Authorization: Bearer
PATCH /tenant/:id
string
string
{"name" ?: string, "jwtConfiguration" ?: JwtConfiguration, "data" ?: string | JSON }
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 HTTPie:
```sh
http PATCH http://localhost:3000/tenant/
Sample cURL:
```sh
curl -X PATCH http://localhost:3000/tenant/
DELETE /tenant/: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 HTTPie:
```sh
http DELETE http://localhost:3000/tenant/
Sample cURL:
```sh
curl -X DELETE http://localhost:3000/tenant/
GET /tenant/:id
GET /tenant
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 HTTPie:
```sh
http GET http://localhost:3000/tenant/
Sample cURL:
```sh
curl -X GET http://localhost:3000/tenant/
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 uses standard NestJS exceptions to handle errors:
UnauthorizedException
: Thrown when authorization fails.BadRequestException
: Thrown when required parameters are missing or invalid.InternalServerErrorException
: Thrown when a server error occurs during an operation.All endpoints return a standardized response object containing:
success
: Boolean indicating operation successmessage
: Descriptive message about the operation resultdata
: The requested or manipulated data (when applicable)