Ownership Transfer API
API for ownership transfer
Overview
The Ownership Transfer API allows authorized users to transfer ownership of roles and assets from one user to another within an organization.
Delete a new user
POST
/api/user/v1/ownership/transfer
Headers
Name | Value |
---|---|
Content-Type* |
|
Authorization* |
|
X-Authenticated-User-token* |
|
Body
{
"request": {
"context": "User Deletion",
"organisationId": "organisation-id-of-deleted-user",
"actionBy": {
"userId": "org-admin-user-id"
},
"fromUser": {
"userId": "deleted-user-id",
"roles": [
{
"role": "role-1",
"scope": [
{
"organisationId": "organisation-id-of-role-1"
}
]
},
{
"role": "role-2",
"scope": [
{
"organisationId": "organisation-id-of-role-2"
}
]
}
]
},
"toUser": {
"userId": "new-user-id",
"roles": [
{
"role": "role-1",
"scope": [
{
"organisationId": "organisation-id-of-role-1"
}
]
},
{
"role": "role-2",
"scope": [
{
"organisationId": "organisation-id-of-role-2"
}
]
}
]
},
"objects": [{
"objectType": "asset-object-type",
"identifier": "asset-identifier",
"primaryCategory": "asset-category",
"name": "asset-name"
}]
}
}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
context | string | Yes | The context of the transfer, typically "User Deletion". |
organisationId* | string | Yes | The ID of the organization associated with the deleted user. |
actionBy.userId* | string | Yes | The ID of the organization admin performing the transfer. |
fromUser.userId* | string | Yes | The ID of the deleted user. |
fromUser.roles* | array | Yes | The roles to be transferred. |
fromUser.roles[].role | string | Yes | The role name. |
fromUser.roles[].scope | array | Yes | The scope of the role. |
fromUser.roles[].scope[].organisationId | string | Yes | The ID of the organization associated with the role. |
toUser.userId* | string | Yes | The ID of the user receiving the ownership transfer. |
toUser.roles* | array | Yes | The roles being transferred. |
toUser.roles[].role | string | Yes | The role name. |
toUser.roles[].scope | array | Yes | The scope of the role. |
toUser.roles[].scope[].organisationId | string | Yes | The ID of the organization associated with the role. |
objects | array | Yes | The assets to be transferred. |
objects[].objectType | string | Yes | The type of the asset. |
objects[].identifier | string | Yes | The identifier of the asset. |
objects[].primaryCategory | string | Yes | The category of the asset. |
objects[].name | string | Yes | The name of the asset. |
Response
Response
{
"id": "api.user.ownership.transfer",
"ver": "v1",
"ts": "2024-05-20 10:36:04:695+0000",
"params": {
"resmsgid": "b681b51992d3833bd500323585629b33",
"msgid": "b681b51992d3833bd500323585629b33",
"err": null,
"status": "SUCCESS",
"errmsg": null
},
"responseCode": "OK",
"result": {
"status": "Ownership transfer process is submitted successfully!"
}
}
{
"id": "api.user.ownership.transfer",
"ver": "v1",
"ts": "2024-05-20 10:36:21:087+0000",
"params": {
"resmsgid": "92e62ce028dc5912e88edd8ef43c9a3b",
"msgid": "92e62ce028dc5912e88edd8ef43c9a3b",
"err": "UOS_UOWNTRANS0028",
"status": "FAILED",
"errmsg": "Organization ID is mandatory in the request."
},
"responseCode": "CLIENT_ERROR",
"result": {}
}
{
"id": "api.user.ownership.transfer",
"ver": "v1",
"ts": "2024-05-20 10:37:12:052+0000",
"params": {
"resmsgid": "0f5d442e3e19232cf5176cb2b8ee63a9",
"msgid": "0f5d442e3e19232cf5176cb2b8ee63a9",
"err": "UOS_0070",
"status": "FAILED",
"errmsg": "You are not authorized."
},
"responseCode": "UNAUTHORIZED",
"result": {}
}
Last updated