📙
Sunbird Lern
AskDot
  • LEARN
    • Overview
    • Functional Capabilities
    • Technical Architecture
      • Technical Architecture Diagram
      • Tech Stack
    • Dependencies
    • Product Roadmap
  • USE
    • Overview
    • Release Notes
      • Release V 8.0.0 (Ongoing)
      • Release V 7.0.0
      • Release V 5.4.0
      • Release V 5.3.0
      • Release V 5.2.0
      • Release V 5.1.0
      • Release V 5.0.1
      • Release V 5.0.0
      • Release V 4.10.0
      • Release V 4.9.0
      • Release V 4.8.0
      • Release V 4.7.0
    • Developer Guide
      • USER & ORG SERVICE
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Keycloak Local setup
          • Additional Installation Dependencies:
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
              • User
              • Organisation
              • System Settings
              • Role
              • Bulk Upload Process
              • Tenant Preference
              • Cassandra Migration Version
              • User Consent
              • Email Template
              • OTP
              • Page Management (LMS Service)
              • Location
              • User Notes
              • Deprecated
          • Elastic Search
          • Redis
        • APIs
          • User Management
            • User Deletion API
            • Ownership Transfer API
          • Organisation Management
          • Location Management
          • Consent Management
          • OTP Services
          • Tenant Configurations
          • Bulk Upload
          • System Settings
          • API Management Service
          • Data Sync
          • Notification APIs
        • Flink Jobs
          • User Cache Updater
          • User Deletion Cleanup Flink Job
          • Ownership Transfer Flink Job
        • Reports
          • Standard Exhaust
            • State Admin Geo report
            • State Admin Report
          • Other Jobs
            • User Cache Indexer Job
            • Delete Users Assets Report
          • Data Products Developer Installation
            • System Requirements
            • Tech Stack
            • Installation Dependencies
            • Local installation of data-products
            • Server setup Guide
            • Installation Configuration
            • Data-product creation guide
            • Troubleshooting a data-product
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
          • System Settings
          • Email Configuration
          • SMS Configuration
          • OTP based SMS Configuration
        • Roles
          • System Roles
          • User Roles
          • RBAC
        • Dependencies
        • Keycloak on Sunbird
        • How to Guide
          • Create Organization
          • Create User
          • Add new user type & location
        • Single Sign-on with Sunbird
        • Caching and Denormalising User Metadata
          • ETLUserCacheUpdaterJob
          • UserCacheUpdaterFlinkJob
        • Unit Tests and Code Coverage
        • FAQs
      • LMS(BATCH) SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
        • Data Models
          • Cassandra
            • Data Dictionary
          • ElasticSearch
          • Redis
        • APIs
        • Flink Jobs
          • Merge User Courses
          • Relation Cache Updater
          • Activity Aggregate Updater
          • Assessment Aggregator
          • Enrolment Reconciliation
          • Collection Certificate Pre-Processor
          • Collection Certificate Generator
        • Reports
          • On-Demand Exhaust
            • Response Exhaust
            • User Info Exhaust
            • Progress Exhaust
          • Other Jobs
            • Collection Summary Job
            • Course Batch Status Updater Job
            • Cassandra Migrator Job
            • Score Metric Migration Job
            • Assessment Score Correction Job
            • Collection Reconciliation Job
            • Course Enrollment Job
            • Course Consumption Job
        • Logs, Telemetry Events
        • Configuration
          • System Configuration
          • Functional Configuration
        • Dependencies
        • Certificate Registry and Credentialing using Sunbird-RC
          • Configuring PublicKey in Sunbird-RC
          • Server Setup guide for Sunbird-RC
          • API Guide For Sunbird-RC
        • Certificate Flow
          • Certificates Creation and Configuration
        • FAQs
      • GROUPS
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
          • Redis
        • APIs
          • Create Group
        • Logs, Telemetry Events
          • UI Telemetry Events
          • Service Telemetry Events
        • Configuration
          • Functional Configurations
        • Design References
        • Dependencies
        • Unit Tests and Code Coverage
      • NOTIFICATION SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Data Dictionary
        • APIs
        • Flink Jobs
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
        • Dependencies
        • Unit Tests and Code Coverage
      • DISCUSSION FORUM
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
            • Nodebb setup
            • Discussion Middleware Setup
            • Discussion Middleware
            • Discussion forum integration with any application
            • Discussion-UI setup along with demo application.
            • Sunbird-lern portal for DF
          • Source Code
        • APIs
          • Category APIs
          • User APIs
          • Post APIs
          • Topic APIs
          • Forum APIs
        • Context Schema
        • Configurations
          • Nodebb Admin panel settings
          • Discussion MW & Nodebb System Config
        • Telemetry Events
        • Dependencies
      • ML SERVICE
        • DATA PIPELINE (Flink Jobs)
          • Program User Info
            • Component Diagram
            • Data Model
            • Folder Structure
          • Ml User Delete
            • Component Diagram
            • Data Model
            • Folder Structure
        • DATA PRODUCTS
          • Program Exhaust
            • Component Diagram
            • Folder Structure
    • Server Installation
    • Dependency setup
    • Deprecation
      • Release-5.4.0
    • Jenkins Jobs
    • Release Calendar
    • Learn More
      • Tech References
      • Telemetry Processing
      • Data Dictionary
        • Sample Data
      • Delete User Functionality
      • Asset Ownership Transfer
    • FAQs
  • Engage
    • Discuss
    • Contribute to Sunbird Lern
    • Raise an Issue
    • Contribution Guidelines
Powered by GitBook
On this page
  • Overview
  • Delete a new user
  • Headers
  • Body
  • Response

Was this helpful?

Edit on GitHub
  1. USE
  2. Developer Guide
  3. USER & ORG SERVICE
  4. APIs
  5. User Management

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*

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

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": {}
}
PreviousUser Deletion APINextOrganisation Management

Last updated 11 months ago

Was this helpful?