User Management

Create User V1

post

This API is used to create a user - The endpoint for Create User V1 is /user/v1/create - The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

Example: {{authorization}}
Body
Responses
200
OK ! Successful operation."Create User" operation was successfully executed.
application/json
post
POST /api/user/v1/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 180

{
  "request": {
    "firstName": "selfdeclaredev5",
    "userName": "selfdeclaredev5",
    "email": "[email protected]",
    "lastName": "selfdeclaredev5",
    "emailVerified": true,
    "password": "Pass@1"
  }
}
{
  "id": "api.user.create",
  "ver": "v1",
  "ts": "2020-11-23 10:03:39:935+0000",
  "params": {
    "resmsgid": null,
    "msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "userId": "f5863f60-2b21-47dc-aa9c-2f9822bae9bd",
    "response": "SUCCESS",
    "errors": []
  }
}

Create User V2

post

This API is used to create a user

  • The endpoint for Create User V2 is /user/v2/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
Body
Responses
200
OK ! Successful operation."Create User" operation was successfully executed.
application/json
post
POST /api/user/v2/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 151

{
  "request": {
    "firstName": "selfdeclaredev2",
    "email": "[email protected]",
    "lastName": "selfdeclaredev2",
    "emailVerified": true,
    "password": "Pass@1"
  }
}
{
  "id": "api.user.create",
  "ver": "v2",
  "ts": "2020-11-23 06:47:27:960+0000",
  "params": {
    "resmsgid": null,
    "msgid": "e271bd1c-cf1c-43d1-811c-cf845e507870",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS",
    "userId": "0019f27d-68f4-48d6-a2d8-dbe00099e8f3",
    "errors": []
  }
}

Create User V3

post

This API is used to create a user

  • The endpoint for Create User V3 is /user/v3/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
Body
Responses
200Success
application/json
post
POST /api/user/v3/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 161

{
  "request": {
    "firstname": "first name",
    "password": "Password@1",
    "email": "[email protected]",
    "lastname": "last name",
    "userName": "username1",
    "emailVerified": true
  }
}
{
  "id": "api.user.create",
  "ver": "v3",
  "ts": "2020-11-23 06:59:16:472+0000",
  "params": {
    "resmsgid": null,
    "msgid": "a9ee7e03-6034-47b7-8499-0fb4dc86fb1a",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "userId": "0e59b33f-d829-459f-a043-03ea726bf91c",
    "response": "SUCCESS",
    "errors": []
  }
}

Create SsoUser V1

post

This API is used to create a user

  • The endpoint for Create SsoUser V1 is /user/v1/sso/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
Body
Responses
200Success
application/json
post
POST /api/user/v1/sso/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 420

{
  "request": {
    "firstname": "first name",
    "password": "Password@1",
    "email": "[email protected]",
    "channel": "ft_channel_new_9497168926",
    "externalIds": {
      "id": "2176105,",
      "provider": "ft_channel_new_9497168926,",
      "idType": "ft_channel_new_9497168926"
    },
    "orgExternalId": "ft_org_external_1591465322456",
    "profileLocation": [
      {
        "code": "02,",
        "type": "state"
      },
      {
        "code": "0211,",
        "type": "district"
      }
    ],
    "lastname": "last name",
    "userName": "username1"
  }
}
{
  "id": "api.user.create",
  "ver": "v1",
  "ts": "2020-11-23 06:59:16:472+0000",
  "params": {
    "resmsgid": null,
    "msgid": "a9ee7e03-6034-47b7-8499-0fb4dc86fb1a",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "userId": "0e59b33f-d829-459f-a043-03ea726bf91c",
    "response": "SUCCESS",
    "errors": []
  }
}

User Signup V1

post

This API is used to create a user

  • The endpoint for User Signup is /user/v1/signup
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
Body
Responses
200Success
application/json
post
POST /api/user/v1/signup HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 161

{
  "request": {
    "firstname": "first name",
    "password": "Password@1",
    "email": "[email protected]",
    "lastname": "last name",
    "userName": "username1",
    "emailVerified": true
  }
}
{
  "id": "api.user.create",
  "ver": "v3",
  "ts": "2020-11-23 06:59:16:472+0000",
  "params": {
    "resmsgid": null,
    "msgid": "a9ee7e03-6034-47b7-8499-0fb4dc86fb1a",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "userId": "0e59b33f-d829-459f-a043-03ea726bf91c",
    "response": "SUCCESS",
    "errors": []
  }
}

User Signup V2

post

This API is used to create a user

  • The endpoint for User Signup V2 is /user/v2/signup
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
Body
Responses
200Success
application/json
post
POST /api/user/v2/signup HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 140

{
  "request": {
    "firstname": "first name",
    "password": "Password@1",
    "email": "[email protected]",
    "lastname": "last name",
    "userName": "username1"
  }
}
{
  "id": "api.user.create",
  "ver": "v2",
  "ts": "2020-11-23 06:59:16:472+0000",
  "params": {
    "resmsgid": null,
    "msgid": "a9ee7e03-6034-47b7-8499-0fb4dc86fb1a",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "userId": "0e59b33f-d829-459f-a043-03ea726bf91c",
    "response": "SUCCESS",
    "errors": []
  }
}

Create User V4

post

This API is used to create MUA user.

  • The endpoint for Create MUA User is /user/v4/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Create User" operation was successfully executed.
post
POST /api/user/v4/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 118

{
  "request": {
    "firstname": "first namechild1",
    "lastname": "last name",
    "managedBy": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92"
  }
}

No content

Create ManagedUser V1

post

This API is used to create MUA user.

  • The endpoint for Create MUA User is /user/v1/managed/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Create MUA User" operation was successfully executed.
post
POST /api/user/v1/managed/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 170

{
  "request": {
    "firstName": "child7",
    "managedBy": "c977cd14-8cdf-4f17-b4bd-418736e97861",
    "profileLocation": [
      {
        "code": "02,",
        "type": "state"
      },
      {
        "code": "0211,",
        "type": "district"
      }
    ]
  }
}

No content

Search User V1

post

This API is used for searching a particular user

  • The endpoint for Search User is /user/v1/search
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Search User" operation was successfully executed.
application/json
post
POST /api/user/v1/search HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "request": {
    "filters": {
      "email": "[email protected]"
    }
  }
}
{
  "id": "api.user.search",
  "ver": "v1",
  "ts": "2020-11-23 09:16:58:628+0000",
  "params": {
    "resmsgid": null,
    "msgid": "ad7135b8-ef64-44bd-adaa-0b131a657689",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "count": 1,
      "content": [
        {
          "webPages": [],
          "tcStatus": null,
          "maskedPhone": null,
          "rootOrgName": "org3",
          "subject": [],
          "channel": "channel1",
          "language": [],
          "updatedDate": null,
          "managedBy": null,
          "flagsValue": 2,
          "id": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "recoveryEmail": "",
          "identifier": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "thumbnail": null,
          "updatedBy": null,
          "accesscode": null,
          "locationIds": [],
          "registryId": null,
          "rootOrgId": 126796199493140480,
          "prevUsedEmail": "",
          "firstname": "first name",
          "tncAcceptedOn": null,
          "allTncAccepted": {},
          "phone": "",
          "dob": null,
          "grade": [],
          "currentLoginTime": null,
          "userType": "TEACHER",
          "userSubType": null,
          "status": 1,
          "lastname": "last name",
          "gender": null,
          "roles": [
            "PUBLIC"
          ],
          "prevUsedPhone": "",
          "stateValidated": false,
          "isDeleted": false,
          "organisations": [
            {
              "updatedBy": null,
              "organisationId": 126796199493140480,
              "orgName": "org3",
              "addedByName": null,
              "addedBy": null,
              "roles": [
                "PUBLIC"
              ],
              "approvedBy": null,
              "updatedDate": null,
              "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
              "approvaldate": null,
              "isDeleted": false,
              "hashTagId": 126796199493140480,
              "isRejected": null,
              "position": null,
              "id": 131573015167221760,
              "orgjoindate": "2020-11-23 07:02:43:194+0000",
              "isApproved": null,
              "orgLeftDate": null
            }
          ],
          "provider": null,
          "countryCode": null,
          "maskedEmail": "se*************@yopmail.com",
          "tempPassword": null,
          "email": "se*************@yopmail.com",
          "profileSummary": null,
          "phoneVerified": false,
          "tcUpdatedDate": null,
          "recoveryPhone": "",
          "avatar": null,
          "userName": "username1",
          "lastLoginTime": null,
          "emailVerified": true,
          "framework": {},
          "createdDate": "2020-11-23 07:02:36:155+0000",
          "createdBy": null,
          "location": null,
          "tncAcceptedVersion": null
        }
      ]
    }
  }
}

Search User V2

post

