diff --git a/en/identity-server/next/docs/apis/restapis/tenant-management.yaml b/en/identity-server/next/docs/apis/restapis/tenant-management.yaml
index faac6e695..2ce6253b5 100644
--- a/en/identity-server/next/docs/apis/restapis/tenant-management.yaml
+++ b/en/identity-server/next/docs/apis/restapis/tenant-management.yaml
@@ -31,6 +31,8 @@ paths:
'application/json':
schema:
$ref: '#/components/schemas/TenantsListResponse'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
@@ -39,12 +41,6 @@ paths:
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
- '501':
- description: Not Implemented
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
x-codeSamples:
- lang: Curl
source: |
@@ -76,6 +72,8 @@ paths:
description: Location of the newly created tenant
schema:
type: string
+ '206':
+ $ref: '#/components/responses/PartialContent'
'400':
$ref: '#/components/responses/InvalidInput'
'401':
@@ -375,6 +373,98 @@ paths:
'https://localhost:9443/api/server/v1/tenants/{tenant-id}/owners' \
-H 'accept: application/json' \
-H 'Authorization: Basic YWRtaW46YWRtaW4='
+ '/tenants/{tenant-id}/owners/{owner-id}':
+ get:
+ tags:
+ - Tenants
+ summary: Retrieve tenant owner.
+ operationId: getOwner
+ description: |
+ Retrieve the tenant owner identified by the provided tenant id and owner id.
+
+ Scope(Permission) required: `internal_list_tenants`
+ parameters:
+ - $ref: '#/components/parameters/tenantIdPathParam'
+ - $ref: '#/components/parameters/ownerIdPathParam'
+ - $ref: '#/components/parameters/additionalClaimsQueryParam'
+ responses:
+ '200':
+ description: OK
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/OwnerInfoResponse'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ x-codeSamples:
+ - lang: Curl
+ source: |
+ curl -X 'GET' \
+ 'https://localhost:9443/api/server/v1/tenants/{tenant-id}/owners/{owner-id}' \
+ -H 'accept: application/json' \
+ -H 'Authorization: Basic YWRtaW46YWRtaW4='
+ put:
+ tags:
+ - Tenants
+ summary: Update tenant owner.
+ operationId: updateOwner
+ description: |
+ This API provides the capability to update the tenant owner.
+
+ Scope(Permission) required: `internal_modify_tenants`
+ parameters:
+ - $ref: '#/components/parameters/tenantIdPathParam'
+ - $ref: '#/components/parameters/ownerIdPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OwnerPutModel'
+ description: This represents the tenant owner to be updated.
+ required: true
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '206':
+ $ref: '#/components/responses/PartialContent'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ x-codeSamples:
+ - lang: Curl
+ source: |
+ curl -X 'PUT' \
+ 'https://localhost:9443/api/server/v1/tenants/{tenant-id}/owners/{owner-id}' \
+ -H 'accept: */*' \
+ -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
+ -H 'Content-Type: application/json' \
+ -d '{
+ "password": "kim123",
+ "email": "kim@wso2.com",
+ "firstname": "kim",
+ "lastname": "kim",
+ "additionalClaims": [
+ {
+ "claim": "http://wso2.org/claims/telephone",
+ "value": "+94 562 8723"
+ }
+ ]
+ }'
'/tenants/{tenant-id}/metadata':
delete:
tags:
@@ -437,6 +527,13 @@ components:
description: tenant id
schema:
type: string
+ ownerIdPathParam:
+ in: path
+ name: owner-id
+ required: true
+ description: owner id
+ schema:
+ type: string
tenantDomainPathParam:
in: path
name: tenant-domain
@@ -478,7 +575,7 @@ components:
name: sortBy
required: false
description: >-
- Attribute by which the retrieved records should be sorted. Currently sorting through _domainName_ only
+ Attribute by which the retrieved records should be sorted. Currently sorting through domainName only
supported.
schema:
type: string
@@ -487,12 +584,20 @@ components:
name: filter
required: false
description: >
- Condition to filter the retrival of records. Supports 'sw', 'co', 'ew'
- and 'eq' operations and also complex queries with 'and' operations. E.g.
- /tenants?filter=domain+sw+"wso2". _This
- option is not yet supported._
+ Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations.
+ Currently, filtering is supported only by the domainName.
+ E.g. /tenants?filter=domainName+sw+wso2.
+ schema:
+ type: string
+ additionalClaimsQueryParam:
+ in: query
+ name: additionalClaims
+ required: false
+ description: >-
+ Define set of additional user claims (as comma separated) to be returned.
schema:
type: string
+ example: http://wso2.org/claims/telephone
responses:
NotFound:
description: The specified resource is not found
@@ -512,6 +617,12 @@ components:
'application/json':
schema:
$ref: '#/components/schemas/Error'
+ PartialContent:
+ description: Partial Content
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
InvalidInput:
description: Invalid Input Request
content:
@@ -679,8 +790,6 @@ components:
required:
- username
- email
- - firstname
- - lastname
- provisioningMethod
properties:
username:
@@ -712,6 +821,62 @@ components:
items:
$ref: '#/components/schemas/AdditionalClaims'
+ OwnerPutModel:
+ type: object
+ required:
+ - email
+ - firstname
+ - lastname
+ properties:
+ email:
+ type: string
+ example: kim@wso2.com
+ description: Email address of the owner.
+ password:
+ type: string
+ example: kim123
+ description: Password of the owner.
+ firstname:
+ type: string
+ example: kim
+ description: First name of the owner.
+ lastname:
+ type: string
+ example: kim
+ description: Last name of the owner.
+ additionalClaims:
+ type: array
+ items:
+ $ref: '#/components/schemas/AdditionalClaims'
+
+ OwnerInfoResponse:
+ type: object
+ properties:
+ id:
+ type: string
+ example: "4875-jhgr-454hb"
+ description: id of the tenant owner.
+ username:
+ type: string
+ example: kim
+ description: Username for the tenant owner.
+ email:
+ type: string
+ example: kim@wso2.com
+ description: Email address of the owner.
+ firstname:
+ type: string
+ example: kim
+ description: First name of the owner.
+ lastname:
+ type: string
+ example: kim
+ description: Last name of the owner.
+ additionalClaims:
+ type: array
+ items:
+ $ref: '#/components/schemas/AdditionalClaims'
+
OwnerResponse:
type: object
properties: