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

NameValue

Content-Type*

application/json

Authorization*

Bearer <token>

X-Authenticated-User-token*

<keycloak-access-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"
        }]
    }
}

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!"
    }
}

Last updated