This API is used for searching a particular user

  • The endpoint for Search User V2 is /user/v2/search
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Search User V2" operation was successfully executed.
application/json
post
POST /api/user/v2/search HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "request": {
    "filters": {
      "email": "[email protected]"
    }
  }
}
{
  "id": "api.user.search",
  "ver": "v2",
  "ts": "2020-11-23 09:16:58:628+0000",
  "params": {
    "resmsgid": null,
    "msgid": "ad7135b8-ef64-44bd-adaa-0b131a657689",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "count": 1,
      "content": [
        {
          "maskedPhone": null,
          "tcStatus": null,
          "channel": "channel1",
          "updatedDate": "2021-04-07 05:09:45:607+0000",
          "managedBy": null,
          "flagsValue": 2,
          "id": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "recoveryEmail": "co**************@yopmail.com",
          "identifier": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "externalIds": [],
          "rootOrgId": 126796199493140480,
          "prevUsedEmail": null,
          "firstname": "first name",
          "tncAcceptedOn": 1617265216047,
          "allTncAccepted": {},
          "phone": null,
          "dob": null,
          "userType": "student",
          "status": 1,
          "lastName": null,
          "tncLatestVersion": "3.5.0",
          "roles": "PUBLIC",
          "prevUsedPhone": null,
          "stateValidated": false,
          "isDeleted": false,
          "organisations": [
            {
              "organisationId": 126796199493140480,
              "updatedBy": null,
              "orgName": "org1",
              "addedByName": null,
              "addedBy": null,
              "roles": "PUBLIC",
              "approvedBy": null,
              "channel": "channel1",
              "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
              "orgLocation": [
                {
                  "type": "state",
                  "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
                },
                {
                  "type": "district",
                  "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
                }
              ],
              "externalId": 101010,
              "updatedDate": null,
              "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "approvaldate": null,
              "isSchool": false,
              "isDeleted": false,
              "hashTagId": 126796199493140480,
              "isRejected": null,
              "locations": [
                {
                  "code": 29,
                  "name": "state1",
                  "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
                  "type": "state",
                  "parentId": null
                },
                {
                  "code": 2901,
                  "name": "district1",
                  "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141",
                  "type": "district",
                  "parentId": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
                }
              ],
              "id": 1324864401294131200,
              "position": null,
              "isApproved": null,
              "orgjoindate": "2021-04-01 08:19:53:343+0000",
              "orgLeftDate": null
            },
            {
              "organisationId": 127419693630996480000,
              "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "orgName": "org2",
              "addedByName": null,
              "addedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "roles": [],
              "approvedBy": null,
              "channel": "tn",
              "locationIds": "91d9baae-14f1-477a-955c-f91bd9037f0b 107c9472-a950-4768-bcd6-f882910177c4 ba31e7c2-fac9-472a-8867-1582c73bcca8 5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "orgLocation": [
                {
                  "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
                  "type": "state"
                },
                {
                  "id": "107c9472-a950-4768-bcd6-f882910177c4",
                  "type": "district"
                },
                {
                  "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
                  "type": "block"
                },
                {
                  "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
                  "type": "cluster"
                }
              ],
              "externalId": 33100800608,
              "updatedDate": "2021-04-07 05:09:38:366+0000",
              "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "approvaldate": null,
              "isSchool": true,
              "isDeleted": false,
              "hashTagId": 127419693630996480000,
              "isRejected": false,
              "locations": [
                {
                  "code": 31,
                  "name": "state2",
                  "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
                  "type": "state",
                  "parentId": null
                },
                {
                  "code": 3110,
                  "name": "district2",
                  "id": "107c9472-a950-4768-bcd6-f882910177c4",
                  "type": "district",
                  "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
                },
                {
                  "code": 31100169,
                  "name": "block1",
                  "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
                  "type": "block",
                  "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
                },
                {
                  "code": 3110016901,
                  "name": "block1 Cluster",
                  "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
                  "type": "cluster",
                  "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
                }
              ],
              "id": 132527931586969600,
              "position": null,
              "isApproved": false,
              "orgjoindate": "2021-04-07 05:09:45:655+0000",
              "orgLeftDate": "2021-04-07 05:09:38:366+0000"
            }
          ],
          "provider": null,
          "countryCode": null,
          "tncLatestVersionUrl": "https://organisation2.blob.core.windows.net/termsandcondtions/terms-and-conditions-v9.html#termsOfUse",
          "maskedEmail": "k1**@yopmail.com",
          "email": "k1**@yopmail.com",
          "rootOrg": {
            "dateTime": null,
            "preferredLanguage": null,
            "keys": null,
            "approvedBy": null,
            "channel": "channel1",
            "description": "org3",
            "updatedDate": "2021-03-31 17:31:19:346+0000",
            "addressId": null,
            "organisationType": 5,
            "orgType": null,
            "isTenant": true,
            "provider": null,
            "locationId": null,
            "orgCode": null,
            "theme": null,
            "id": 126796199493140480,
            "communityId": null,
            "isApproved": null,
            "email": null,
            "slug": "channel1",
            "isSSOEnabled": null,
            "orgName": "org1",
            "updatedBy": null,
            "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
            "externalId": 101010,
            "orgLocation": [
              {
                "type": "state",
                "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
              },
              {
                "type": "district",
                "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
              }
            ],
            "isRootOrg": true,
            "rootOrgId": 126796199493140480,
            "approvedDate": null,
            "imgUrl": null,
            "homeUrl": null,
            "orgTypeId": null,
            "isDefault": null,
            "createdDate": "2019-01-18 09:48:13:428+0000",
            "createdBy": "system",
            "parentOrgId": null,
            "hashTagId": 126796199493140480,
            "noOfMembers": null,
            "status": 1
          },
          "phoneVerified": false,
          "tcUpdatedDate": null,
          "userLocations": [
            {
              "code": 3110,
              "name": "district2",
              "id": "107c9472-a950-4768-bcd6-f882910177c4",
              "type": "district",
              "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
            },
            {
              "code": 3110016901,
              "name": "block1 Cluster",
              "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "type": "cluster",
              "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
            },
            {
              "code": 31,
              "name": "state2",
              "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
              "type": "state",
              "parentId": null
            },
            {
              "code": 31100169,
              "name": "block1",
              "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
              "type": "block",
              "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
            },
            {
              "identifier": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
              "code": 31100800608,
              "name": "org2",
              "id": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
              "type": "school",
              "parentId": "5c8876b5-981c-4c6a-b23d-20c9e17428e1"
            }
          ],
          "recoveryPhone": null,
          "userName": "username 2",
          "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "userSubType": null,
          "promptTnC": false,
          "emailVerified": true,
          "createdDate": "2021-04-01 08:19:50:971+0000",
          "framework": {
            "board": "State state3",
            "gradeLevel": "Class 1",
            "id": "ap_k-12_1",
            "medium": "English",
            "subject": "English"
          },
          "createdBy": null,
          "profileUserType": {
            "subType": null,
            "type": "student"
          },
          "profileUserTypes": [
            {
              "subType": null,
              "type": "student"
            }
          ],
          "tncAcceptedVersion": "3.5.0"
        }
      ]
    }
  }
}

Search User V3

post

