oidc-lite

Tenant API

Overview

GET /tenant, DEL /tenant, PATCH /tenant requires X-Stencil-Tenanid as a header also. POST /tenant can only be accessed by a tenant-scoped authorization key

Sequence Diagram

Groups Sequence Diagram

Create a Tenant

Request

Create a Tenant with random id

POST /tenant

Create a Tenant with given id

POST /tenant/:id

Request Headers

Request Parameters

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 a Tenant

Request

Updates an existing tenant.

PATCH /tenant/:id

Request Headers

Request Parameters

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 a Tenant

Request

Deletes an existing tenant.

DELETE /tenant/:id

Request Headers

Request Parameters

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.

Return Tenant

Request

Retrieves a tenant by ID.

GET /tenant/:id

Return all Tenants

GET /tenant

Request Headers

Request Parameters

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 uses standard NestJS exceptions to handle errors:

Response Format

All endpoints return a standardized response object containing: