Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.

Commit

Permalink
User and org
Browse files Browse the repository at this point in the history
  • Loading branch information
NupurSancheti committed Aug 13, 2018
1 parent 9b0ba22 commit 0270ab2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 105 deletions.
63 changes: 10 additions & 53 deletions pages/developer-docs/how-to-guide/how_to_create_organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,79 +42,36 @@ An organization can be created in a Sunbird instance using ORG API, it can be fu
Following is an example of request body for creating a user, the sample values provided in the request body are indicative:

**Request Body**
{
"params": { },

"request":{

<pre>
"request":{
"orgName":"ORG JP_1",

"description":"Dev Default Org",

"imgUrl":"N/A",

"channel":"channel -12571w1sja",

"preferredLanguage":"English",

"homeUrl":"N/A",

"orgCode":"orgCode123sd",

"isRootOrg":true,

"provider":"1231rwsadk",

"externalId":"exts12w7k",

"address":{

"address":{
"city":"Bangalore",

"state":"KA",

"country":"INDIA",

"zipCode":"566666"
}
}
}

}
</pre>


**Response Body**

{

"id": "api.org.create",

"ver": "v1",

"ts": "2018-08-13 10:40:26:981+0000",

"params": {

"resmsgid": null,

"msgid": "8e27cbf5-e299-43b0-bca7-8347f7e5abcf",

"err": null,

"status": "success",

"errmsg": null
},

"responseCode": "OK",

"result": {

<pre>
"responseCode": "OK",
"result": {
"organisationId": "012567820191629312269",

"response": "SUCCESS"
}
}

}
</pre>

### Concepts Covered

Expand Down
59 changes: 7 additions & 52 deletions pages/developer-docs/how-to-guide/how_to_create_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,112 +41,67 @@ The sequence of tasks the organization administrator follows to create users inc
**Request Body**

<pre>

"request": {

"email": "[email protected]",

"firstName": "John",

"lastName": "Pal",

"password": "password123",

"avatar": "john.png",

"language": ["English"],

"phone": "987654321",

"phoneVerified": true,

"subject": [ "string" ],

"channel": "a1234567b890c",

"userName": "john1"

"education":

[{

"degree": "BA",

"yearOfPassing": 1934,

"courseName": "Bachelor of Arts",

"boardOrUniversity": "ABC University",

"address":

{
"addType": "Permanent",

"addressLine1": "#34, ASDF Apartments",

"addressLine2": "ERTY Lane",

"city": "Bangalore",

"state": "Karnataka",

"zipCode": "560089"

},
}],

"jobProfile":

[ {

[
{
"jobName": "Manager",

"role": "L3",

"joiningDate": "2013-12-01",

"orgName": "XYZ Corp",

"address":
{

"addType": "Organization",

"addressLine1": "#34, QWETY Bldg",

"addressLine2": "ERTY Lane",

"city": "Bangalore",

"state": "Karnataka",

"zipCode": "560089"
}
}],


}
],
</pre>


**Response Body**

<pre>

"responseCode": "OK",

"responseCode": "OK",
"result": {

"response": "SUCCESS",

"accessToken": null,

"userId": "4eec2f70-b821-42b9-9694-8a08587715af"
}

</pre>

2.Save the created user ID

3.The user is created under the organization

### Concepts covered
Expand All @@ -163,4 +118,4 @@ The sequence of tasks the organization administrator follows to create users inc

[Creating Organization](http://www.sunbird.org/developer-docs/how-to-guide/how_to_create_organization)

[Map users to different business units within the organisation](http://www.sunbird.org/developer-docs/how-to-guide/hohow_to_create_org_add_user)
[Map users to different business units within the organisation](http://www.sunbird.org/developer-docs/how-to-guide/hohow_to_create_org_add_user)

0 comments on commit 0270ab2

Please sign in to comment.