This API is used for searching a particular user

  • The endpoint for Search User V2 is /user/v3/search
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Search User V2" operation was successfully executed.
application/json
post
POST /api/user/v3/search HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "request": {
    "filters": {
      "email": "[email protected]"
    }
  }
}
{
  "id": "api.user.search",
  "ver": "v2",
  "ts": "2020-11-23 09:16:58:628+0000",
  "params": {
    "resmsgid": null,
    "msgid": "ad7135b8-ef64-44bd-adaa-0b131a657689",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "count": 1,
      "content": [
        {
          "maskedPhone": null,
          "tcStatus": null,
          "channel": "channel1",
          "updatedDate": "2021-04-07 05:09:45:607+0000",
          "managedBy": null,
          "flagsValue": 2,
          "id": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "recoveryEmail": "co**************@yopmail.com",
          "identifier": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "externalIds": [],
          "rootOrgId": 126796199493140480,
          "prevUsedEmail": null,
          "firstname": "first name",
          "tncAcceptedOn": 1617265216047,
          "allTncAccepted": {},
          "phone": null,
          "dob": null,
          "userType": "student",
          "status": 1,
          "lastName": null,
          "tncLatestVersion": "3.5.0",
          "roles": [
            {
              "role": "COURSE_CREATOR",
              "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "scope": [
                {
                  "organisationId": 126796199493140480
                }
              ],
              "createdDate": "2021-06-07 11:29:41:606+0530",
              "updatedBy": null,
              "createdBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "updatedDate": null
            }
          ],
          "prevUsedPhone": null,
          "stateValidated": false,
          "isDeleted": false,
          "organisations": [
            {
              "organisationId": 126796199493140480,
              "updatedBy": null,
              "orgName": "org1",
              "addedByName": null,
              "addedBy": null,
              "approvedBy": null,
              "channel": "channel1",
              "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
              "orgLocation": [
                {
                  "type": "state",
                  "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
                },
                {
                  "type": "district",
                  "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
                }
              ],
              "externalId": 101010,
              "updatedDate": null,
              "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "approvaldate": null,
              "isSchool": false,
              "isDeleted": false,
              "hashTagId": 126796199493140480,
              "isRejected": null,
              "locations": [
                {
                  "code": 29,
                  "name": "state1",
                  "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
                  "type": "state",
                  "parentId": null
                },
                {
                  "code": 2901,
                  "name": "district1",
                  "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141",
                  "type": "district",
                  "parentId": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
                }
              ],
              "id": 1324864401294131200,
              "position": null,
              "isApproved": null,
              "orgjoindate": "2021-04-01 08:19:53:343+0000",
              "orgLeftDate": null
            },
            {
              "organisationId": 127419693630996480000,
              "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "orgName": "org2",
              "addedByName": null,
              "addedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "approvedBy": null,
              "channel": "tn",
              "locationIds": "91d9baae-14f1-477a-955c-f91bd9037f0b 107c9472-a950-4768-bcd6-f882910177c4 ba31e7c2-fac9-472a-8867-1582c73bcca8 5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "orgLocation": [
                {
                  "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
                  "type": "state"
                },
                {
                  "id": "107c9472-a950-4768-bcd6-f882910177c4",
                  "type": "district"
                },
                {
                  "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
                  "type": "block"
                },
                {
                  "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
                  "type": "cluster"
                }
              ],
              "externalId": 33100800608,
              "updatedDate": "2021-04-07 05:09:38:366+0000",
              "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
              "approvaldate": null,
              "isSchool": true,
              "isDeleted": false,
              "hashTagId": 127419693630996480000,
              "isRejected": false,
              "locations": [
                {
                  "code": 31,
                  "name": "state2",
                  "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
                  "type": "state",
                  "parentId": null
                },
                {
                  "code": 3110,
                  "name": "district2",
                  "id": "107c9472-a950-4768-bcd6-f882910177c4",
                  "type": "district",
                  "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
                },
                {
                  "code": 31100169,
                  "name": "block1",
                  "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
                  "type": "block",
                  "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
                },
                {
                  "code": 3110016901,
                  "name": "block1 Cluster",
                  "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
                  "type": "cluster",
                  "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
                }
              ],
              "id": 132527931586969600,
              "position": null,
              "isApproved": false,
              "orgjoindate": "2021-04-07 05:09:45:655+0000",
              "orgLeftDate": "2021-04-07 05:09:38:366+0000"
            }
          ],
          "provider": null,
          "countryCode": null,
          "tncLatestVersionUrl": "https://organisation2.blob.core.windows.net/termsandcondtions/terms-and-conditions-v9.html#termsOfUse",
          "maskedEmail": "k1**@yopmail.com",
          "email": "k1**@yopmail.com",
          "rootOrg": {
            "dateTime": null,
            "preferredLanguage": null,
            "keys": null,
            "approvedBy": null,
            "channel": "channel1",
            "description": "org3",
            "updatedDate": "2021-03-31 17:31:19:346+0000",
            "addressId": null,
            "organisationType": 5,
            "orgType": null,
            "isTenant": true,
            "provider": null,
            "locationId": null,
            "orgCode": null,
            "theme": null,
            "id": 126796199493140480,
            "communityId": null,
            "isApproved": null,
            "email": null,
            "slug": "channel1",
            "isSSOEnabled": null,
            "orgName": "org1",
            "updatedBy": null,
            "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
            "externalId": 101010,
            "orgLocation": [
              {
                "type": "state",
                "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
              },
              {
                "type": "district",
                "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
              }
            ],
            "isRootOrg": true,
            "rootOrgId": 126796199493140480,
            "approvedDate": null,
            "imgUrl": null,
            "homeUrl": null,
            "orgTypeId": null,
            "isDefault": null,
            "createdDate": "2019-01-18 09:48:13:428+0000",
            "createdBy": "system",
            "parentOrgId": null,
            "hashTagId": 126796199493140480,
            "noOfMembers": null,
            "status": 1
          },
          "phoneVerified": false,
          "tcUpdatedDate": null,
          "userLocations": [
            {
              "code": 3110,
              "name": "district2",
              "id": "107c9472-a950-4768-bcd6-f882910177c4",
              "type": "district",
              "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
            },
            {
              "code": 3110016901,
              "name": "block1 Cluster",
              "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "type": "cluster",
              "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
            },
            {
              "code": 31,
              "name": "state2",
              "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
              "type": "state",
              "parentId": null
            },
            {
              "code": 31100169,
              "name": "block1",
              "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
              "type": "block",
              "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
            },
            {
              "identifier": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
              "code": 31100800608,
              "name": "org2",
              "id": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
              "type": "school",
              "parentId": "5c8876b5-981c-4c6a-b23d-20c9e17428e1"
            }
          ],
          "recoveryPhone": null,
          "userName": "username 2",
          "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "userSubType": null,
          "promptTnC": false,
          "emailVerified": true,
          "createdDate": "2021-04-01 08:19:50:971+0000",
          "framework": {
            "board": "State state3",
            "gradeLevel": "Class 1",
            "id": "ap_k-12_1",
            "medium": "English",
            "subject": "English"
          },
          "createdBy": null,
          "profileUserType": {
            "subType": null,
            "type": "student"
          },
          "profileUserTypes": [
            {
              "subType": null,
              "type": "student"
            }
          ],
          "tncAcceptedVersion": "3.5.0"
        }
      ]
    }
  }
}

Update User V1

patch

This API is use for updating the user realted details

  • The endpoint for Update User is /user/v1/update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

Access token of registered user performing given API request.

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Update User" operation was successfully executed.
patch
PATCH /api/user/v1/update HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "request": {
    "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
    "phone": 8888888888,
    "phoneVerified": true
  }
}

No content

Update User V2

patch

This API is use for updating the user realted details

  • The endpoint for Update User V2 is /user/v2/update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

Access token of registered user performing given API request.

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Update User V2" operation was successfully executed.
patch
PATCH /api/user/v2/update HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 286

{
  "request": {
    "userId": "c977cd14-8cdf-4f17-b4bd-418736e97861",
    "phone": 8888888888,
    "profileLocation": [
      {
        "code": "32,",
        "type": "state"
      },
      {
        "code": "3210,",
        "type": "district"
      }
    ],
    "profileUserType": {
      "subType": "deo",
      "type": "administrator"
    },
    "profileUserTypes": [
      {
        "subType": "deo",
        "type": "administrator"
      }
    ]
  }
}

No content

Update User V3

patch

This API is use for updating the user realted details

  • The endpoint for Update User V3 is /user/v3/update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

Access token of registered user performing given API request.

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Update User V3" operation was successfully executed.
patch
PATCH /api/user/v3/update HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 286

{
  "request": {
    "userId": "c977cd14-8cdf-4f17-b4bd-418736e97861",
    "phone": 8888888888,
    "profileLocation": [
      {
        "code": "32,",
        "type": "state"
      },
      {
        "code": "3210,",
        "type": "district"
      }
    ],
    "profileUserType": {
      "subType": "deo",
      "type": "administrator"
    },
    "profileUserTypes": [
      {
        "subType": "deo",
        "type": "administrator"
      }
    ]
  }
}

No content

Read User V1

get

This API is used for searching a specific user, the user search is based on the unique ID of the user

  • The endpoint for Get User by User ID is /user/v1/read/{User_ID}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
  • User can pass an optional query parameter 'fields'. The value is a comma separated list of fields whose information is required in response. e.g. fields=completeness,missingFields,topic,organisations,roles
  • 'completeness' is to return profile completeness percentage.
  • 'missingFields' is to return fields that are missing to achieve 100% profile completeness.
  • 'topic' is to return list of topics that are used for announcements.
  • 'organisations' is to return organisation and location details.
  • 'roles' is to return list of roles with name and ID details.
Path parameters
userIdstringRequired

User-Id of the user

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It a unique token/key to authenticate the user each time an API is called. For corresponsing sessions, this token is exchanged, not the username/password of the user

Example: {{user_token}}
Responses
200
OK ! Successful operation."Get User by User ID" operation was successfully executed.
application/json
get
GET /api/user/v1/read/{userId} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*
{
  "id": "api.user.read",
  "ver": "v1",
  "ts": "2020-11-23 13:21:57:692+0000",
  "params": {
    "resmsgid": null,
    "msgid": "af801330-0dcb-42c6-b76b-cedaa6212118",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "webPages": [],
      "tcStatus": null,
      "maskedPhone": null,
      "rootOrgName": "org3",
      "subject": [],
      "channel": "channel1",
      "language": [],
      "updatedDate": null,
      "managedBy": null,
      "flagsValue": 2,
      "id": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "recoveryEmail": "",
      "identifier": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "thumbnail": null,
      "updatedBy": null,
      "accesscode": null,
      "locationIds": [],
      "registryId": null,
      "rootOrgId": 126796199493140480,
      "prevUsedEmail": "",
      "firstname": "first name",
      "tncAcceptedOn": null,
      "allTncAccepted": {},
      "phone": "",
      "dob": null,
      "grade": [],
      "currentLoginTime": null,
      "userType": "TEACHER",
      "userSubType": null,
      "status": 1,
      "lastname": "last name",
      "tncLatestVersion": "v8",
      "gender": null,
      "roles": [
        "PUBLIC"
      ],
      "prevUsedPhone": "",
      "stateValidated": false,
      "isDeleted": false,
      "organisations": [
        {
          "updatedBy": null,
          "organisationId": 126796199493140480,
          "orgName": "org3",
          "addedByName": null,
          "addedBy": null,
          "roles": [
            "PUBLIC"
          ],
          "approvedBy": null,
          "isSelfDeclared": true,
          "updatedDate": null,
          "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "approvaldate": null,
          "associationtype": 2,
          "isSystemUpload": false,
          "isDeleted": false,
          "hashTagId": 126796199493140480,
          "isSSO": false,
          "isRejected": null,
          "position": null,
          "id": 131573015167221760,
          "orgjoindate": "2020-11-23 07:02:43:194+0000",
          "isApproved": null,
          "orgLeftDate": null
        }
      ],
      "provider": null,
      "countryCode": null,
      "tncLatestVersionUrl": "https://organisation.blob.core.windows.net/termsandcond/terms-and-conditions-v8.html",
      "maskedEmail": "se*************@yopmail.com",
      "tempPassword": null,
      "email": "se*************@yopmail.com",
      "rootOrg": {
        "dateTime": null,
        "preferredLanguage": null,
        "keys": {
          "encKeys": [
            456
          ],
          "signKeys": [
            456
          ]
        },
        "channel": "channel1",
        "approvedBy": null,
        "description": "org3",
        "updatedDate": "2020-08-28 10:12:01:096+0000",
        "addressId": null,
        "orgType": null,
        "provider": null,
        "orgCode": null,
        "locationId": null,
        "theme": null,
        "id": 126796199493140480,
        "isApproved": null,
        "communityId": null,
        "slug": "channel1",
        "email": null,
        "isSSOEnabled": null,
        "thumbnail": null,
        "updatedBy": null,
        "orgName": "org3",
        "locationIds": [
          "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
          "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
        ],
        "externalId": null,
        "isRootOrg": true,
        "rootOrgId": 126796199493140480,
        "imgUrl": null,
        "approvedDate": null,
        "orgTypeId": null,
        "homeUrl": null,
        "isDefault": true,
        "createdDate": "2019-01-18 09:48:13:428+0000",
        "contactDetail": null,
        "parentOrgId": null,
        "createdBy": "system",
        "hashTagId": 126796199493140480,
        "noOfMembers": null,
        "status": 1
      },
      "profileSummary": null,
      "phoneVerified": false,
      "tcUpdatedDate": null,
      "recoveryPhone": "",
      "avatar": null,
      "userName": "username1",
      "promptTnC": true,
      "lastLoginTime": null,
      "emailVerified": true,
      "framework": {},
      "createdDate": "2020-11-23 07:02:36:155+0000",
      "createdBy": null,
      "location": null,
      "tncAcceptedVersion": null
    }
  }
}

