Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem Statement

...

Code Block
languagejs
titleMessage Format
{
  // about the event
  "identifier": "00001",                                  // unique event id
  "ets": 1556018741532,                                   // epoch timestamp of event (time in milli-seconds. For ex: 1556018741532)
  "operationType": "UPDATE",                              // operation to be done, in this case it's UPDATE
  "eventType": "transactional",                           // type of event, in this case it's transactional
  "objectType": "user",                                   // eventaffected dataentity

  // event data
  "event":  {
    "eventuserExternalId": {"598345234",                     "userExternalId": "",   // externalId of the user
    "nameFromPayload": "John Doe",                        // name of the user from payload
    "channel": "demochannel",                             // channel of the tenant
    "orgExternalId": "52452345",                          // orgExternalId of the linked org
    "roles": [ "" , "" ],                                            // roles of the user
      "userId": ""CONTENT_CREATOR",
      "CONTENT_REVIEWER"
    ],
    "userId": "aa28fa93-bcb6-449f-8312-fd842f6e971d",     // sunbird internal id of the user
    "organisations": {}, [                                    // linked organisations' data
      {
        "organisationId": "0127474328062853120",
        "firstNameuserId": "aa28fa93-bcb6-449f-8312-fd842f6e971d",
        "roles": [
// firstName of the user in the system   }"CONTENT_CREATOR",
          "PUBLIC"
        ]
      }
    ],
    "firstName": "John Doe"                  "objectType": "user"      // affected entity }   // firstName of the user in the system
  }
}             


APIs to be consumed:

API NameAPI EndpointUsage
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/updateTo update name, organisation associations and roles of the user

...