Problem Statement
Related Jira Task -
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
...
Pros | Cons |
---|---|
No overhead to SSO API. Comparison of fields and updation, if needed, happens asynchronously. | It's very rare for the payload data of a particular user to change. Though the execution is asynchronous, still there's an overhead to the system to perform this check for each request |
Code Block | ||||
---|---|---|---|---|
| ||||
{
// about the event
"identifier": "", // unique event id
"ets": , // epoch timestamp of event (time in milli-seconds. For ex: 1556018741532)
"operationType": "", // operation to be done, in this case it's UPDATE
"eventType": "", // type of event, in this case it's transactional
// event data
"event": {
"userExternalId": "", // externalId of the user
"nameFromPayload": "", // name of the user from payload
"channel": "", // channel of the tenant
"orgExternalId": "", // orgExternalId of the linked org
"roles": [ "" , "" ], // roles of the user
"userId": "", // sunbird internal id of the user
"organisations": {}, // linked organisations' data
"firstName": "" // firstName of the user in the system
},
"objectType": "user" // affected entity
} |
APIs to be consumed:
API Name | API Endpoint | Usage |
---|---|---|
Organisation Search API | <host>/api/org/v1/search | To find the organisationId of the linked organisation using orgExternalId |
Private User Update API | {{host}}/private/user/v1/update | To update name, organisation associations and roles of the user |