Read User V2

get

This API is used for searching a specific user, the user search is based on the unique ID of the user

  • The endpoint for Get User by User ID v2 is /user/v2/read/{User_ID}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
  • User can pass an optional query parameter 'fields'. The value is a comma separated list of fields whose information is required in response. e.g. fields=completeness,missingFields,topic,organisations,roles
  • 'completeness' is to return profile completeness percentage.
  • 'missingFields' is to return fields that are missing to achieve 100% profile completeness.
  • 'topic' is to return list of topics that are used for announcements.
  • 'organisations' is to return organisation and location details.
  • 'roles' is to return list of roles with name and ID details.
  • Only necessary fields are returned in the response as per user profile configuration.
Path parameters
userIdstringRequired

Please append a valid User Id To the Request URI and if user need any specific values like , profile completeness ,missingFields,topic Ex: ?Fields=completeness,missingFields,topic

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

Access token of registered user performing given API request.

Example: {{user_token}}
Responses
200
OK ! Successful operation."Get User by User ID v2" operation was successfully executed.
application/json
get
GET /api/user/v2/read/{userId} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*
{
  "id": "api.user.read",
  "ver": "v1",
  "ts": "2020-11-23 13:21:57:692+0000",
  "params": {
    "resmsgid": null,
    "msgid": "af801330-0dcb-42c6-b76b-cedaa6212118",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "webPages": [],
      "tcStatus": null,
      "maskedPhone": null,
      "rootOrgName": "org3",
      "subject": [],
      "channel": "channel1",
      "language": [],
      "updatedDate": null,
      "managedBy": null,
      "flagsValue": 2,
      "id": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "recoveryEmail": "",
      "identifier": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "thumbnail": null,
      "updatedBy": null,
      "accesscode": null,
      "locationIds": [],
      "registryId": null,
      "rootOrgId": 126796199493140480,
      "prevUsedEmail": "",
      "firstname": "first name",
      "tncAcceptedOn": null,
      "allTncAccepted": {},
      "phone": "",
      "dob": null,
      "grade": [],
      "currentLoginTime": null,
      "userType": "TEACHER",
      "userSubType": null,
      "status": 1,
      "lastname": "last name",
      "tncLatestVersion": "v8",
      "gender": null,
      "roles": [
        "PUBLIC"
      ],
      "prevUsedPhone": "",
      "stateValidated": false,
      "isDeleted": false,
      "organisations": [
        {
          "updatedBy": null,
          "organisationId": 126796199493140480,
          "orgName": "org3",
          "addedByName": null,
          "addedBy": null,
          "roles": [
            "PUBLIC"
          ],
          "approvedBy": null,
          "updatedDate": null,
          "isSelfDeclared": true,
          "associationtype": 2,
          "isSystemUpload": false,
          "isSSO": false,
          "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "approvaldate": null,
          "isDeleted": false,
          "hashTagId": 126796199493140480,
          "isRejected": null,
          "position": null,
          "id": 131573015167221760,
          "orgjoindate": "2020-11-23 07:02:43:194+0000",
          "isApproved": null,
          "orgLeftDate": null
        }
      ],
      "provider": null,
      "countryCode": null,
      "tncLatestVersionUrl": "https://organisation.blob.core.windows.net/termsandcond/terms-and-conditions-v8.html",
      "maskedEmail": "se*************@yopmail.com",
      "tempPassword": null,
      "email": "se*************@yopmail.com",
      "rootOrg": {
        "dateTime": null,
        "preferredLanguage": null,
        "keys": {
          "encKeys": [
            456
          ],
          "signKeys": [
            456
          ]
        },
        "channel": "channel1",
        "approvedBy": null,
        "description": "org3",
        "updatedDate": "2020-08-28 10:12:01:096+0000",
        "addressId": null,
        "orgType": null,
        "provider": null,
        "orgCode": null,
        "locationId": null,
        "theme": null,
        "id": 126796199493140480,
        "isApproved": null,
        "communityId": null,
        "slug": "channel1",
        "email": null,
        "isSSOEnabled": null,
        "thumbnail": null,
        "updatedBy": null,
        "orgName": "org3",
        "locationIds": [
          "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
          "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
        ],
        "externalId": null,
        "isRootOrg": true,
        "rootOrgId": 126796199493140480,
        "imgUrl": null,
        "approvedDate": null,
        "orgTypeId": null,
        "homeUrl": null,
        "isDefault": true,
        "createdDate": "2019-01-18 09:48:13:428+0000",
        "contactDetail": null,
        "parentOrgId": null,
        "createdBy": "system",
        "hashTagId": 126796199493140480,
        "noOfMembers": null,
        "status": 1
      },
      "profileSummary": null,
      "phoneVerified": false,
      "tcUpdatedDate": null,
      "recoveryPhone": "",
      "avatar": null,
      "userName": "username1",
      "promptTnC": true,
      "lastLoginTime": null,
      "emailVerified": true,
      "framework": {},
      "createdDate": "2020-11-23 07:02:36:155+0000",
      "createdBy": null,
      "location": null,
      "tncAcceptedVersion": null
    }
  }
}

Read User V3

get

This API is used for reading a specific user, the user read is based on the unique ID of the user

  • The endpoint for Get User by User ID v3 is /user/v3/read/{User_ID}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
  • User can pass an optional query parameter 'fields'. The value is a comma separated list of fields whose information is required in response. e.g. fields=completeness,missingFields,topic,organisations,roles,tokens
  • 'completeness' is to return profile completeness percentage.
  • 'missingFields' is to return fields that are missing to achieve 100% profile completeness.
  • 'topic' is to return list of topics that are used for announcements.
  • 'organisations' is to return organisation and location details.
  • 'roles' is to return list of roles with name and ID details.
  • MUA user detail can be retreived with their token details
Path parameters
userIdstringRequired

Please append a valid User Id To the Request URI and if user need any specific values like , profile completeness ,missingFields,topic Ex: ?Fields=completeness,missingFields,topic

Query parameters
withTokensbooleanOptional
  • When withTokens attribute is passed MUA user tokens will passsed in the response
Example: true
fieldsstringRequired
  • User can pass an optional query parameter 'fields'. The value is a comma separated list of fields whose information is required in response. e.g. fields=completeness,missingFields,topic,organisations,roles
Example: organisations,roles,locations,declarations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

Access token of registered user performing given API request.

Example: {{user_token}}
Responses
200
OK ! Successful operation."Get User by User ID v3" operation was successfully executed.
application/json
get
GET /api/user/v3/read/{userId} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*
{
  "id": "api.user.read",
  "ver": "v3",
  "ts": "2020-11-24 09:13:00:959+0000",
  "params": {
    "resmsgid": null,
    "msgid": "26012a3e-59f1-40af-b96e-5bc808f5f2ab",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "webPages": [],
      "tcStatus": null,
      "maskedPhone": null,
      "rootOrgName": "org3",
      "subject": [],
      "channel": "channel1",
      "language": [],
      "updatedDate": "2020-11-23 17:47:49:640+0000",
      "managedBy": null,
      "flagsValue": 2,
      "id": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "recoveryEmail": "",
      "identifier": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "thumbnail": null,
      "updatedBy": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "accesscode": null,
      "registryId": null,
      "roleList": [
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        },
        {
          "name": "Content Curation",
          "id": "CONTENT_CURATION"
        },
        {
          "name": "Content Creator",
          "id": "CONTENT_CREATOR"
        },
        {
          "name": "Official TextBook Badge Issuer",
          "id": "OFFICIAL_TEXTBOOK_BADGE_ISSUER"
        },
        {
          "name": "Admin",
          "id": "ADMIN"
        },
        {
          "name": "Course Mentor",
          "id": "COURSE_MENTOR"
        },
        {
          "name": "Org Admin",
          "id": "ORG_ADMIN"
        },
        {
          "name": "Content Review",
          "id": "CONTENT_REVIEW"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER"
        },
        {
          "name": "Announcement Sender",
          "id": "ANNOUNCEMENT_SENDER"
        },
        {
          "name": "System Administration",
          "id": "SYSTEM_ADMINISTRATION"
        },
        {
          "name": "Book Creator",
          "id": "BOOK_CREATOR"
        },
        {
          "name": "Course Creator",
          "id": "COURSE_CREATOR"
        },
        {
          "name": "Report Viewer",
          "id": "REPORT_VIEWER"
        },
        {
          "name": "Flag Reviewer",
          "id": "FLAG_REVIEWER "
        },
        {
          "name": "Membership Management",
          "id": "MEMBERSHIP_MANAGEMENT"
        },
        {
          "name": "Content Creation",
          "id": "CONTENT_CREATION"
        },
        {
          "name": "Book Reviewer",
          "id": "BOOK_REVIEWER"
        },
        {
          "name": "Teacher Badge Issuer",
          "id": "TEACHER_BADGE_ISSUER"
        },
        {
          "name": "Org Management",
          "id": "ORG_MANAGEMENT"
        },
        {
          "name": "Course Admin",
          "id": "COURSE_ADMIN"
        },
        {
          "name": "Org Moderator",
          "id": "ORG_MODERATOR"
        },
        {
          "name": "Public",
          "id": "PUBLIC"
        },
        {
          "name": "Content Reviewer",
          "id": "CONTENT_REVIEWER"
        },
        {
          "name": "Report Admin",
          "id": "REPORT_ADMIN"
        }
      ],
      "rootOrgId": 126796199493140480,
      "prevUsedEmail": "",
      "firstname": "first name",
      "tncAcceptedOn": "2020-11-23T17:47:05.019Z",
      "allTncAccepted": {},
      "phone": "",
      "dob": null,
      "grade": [],
      "currentLoginTime": null,
      "userType": "TEACHER",
      "userSubType": null,
      "status": 1,
      "lastname": "last name",
      "tncLatestVersion": "v8",
      "gender": null,
      "roles": [
        "PUBLIC"
      ],
      "prevUsedPhone": "",
      "stateValidated": false,
      "isDeleted": false,
      "organisations": [
        {
          "updatedBy": null,
          "organisationId": 126796199493140480,
          "orgName": "org3",
          "addedByName": null,
          "addedBy": null,
          "roles": [
            "PUBLIC"
          ],
          "approvedBy": null,
          "channel": "channel1",
          "locationIds": [
            "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
            "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
          ],
          "updatedDate": null,
          "isSelfDeclared": true,
          "associationtype": 2,
          "isSystemUpload": false,
          "isSSO": false,
          "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "approvaldate": null,
          "isDeleted": false,
          "hashTagId": 126796199493140480,
          "isRejected": null,
          "locations": [
            {
              "code": 29,
              "name": "state1",
              "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
              "type": "state",
              "parentId": null
            },
            {
              "code": 2901,
              "name": "district1",
              "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141",
              "type": "district",
              "parentId": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
            }
          ],
          "position": null,
          "id": 131573015167221760,
          "orgjoindate": "2020-11-23 07:02:43:194+0000",
          "isApproved": null,
          "orgLeftDate": null
        }
      ],
      "provider": null,
      "countryCode": null,
      "tncLatestVersionUrl": "https://organisation.blob.core.windows.net/termsandcond/terms-and-conditions-v8.html",
      "maskedEmail": "se*************@yopmail.com",
      "tempPassword": null,
      "email": "se*************@yopmail.com",
      "rootOrg": {
        "dateTime": null,
        "preferredLanguage": null,
        "keys": {
          "encKeys": [
            456
          ],
          "signKeys": [
            456
          ]
        },
        "channel": "channel1",
        "approvedBy": null,
        "description": "org3",
        "updatedDate": "2020-08-28 10:12:01:096+0000",
        "addressId": null,
        "orgType": null,
        "provider": null,
        "orgCode": null,
        "locationId": null,
        "theme": null,
        "id": 126796199493140480,
        "isApproved": null,
        "communityId": null,
        "slug": "channel1",
        "email": null,
        "isSSOEnabled": null,
        "thumbnail": null,
        "updatedBy": null,
        "orgName": "org3",
        "locationIds": [
          "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
          "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
        ],
        "externalId": null,
        "isRootOrg": true,
        "rootOrgId": 126796199493140480,
        "imgUrl": null,
        "approvedDate": null,
        "orgTypeId": null,
        "homeUrl": null,
        "isDefault": true,
        "createdDate": "2019-01-18 09:48:13:428+0000",
        "contactDetail": null,
        "parentOrgId": null,
        "createdBy": "system",
        "hashTagId": 126796199493140480,
        "noOfMembers": null,
        "status": 1
      },
      "profileSummary": null,
      "phoneVerified": false,
      "tcUpdatedDate": null,
      "userLocations": [
        {
          "code": 2823,
          "name": "CHITTOOR",
          "id": "b5c35cfc-6c1e-4266-94ef-a425c43c7f4e",
          "type": "district",
          "parentId": "bc75cc99-9205-463e-a722-5326857838f8"
        },
        {
          "code": 28,
          "name": "Andhra Pradesh",
          "id": "bc75cc99-9205-463e-a722-5326857838f8",
          "type": "state",
          "parentId": null
        }
      ],
      "recoveryPhone": "",
      "avatar": null,
      "userName": "username1",
      "promptTnC": false,
      "lastLoginTime": 0,
      "emailVerified": true,
      "framework": {
        "gradeLevel": [
          "Class 1"
        ],
        "subject": [
          "English"
        ],
        "id": [
          "ekstep_ncert_k-12"
        ],
        "medium": [
          "English"
        ],
        "board": [
          "CBSE"
        ]
      },
      "createdDate": "2020-11-23 07:02:36:155+0000",
      "createdBy": null,
      "location": null,
      "tncAcceptedVersion": "v8"
    }
  }
}

Read User V4

get

This API is used for searching a specific user, the user search is based on the unique ID of the user

  • The endpoint for Get User by User ID is /user/v4/read/{User_ID}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
  • User can pass an optional query parameter 'fields'. The value is a comma separated list of fields whose information is required in response. e.g. fields=completeness,missingFields,topic,organisations,roles,locations
  • 'completeness' is to return profile completeness percentage.
  • 'missingFields' is to return fields that are missing to achieve 100% profile completeness.
  • 'topic' is to return list of topics that are used for announcements.
  • 'organisations' is to return organisation and location details.
  • 'roles' is to return list of roles with name and ID details.
  • 'locations' is to return profileLocation
Path parameters
userIdstringRequired

User-Id of the user

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It a unique token/key to authenticate the user each time an API is called. For corresponsing sessions, this token is exchanged, not the username/password of the user

Example: {{user_token}}
Responses
200
OK ! Successful operation."Get User by User ID V4" operation was successfully executed.
application/json
get
GET /api/user/v4/read/{userId} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*
{
  "id": "api.user.read",
  "ver": "v4",
  "ts": "2021-04-09 21:09:05:331+0530",
  "params": {
    "resmsgid": null,
    "msgid": "a1d3d756-0f9b-4ec6-95a6-6560896d5294",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "maskedPhone": null,
      "tcStatus": null,
      "channel": "channel1",
      "updatedDate": "2021-04-07 05:09:45:607+0000",
      "managedBy": null,
      "flagsValue": 2,
      "id": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "recoveryEmail": "co**************@yopmail.com",
      "identifier": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "externalIds": [],
      "rootOrgId": 126796199493140480,
      "prevUsedEmail": null,
      "firstname": "first name",
      "tncAcceptedOn": 1617265216047,
      "allTncAccepted": {},
      "phone": null,
      "dob": null,
      "userType": "student",
      "status": 1,
      "lastName": null,
      "tncLatestVersion": "3.5.0",
      "roles": "PUBLIC",
      "prevUsedPhone": null,
      "stateValidated": false,
      "isDeleted": false,
      "organisations": [
        {
          "organisationId": 126796199493140480,
          "updatedBy": null,
          "orgName": "org1",
          "addedByName": null,
          "addedBy": null,
          "roles": "PUBLIC",
          "approvedBy": null,
          "channel": "channel1",
          "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
          "orgLocation": [
            {
              "type": "state",
              "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
            },
            {
              "type": "district",
              "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
            }
          ],
          "externalId": 101010,
          "updatedDate": null,
          "isSelfDeclared": true,
          "associationtype": 2,
          "isSystemUpload": false,
          "isSSO": false,
          "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "approvaldate": null,
          "isSchool": false,
          "isDeleted": false,
          "hashTagId": 126796199493140480,
          "isRejected": null,
          "locations": [
            {
              "code": 29,
              "name": "state1",
              "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
              "type": "state",
              "parentId": null
            },
            {
              "code": 2901,
              "name": "district1",
              "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141",
              "type": "district",
              "parentId": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
            }
          ],
          "id": 1324864401294131200,
          "position": null,
          "isApproved": null,
          "orgjoindate": "2021-04-01 08:19:53:343+0000",
          "orgLeftDate": null
        },
        {
          "organisationId": 127419693630996480000,
          "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "orgName": "org2",
          "addedByName": null,
          "addedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "roles": [],
          "approvedBy": null,
          "channel": "tn",
          "locationIds": "91d9baae-14f1-477a-955c-f91bd9037f0b 107c9472-a950-4768-bcd6-f882910177c4 ba31e7c2-fac9-472a-8867-1582c73bcca8 5c8876b5-981c-4c6a-b23d-20c9e17428e1",
          "orgLocation": [
            {
              "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
              "type": "state"
            },
            {
              "id": "107c9472-a950-4768-bcd6-f882910177c4",
              "type": "district"
            },
            {
              "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
              "type": "block"
            },
            {
              "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "type": "cluster"
            }
          ],
          "externalId": 33100800608,
          "updatedDate": "2021-04-07 05:09:38:366+0000",
          "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "approvaldate": null,
          "isSchool": true,
          "isDeleted": false,
          "hashTagId": 127419693630996480000,
          "isRejected": false,
          "locations": [
            {
              "code": 31,
              "name": "state2",
              "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
              "type": "state",
              "parentId": null
            },
            {
              "code": 3110,
              "name": "district2",
              "id": "107c9472-a950-4768-bcd6-f882910177c4",
              "type": "district",
              "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
            },
            {
              "code": 31100169,
              "name": "block1",
              "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
              "type": "block",
              "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
            },
            {
              "code": 3110016901,
              "name": "block1 Cluster",
              "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "type": "cluster",
              "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
            }
          ],
          "id": 132527931586969600,
          "position": null,
          "isApproved": false,
          "orgjoindate": "2021-04-07 05:09:45:655+0000",
          "orgLeftDate": "2021-04-07 05:09:38:366+0000"
        }
      ],
      "provider": null,
      "countryCode": null,
      "tncLatestVersionUrl": "https://organisation2.blob.core.windows.net/termsandcondtions/terms-and-conditions-v9.html#termsOfUse",
      "maskedEmail": "k1**@yopmail.com",
      "email": "k1**@yopmail.com",
      "rootOrg": {
        "dateTime": null,
        "preferredLanguage": null,
        "keys": null,
        "approvedBy": null,
        "channel": "channel1",
        "description": "org3",
        "updatedDate": "2021-03-31 17:31:19:346+0000",
        "addressId": null,
        "organisationType": 5,
        "orgType": null,
        "isTenant": true,
        "provider": null,
        "locationId": null,
        "orgCode": null,
        "theme": null,
        "id": 126796199493140480,
        "communityId": null,
        "isApproved": null,
        "email": null,
        "slug": "channel1",
        "isSSOEnabled": null,
        "orgName": "org1",
        "updatedBy": null,
        "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
        "externalId": 101010,
        "orgLocation": [
          {
            "type": "state",
            "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
          },
          {
            "type": "district",
            "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
          }
        ],
        "isRootOrg": true,
        "rootOrgId": 126796199493140480,
        "approvedDate": null,
        "imgUrl": null,
        "homeUrl": null,
        "orgTypeId": null,
        "isDefault": null,
        "createdDate": "2019-01-18 09:48:13:428+0000",
        "createdBy": "system",
        "parentOrgId": null,
        "hashTagId": 126796199493140480,
        "noOfMembers": null,
        "status": 1
      },
      "phoneVerified": false,
      "tcUpdatedDate": null,
      "userLocations": [
        {
          "code": 3110,
          "name": "district2",
          "id": "107c9472-a950-4768-bcd6-f882910177c4",
          "type": "district",
          "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
        },
        {
          "code": 3110016901,
          "name": "block1 Cluster",
          "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
          "type": "cluster",
          "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
        },
        {
          "code": 31,
          "name": "state2",
          "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
          "type": "state",
          "parentId": null
        },
        {
          "code": 31100169,
          "name": "block1",
          "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
          "type": "block",
          "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
        },
        {
          "identifier": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
          "code": 31100800608,
          "name": "org2",
          "id": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
          "type": "school",
          "parentId": "5c8876b5-981c-4c6a-b23d-20c9e17428e1"
        }
      ],
      "recoveryPhone": null,
      "userName": "username 2",
      "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "userSubType": null,
      "promptTnC": false,
      "emailVerified": true,
      "createdDate": "2021-04-01 08:19:50:971+0000",
      "framework": {
        "board": "State state3",
        "gradeLevel": "Class 1",
        "id": "ap_k-12_1",
        "medium": "English",
        "subject": "English"
      },
      "createdBy": null,
      "profileUserType": {
        "subType": null,
        "type": "student"
      },
      "profileUserTypes": [
        {
          "subType": null,
          "type": "student"
        }
      ],
      "tncAcceptedVersion": "3.5.0"
    }
  }
}

Read User V5

get

This API is used for searching a specific user, the user search is based on the unique ID of the user

  • The endpoint for Get User by User ID is /user/v5/read/{User_ID}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
  • User can pass an optional query parameter 'fields'. The value is a comma separated list of fields whose information is required in response. e.g. fields=completeness,missingFields,topic,organisations,roles,locations
  • 'completeness' is to return profile completeness percentage.
  • 'missingFields' is to return fields that are missing to achieve 100% profile completeness.
  • 'topic' is to return list of topics that are used for announcements.
  • 'organisations' is to return organisation and location details.
  • 'roles' is to return list of roles with name and ID details.
  • 'locations' is to return profileLocation
Path parameters
userIdstringRequired

User-Id of the user

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It a unique token/key to authenticate the user each time an API is called. For corresponsing sessions, this token is exchanged, not the username/password of the user

Example: {{user_token}}
Responses
200
OK ! Successful operation."Get User by User ID V4" operation was successfully executed.
application/json
get
GET /api/user/v5/read/{userId} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*
{
  "id": "api.user.read",
  "ver": "v4",
  "ts": "2021-04-09 21:09:05:331+0530",
  "params": {
    "resmsgid": null,
    "msgid": "a1d3d756-0f9b-4ec6-95a6-6560896d5294",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "maskedPhone": null,
      "tcStatus": null,
      "channel": "channel1",
      "updatedDate": "2021-04-07 05:09:45:607+0000",
      "managedBy": null,
      "flagsValue": 2,
      "id": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "recoveryEmail": "co**************@yopmail.com",
      "identifier": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "externalIds": [],
      "rootOrgId": 126796199493140480,
      "prevUsedEmail": null,
      "firstname": "first name",
      "tncAcceptedOn": 1617265216047,
      "allTncAccepted": {},
      "phone": null,
      "dob": null,
      "userType": "student",
      "status": 1,
      "lastName": null,
      "tncLatestVersion": "3.5.0",
      "roles": [
        {
          "role": "COURSE_CREATOR",
          "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "scope": [
            {
              "organisationId": 126796199493140480
            }
          ],
          "createdDate": "2021-06-07 11:29:41:606+0530",
          "updatedBy": null,
          "createdBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "updatedDate": null
        }
      ],
      "prevUsedPhone": null,
      "stateValidated": false,
      "isDeleted": false,
      "organisations": [
        {
          "organisationId": 126796199493140480,
          "updatedBy": null,
          "orgName": "org1",
          "addedByName": null,
          "addedBy": null,
          "approvedBy": null,
          "channel": "channel1",
          "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
          "orgLocation": [
            {
              "type": "state",
              "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
            },
            {
              "type": "district",
              "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
            }
          ],
          "externalId": 101010,
          "updatedDate": null,
          "isSelfDeclared": true,
          "associationtype": 2,
          "isSystemUpload": false,
          "isSSO": false,
          "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "approvaldate": null,
          "isSchool": false,
          "isDeleted": false,
          "hashTagId": 126796199493140480,
          "isRejected": null,
          "locations": [
            {
              "code": 29,
              "name": "state1",
              "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
              "type": "state",
              "parentId": null
            },
            {
              "code": 2901,
              "name": "district1",
              "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141",
              "type": "district",
              "parentId": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
            }
          ],
          "id": 1324864401294131200,
          "position": null,
          "isApproved": null,
          "orgjoindate": "2021-04-01 08:19:53:343+0000",
          "orgLeftDate": null
        },
        {
          "organisationId": 127419693630996480000,
          "updatedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "orgName": "org2",
          "addedByName": null,
          "addedBy": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "approvedBy": null,
          "channel": "tn",
          "locationIds": "91d9baae-14f1-477a-955c-f91bd9037f0b 107c9472-a950-4768-bcd6-f882910177c4 ba31e7c2-fac9-472a-8867-1582c73bcca8 5c8876b5-981c-4c6a-b23d-20c9e17428e1",
          "orgLocation": [
            {
              "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
              "type": "state"
            },
            {
              "id": "107c9472-a950-4768-bcd6-f882910177c4",
              "type": "district"
            },
            {
              "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
              "type": "block"
            },
            {
              "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "type": "cluster"
            }
          ],
          "externalId": 33100800608,
          "updatedDate": "2021-04-07 05:09:38:366+0000",
          "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
          "approvaldate": null,
          "isSchool": true,
          "isDeleted": false,
          "hashTagId": 127419693630996480000,
          "isRejected": false,
          "locations": [
            {
              "code": 31,
              "name": "state2",
              "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
              "type": "state",
              "parentId": null
            },
            {
              "code": 3110,
              "name": "district2",
              "id": "107c9472-a950-4768-bcd6-f882910177c4",
              "type": "district",
              "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
            },
            {
              "code": 31100169,
              "name": "block1",
              "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
              "type": "block",
              "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
            },
            {
              "code": 3110016901,
              "name": "block1 Cluster",
              "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
              "type": "cluster",
              "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
            }
          ],
          "id": 132527931586969600,
          "position": null,
          "isApproved": false,
          "orgjoindate": "2021-04-07 05:09:45:655+0000",
          "orgLeftDate": "2021-04-07 05:09:38:366+0000"
        }
      ],
      "provider": null,
      "countryCode": null,
      "tncLatestVersionUrl": "https://organisation2.blob.core.windows.net/termsandcondtions/terms-and-conditions-v9.html#termsOfUse",
      "maskedEmail": "k1**@yopmail.com",
      "email": "k1**@yopmail.com",
      "rootOrg": {
        "dateTime": null,
        "preferredLanguage": null,
        "keys": null,
        "approvedBy": null,
        "channel": "channel1",
        "description": "org3",
        "updatedDate": "2021-03-31 17:31:19:346+0000",
        "addressId": null,
        "organisationType": 5,
        "orgType": null,
        "isTenant": true,
        "provider": null,
        "locationId": null,
        "orgCode": null,
        "theme": null,
        "id": 126796199493140480,
        "communityId": null,
        "isApproved": null,
        "email": null,
        "slug": "channel1",
        "isSSOEnabled": null,
        "orgName": "org1",
        "updatedBy": null,
        "locationIds": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf 8250d58d-f1a2-4397-bfd3-b2e688ba7141",
        "externalId": 101010,
        "orgLocation": [
          {
            "type": "state",
            "id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
          },
          {
            "type": "district",
            "id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
          }
        ],
        "isRootOrg": true,
        "rootOrgId": 126796199493140480,
        "approvedDate": null,
        "imgUrl": null,
        "homeUrl": null,
        "orgTypeId": null,
        "isDefault": null,
        "createdDate": "2019-01-18 09:48:13:428+0000",
        "createdBy": "system",
        "parentOrgId": null,
        "hashTagId": 126796199493140480,
        "noOfMembers": null,
        "status": 1
      },
      "phoneVerified": false,
      "tcUpdatedDate": null,
      "userLocations": [
        {
          "code": 3110,
          "name": "district2",
          "id": "107c9472-a950-4768-bcd6-f882910177c4",
          "type": "district",
          "parentId": "91d9baae-14f1-477a-955c-f91bd9037f0b"
        },
        {
          "code": 3110016901,
          "name": "block1 Cluster",
          "id": "5c8876b5-981c-4c6a-b23d-20c9e17428e1",
          "type": "cluster",
          "parentId": "ba31e7c2-fac9-472a-8867-1582c73bcca8"
        },
        {
          "code": 31,
          "name": "state2",
          "id": "91d9baae-14f1-477a-955c-f91bd9037f0b",
          "type": "state",
          "parentId": null
        },
        {
          "code": 31100169,
          "name": "block1",
          "id": "ba31e7c2-fac9-472a-8867-1582c73bcca8",
          "type": "block",
          "parentId": "107c9472-a950-4768-bcd6-f882910177c4"
        },
        {
          "identifier": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
          "code": 31100800608,
          "name": "org2",
          "id": "2e4a420e-a6b8-4688-b12e-0e5f5141d175",
          "type": "school",
          "parentId": "5c8876b5-981c-4c6a-b23d-20c9e17428e1"
        }
      ],
      "recoveryPhone": null,
      "userName": "username 2",
      "userId": "96102c3f-2c22-4614-8dcc-6b130cefe586",
      "userSubType": null,
      "promptTnC": false,
      "emailVerified": true,
      "createdDate": "2021-04-01 08:19:50:971+0000",
      "framework": {
        "board": "State state3",
        "gradeLevel": "Class 1",
        "id": "ap_k-12_1",
        "medium": "English",
        "subject": "English"
      },
      "createdBy": null,
      "profileUserType": {
        "subType": null,
        "type": "student"
      },
      "profileUserTypes": [
        {
          "subType": null,
          "type": "student"
        }
      ],
      "tncAcceptedVersion": "3.5.0"
    }
  }
}

Get User by ID Type

get

This API is used for searching a specific user, the user search is based on the unique ID type of the user

  • The endpoint for Get User by User ID is /user/v1/get/{idType}/{id}
Path parameters
idTypestringRequired

idType can only be either email, phone or loginId

idstringRequired

id can only be values of email, phone or loginId

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

It is a unique token/key to authenticate the user each time an API is called.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called.

Responses
200
OK ! Successful operation."Get User by ID Type" operation was successfully executed.
application/json
get
GET /api/user/v1/get/{idType}/{id} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: text
Accept: */*
{
  "id": "api.user.get.userName",
  "ver": "v1",
  "ts": "2020-11-23 16:31:29:317+0000",
  "params": {
    "resmsgid": null,
    "msgid": "76a967d4-74ac-4478-b3ed-e917c3ce3ee8",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "webPages": [],
      "tcStatus": null,
      "maskedPhone": null,
      "rootOrgName": "org3",
      "subject": [],
      "channel": "channel1",
      "language": [],
      "updatedDate": null,
      "managedBy": null,
      "flagsValue": 2,
      "id": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "recoveryEmail": "",
      "identifier": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
      "thumbnail": null,
      "updatedBy": null,
      "accesscode": null,
      "locationIds": [],
      "registryId": null,
      "rootOrgId": 126796199493140480,
      "prevUsedEmail": "",
      "firstname": "first name",
      "tncAcceptedOn": null,
      "allTncAccepted": {},
      "phone": "",
      "dob": null,
      "grade": [],
      "currentLoginTime": null,
      "userType": "TEACHER",
      "userSubType": null,
      "status": 1,
      "lastname": "last name",
      "tncLatestVersion": "v8",
      "gender": null,
      "roles": [
        "PUBLIC"
      ],
      "prevUsedPhone": "",
      "stateValidated": false,
      "isDeleted": false,
      "organisations": [
        {
          "updatedBy": null,
          "organisationId": 126796199493140480,
          "orgName": "org3",
          "addedByName": null,
          "addedBy": null,
          "roles": [
            "PUBLIC"
          ],
          "approvedBy": null,
          "updatedDate": null,
          "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "approvaldate": null,
          "isDeleted": false,
          "hashTagId": 126796199493140480,
          "isRejected": null,
          "position": null,
          "id": 131573015167221760,
          "orgjoindate": "2020-11-23 07:02:43:194+0000",
          "isApproved": null,
          "orgLeftDate": null
        }
      ],
      "provider": null,
      "countryCode": null,
      "tncLatestVersionUrl": "https://organisation.blob.core.windows.net/termsandcond/terms-and-conditions-v8.html",
      "maskedEmail": "se*************@yopmail.com",
      "tempPassword": null,
      "email": "se*************@yopmail.com",
      "rootOrg": {
        "identifier": 126796199493140480,
        "orgName": "org3",
        "keys": {
          "signKeys": [
            456
          ],
          "encKeys": [
            456
          ]
        },
        "channel": "channel1",
        "locationIds": [
          "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
          "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
        ],
        "description": "org3",
        "isRootOrg": true,
        "updatedDate": "2020-08-28 10:12:01:096+0000",
        "rootOrgId": 126796199493140480,
        "isDefault": true,
        "createdDate": "2019-01-18 09:48:13:428+0000",
        "createdBy": "system",
        "hashTagId": 126796199493140480,
        "id": 126796199493140480,
        "slug": "channel1",
        "status": 1
      },
      "profileSummary": null,
      "phoneVerified": false,
      "tcUpdatedDate": null,
      "recoveryPhone": "",
      "avatar": null,
      "userName": "username1",
      "promptTnC": true,
      "lastLoginTime": null,
      "emailVerified": true,
      "framework": {},
      "createdDate": "2020-11-23 07:02:36:155+0000",
      "createdBy": null,
      "location": null,
      "tncAcceptedVersion": null
    }
  }
}

Check User Exists by ID Type V2

get

This API is used for searching a specific user, the user search is based on the unique ID type of the user

  • The endpoint for Get User by User ID is /user/v2/exists/{idType}/{id}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Path parameters
idTypestringRequired

idType can only be either email, phone or userName

idstringRequired

id can only be values of email, phone or userName

Query parameters
appstringOptional

Captha validation for APP is based on this value, for app this field is mandatory

captchaResponsestringRequired

Captcha is sent with the request, it is validated and then response is shared

Example: someInvalidCaptcha
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called.

Example: {{user_token}}
Responses
200
OK ! Successful operation."Get User by ID Type" operation was successfully executed.
get
GET /api/user/v2/exists/{idType}/{id} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*

No content

Check User Exists by ID Type

get

This API is used for searching a specific user, the user search is based on the unique ID type of the user

  • The endpoint for Get User by User ID is /user/v1/exists/{idType}/{id}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Path parameters
idTypestringRequired

idType can only be either email, or phone

idstringRequired

id can only be values of email or phone

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called.

Example: {{user_token}}
Responses
200
OK ! Successful operation."will return true or false on the basis of user existence in system" operation was successfully executed.
application/json
get
GET /api/user/v1/exists/{idType}/{id} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*
{
  "id": "api.user.exists.userName",
  "ver": "v1",
  "ts": "2020-11-27 17:26:43:814+0000",
  "params": {
    "resmsgid": null,
    "msgid": "9b739351ebcbe7923209d0fc2e48bb68",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "exists": true
  }
}

Block user

post

This API is used to block a user

  • The endpoint for Block User is /user/v1/block
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponsing sessions, this token is exchanged, not the username/password of the user

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Blocking user" operation was successfully executed.
application/json
post
POST /api/user/v1/block HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 61

{
  "request": {
    "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92"
  }
}
{
  "id": "api.user.block",
  "ver": "v1",
  "ts": "2020-11-29 08:03:21:697+0000",
  "params": {
    "resmsgid": null,
    "msgid": "1fdc83eb2321b513bab2c96726b194f5",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Unblock user

post

This API is used to unblock a user

  • The endpoint for Unblock user is /user/v1/unblock
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For further sessions this token is exchanged, not the username/password of the user

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation."Unblocking User" operation was successfully executed.
application/json
post
POST /api/user/v1/unblock HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "request": {
    "userId": ""
  }
}
{
  "id": "api.user.unblock",
  "ver": "v1",
  "ts": "2020-11-29 08:05:08:744+0000",
  "params": {
    "resmsgid": null,
    "msgid": "bb11b7ccc7d37ae2c2502912406543a7",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Get User by Login ID

post

This API is used for getting information about the currently authenticated user

  • The endpoint for Get User by Login ID is /user/v1/profile/read
Query parameters
fieldsstringOptional

'User can pass an optional query parameter 'fields'. The value is a comma separated list of fields whose information is required in response. e.g. fields=completeness,missingFields,topic,organisations,roles'

Example: roles
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
Body
Responses
200
OK ! Successful operation. The requested operation was successfully executed.
post
POST /api/user/v1/profile/read HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "request": {
    "loginId": "username1"
  }
}

No content

Get Managed Users Details

get

This api will get the MUA details with token details.

Path parameters
userIdstringRequired
  • User-Id of the managedby user.
Query parameters
withTokensbooleanOptional
  • When withTokens attribute is passed MUA user tokens will passsed in the response
Example: true
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token to authenticate the user each time an API is called

Example: {{user_token}}
Responses
200
OK ! Successful operation. The requested operation was successfully executed.
application/json
get
GET /api/user/v1/managed/{userId} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Accept: */*
{
  "id": "api.user.managed",
  "ver": "v1",
  "ts": "2020-11-24 04:57:12:732+0000",
  "params": {
    "resmsgid": null,
    "msgid": "8415ce74-7f6b-452f-99a5-79ba21ad6320",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "count": 1,
      "content": [
        {
          "identifier": "e8b67b42-52be-4f0b-a74e-d9435e0842fe",
          "rootOrgName": null,
          "phoneVerified": false,
          "roles": [
            "PUBLIC"
          ],
          "channel": "channel1",
          "locationIds": [
            "bc75cc99-9205-463e-a722-5326857838f8",
            "b5c35cfc-6c1e-4266-94ef-a425c43c7f4e"
          ],
          "stateValidated": false,
          "userName": "mua1_af93",
          "rootOrgId": 126796199493140480,
          "firstName": "MUA1",
          "emailVerified": false,
          "framework": {
            "gradeLevel": [
              "Class 1"
            ],
            "subject": [
              "English"
            ],
            "medium": [
              "English"
            ],
            "id": [
              "ekstep_ncert_k-12"
            ],
            "board": [
              "CBSE"
            ]
          },
          "createdDate": "2020-11-24 04:56:58:907+0000",
          "isDeleted": false,
          "organisations": [
            {
              "orgJoinDate": "2020-11-24 04:56:59:006+0000",
              "organisationId": 126796199493140480,
              "isDeleted": false,
              "hashTagId": 126796199493140480,
              "roles": [
                "PUBLIC"
              ],
              "id": 1315794795101388800,
              "userId": "e8b67b42-52be-4f0b-a74e-d9435e0842fe"
            }
          ],
          "managedBy": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "createdBy": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
          "phone": "",
          "countryCode": 91,
          "flagsValue": 0,
          "id": "e8b67b42-52be-4f0b-a74e-d9435e0842fe",
          "userType": "TEACHER",
          "userSubType": null,
          "email": "",
          "status": 1
        }
      ]
    }
  }
}

Update User Declarations

patch

Api will add or update custodian user self-declarations

Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token to authenticate the user each time an API is called

Example: {{user_token}}
Body
paramsobjectOptional
Responses
200
OK ! Successful operation. The requested operation was successfully executed.
application/json
patch
PATCH /api/user/v1/declarations HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 293

{
  "params": {},
  "request": {
    "declarations": [
      {
        "operation": "add",
        "userId": "ec8deeb2-4ded-4fa2-ac48-023ad8298d92",
        "orgId": 1297544481264435200,
        "persona": "teacher",
        "info": {
          "declared-school-name": "mgm21",
          "declared-email": "[email protected]",
          "declared-phone": 99999999,
          "declared-school-udise-code": 190923
        }
      }
    ]
  }
}
{
  "id": "api.user.declarations",
  "ver": "v1",
  "ts": "2020-11-24 10:42:19:886+0000",
  "params": {
    "resmsgid": null,
    "msgid": "d072daa8-8518-4f86-9f4d-dfc9e9b1dcd1",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

User Migrate

post

This API is used to Migrated the custodian account with non-custodian account.

  • The endpoint for User Migrations is /user/v1/migration
  • It is mandatory to provide values for required parameters
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponsing sessions, this token is exchanged, not the username/password of the user. it is mandatory to pass the auth token of same user whom we want to migrate

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation. "User migration" operation was successfully executed.
application/json
post
POST /api/user/v1/migrate HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 174

{
  "request": {
    "userId": "0e59b33f-d829-459f-a043-03ea726bf91c",
    "channel": "No Data",
    "action": "accept",
    "feedId": "2e59b34f-d834-989z-a043-34ea846bf91d",
    "userExtId": "staginghari9"
  }
}
{
  "id": "api.user.migrate",
  "ver": "v1",
  "ts": "2020-05-18 00:26:05:154+0530",
  "params": {
    "resmsgid": null,
    "msgid": null,
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "SERVER_ERROR",
  "result": {
    "maxAttempt": 2,
    "remainingAttempt": 1,
    "err": true,
    "message": "provided ext user id staginghari9 is incorrect"
  }
}

User Merge

patch

This API is used to merge the custodian account with non-custodian account.

  • The endpoint for User Account Merge is /user/v1/account/merge
  • It is mandatory to provide values for required parameters
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
Body
Responses
200
OK ! Successful operation. "USer Merge" operation was successfully executed.
application/json
patch
PATCH /api/user/v1/account/merge HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
Content-Type: application/json
Accept: */*
Content-Length: 121

{
  "request": {
    "fromAccountId": "9760d936-5fc9-47a7-a3b7-56fdebc7cad5",
    "toAccountId": "c8c452e6-7f1c-4480-9299-6bdf2ed4e4b8"
  }
}
{
  "id": null,
  "ver": "private",
  "ts": "2020-11-24 17:19:05:681+0000",
  "params": {
    "resmsgid": null,
    "msgid": "0957c785-ec79-49a5-bd26-a35aa76b12fb",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Assign Role V1

post

This API is used to assign roles to a user. It can also be used to replace and remove already assigned user roles. If a user should not be assigned any role in the organization, pass the role paramater as an empty array.

  • The endpoint for Assign Role to User is /user/v1/role/assign
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called.

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation. "assign role" operation was successfully executed.
application/json
post
POST /api/user/v1/role/assign HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 125

{
  "request": {
    "userId": "3fda9884-29b6-4f78-ada9-de045a0d3978",
    "organisationId": 1297544481264435200,
    "roles": [
      "COURSE_CREATOR"
    ]
  }
}
{
  "id": "api.user.assign.role",
  "ver": "v1",
  "ts": "2020-11-24 17:19:05:681+0000",
  "params": {
    "resmsgid": null,
    "msgid": "0957c785-ec79-49a5-bd26-a35aa76b12fb",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Assign Role V2

post

This API is used to assign roles to a user. It can also be used to replace and remove already assigned user roles. If a user should not be assigned any role in the organization, pass the role paramater as an empty array.

  • The endpoint for Assign Role to User is /user/v2/role/assign
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of any User API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received here.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called.

Example: {{user_token}}
Body
Responses
200
OK ! Successful operation. "assign role" operation was successfully executed.
application/json
post
POST /api/user/v2/role/assign HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 222

{
  "request": {
    "userId": "3fda9884-29b6-4f78-ada9-de045a0d3978",
    "roles": [
      {
        "role": "COURSE_CREATOR",
        "scope": [
          {
            "organisationId": 1297544481264435200
          }
        ]
      },
      {
        "role": "CONTENT_CREATOR",
        "scope": [
          {
            "organisationId": 1297544481264435200
          }
        ]
      }
    ]
  }
}
{
  "id": "api.user.assign.role",
  "ver": "v1",
  "ts": "2020-11-24 17:19:05:681+0000",
  "params": {
    "resmsgid": null,
    "msgid": "0957c785-ec79-49a5-bd26-a35aa76b12fb",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Accept User Tnc

post

This API is used to assign roles to a user. It can also be used to replace and remove already assigned user roles. If a user should not be assigned any role in the organization, pass the role paramater as an empty array.

  • The endpoint for Accepting User T&C* is /user/v1/tnc/accept
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.

Example: {{authorization}}
x-authenticated-user-tokenstringRequired

Access token of registered user performing given API request.

Example: {{user_token}}
x-authenticated-forstringOptional

Managed User token of registered MUA user performing given API

Example: {"{ mua_user_token }":null}
Body
Responses
200
OK ! Successful operation."User accept TnC" operation was successfully executed.
post
POST /api/user/v1/tnc/accept HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{authorization}}
x-authenticated-user-token: {{user_token}}
Content-Type: application/json
Accept: */*
Content-Length: 76

{
  "request": {
    "version": "v4",
    "userId": "4c2ece16-6749-4489-b069-413fc4993e27"
  }
}

No content

Last updated

Was this helpful?