Organisation Management
This API is for creation of a new Organisation on the Sunbird Platform.
- The endpoint for Create a new Organisation is
/org/v1/create
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Timestamp at which given API request is sent.
This ID uniquely identifies a request if the same API is executed multiple times.
Access token of registered user performing given API request.
Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.
OK. Successful operation. The Organisation Create operation was successfully executed.
CLIENT_ERROR. The Organisation Create operation failed due to bad request from client. Possible reasons for failure: Organisation name is mandatory. Invalid property . Channel is mandatory for root organisation. Either "organisationId" or "provider" and "externalId" values are required for the operation. Channel value already used by another organisation. Provide different value for channel. "organisationType" and "isTenant" are mandatory. Provide valid "organisationType" values.
'INTERNAL SERVER ERROR. The Organisation Create operation failed due to a server error. Possible reasons for failure: Channel registration failed.'
POST /api/org/v1/create HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 455
{
"request": {
"orgName": "Org Name",
"channel": "Channel",
"description": "Description",
"externalId": "ExtId",
"email": "[email protected]",
"isSSOEnabled": true,
"organisationType": "school",
"orgLocation": [
{
"id": "9541f516-4c01-4322-aa06-4062687a0ce5",
"type": "block"
},
{
"id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
"type": "district"
},
{
"id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
"type": "cluster"
},
{
"id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
"type": "state"
}
],
"isTenant": true
}
}
{
"id": "api.org.create",
"ver": "v1",
"ets": 1,
"params": {
"resmsgid": null,
"msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"ts": "2020-11-23 10:03:39:935+0000",
"result": {
"organisationId": 131636612466278400,
"response": "SUCCESS"
}
}
This API is for viewing details of an existing Organisation on the Sunbird Platform.
- The endpoint for Read Organisation details is
/org/v1/read
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Timestamp at which given API request is sent.
This ID uniquely identifies a request if the same API is executed multiple times.
Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.
OK. Successful operation. The requested operation was successfully executed.
'CLIENT_ERROR. The requested operation failed due to bad request from client. Possible reasons for failure: Either "organisationId" or "provider" and "externalId" values are required for the operation.'
'RESOURCE_NOT_FOUND. The requested operation failed as given resource is not existing on server. Possible reasons for failure: organisationId is mandatory.'
'INTERNAL SERVER ERROR. The requested operation failed due to a server error.'
POST /api/org/v1/read HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"request": {
"organisationId": "0131630445447741440"
}
}
{
"result": {
"id": "api.org.read",
"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": {
"dateTime": null,
"preferredLanguage": null,
"keys": {},
"channel\"": "ChannelNew",
"approvedBy": null,
"description": "Updated Description",
"updatedDate": "2020-12-01 10:29:49:496+0000",
"addressId": "0131630420489011201",
"provider": "channelnew",
"orgCode": null,
"locationId": null,
"theme": null,
"id": "0131630445447741440",
"isApproved": null,
"communityId": null,
"slug": "channelnew",
"email": "[email protected]",
"isSSOEnabled": false,
"identifier": "0131630445447741440",
"thumbnail": null,
"updatedBy\"": null,
"orgName": "Org Name",
"address": {},
"externalId": "extid",
"rootOrgId": "0131630445447741440",
"imgUrl": null,
"approvedDate": null,
"homeUrl": null,
"isDefault": null,
"createdDate": "2020-12-01 09:52:46:962+0000",
"createdBy": null,
"hashTagId": "0131630445447741440",
"noOfMembers": null,
"status": 0,
"orgLocation": [
{
"id": "9541f516-4c01-4322-aa06-4062687a0ce5",
"type": "block"
},
{
"id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
"type": "district"
},
{
"id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
"type": "cluster"
},
{
"id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
"type": "state"
}
],
"isTenant": true,
"isSchool": true,
"organisationType": 2
}
}
}
This API is for searching for Organisations on the Sunbird Platform.
- The endpoint for Search for an Organisation is
/org/v1/search
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Timestamp at which given API request is sent.
This ID uniquely identifies a request if the same API is executed multiple times.
Access token of registered user performing given API request.
Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.
OK. Successful operation. The requested operation was successfully executed.
'CLIENT_ERROR. The requested operation failed due to bad request from client. Possible reasons for failure: Either "organisationId" or "provider" and "externalId" values are required for the operation.'
'INTERNAL SERVER ERROR. The requested operation failed due to a server error.'
POST /api/org/v1/search HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"request": {
"filters": {
"id": "0131630445447741440"
}
}
}
{
"id": "api.org.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": [
{
"dateTime": null,
"preferredLanguage": null,
"keys": {},
"channel\"": "ChannelNew",
"approvedBy": null,
"description": "Updated Description",
"updatedDate": "2020-12-01 10:29:49:496+0000",
"addressId": "0131630420489011201",
"provider": "channelnew",
"orgCode": null,
"locationId": null,
"theme": null,
"id": "0131630445447741440",
"isApproved": null,
"communityId": null,
"slug": "channelnew",
"email": "[email protected]",
"isSSOEnabled": false,
"identifier": "0131630445447741440",
"thumbnail": null,
"updatedBy\"": null,
"orgName": "Org Name",
"address": {},
"externalId": "extid",
"rootOrgId": "0131630445447741440",
"imgUrl": null,
"approvedDate": null,
"homeUrl": null,
"isDefault": null,
"createdDate": "2020-12-01 09:52:46:962+0000",
"createdBy": null,
"hashTagId": "0131630445447741440",
"noOfMembers": null,
"status": 0,
"orgLocation": [
{
"id": "9541f516-4c01-4322-aa06-4062687a0ce5",
"type": "block"
},
{
"id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
"type": "district"
},
{
"id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
"type": "cluster"
},
{
"id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
"type": "state"
}
],
"organisationType": 2,
"isSchool": true,
"isTenant": true
}
]
}
}
}
This API is for updating details of an existing Organisation on the Sunbird Platform.
- The endpoint for Update particulars of an existing Organisation is
/org/v1/update
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Timestamp at which given API request is sent.
This ID uniquely identifies a request if the same API is executed multiple times.
Access token of registered user performing given API request.
Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.
OK. Successful operation. The requested operation was successfully executed.
'CLIENT_ERROR. The requested operation failed due to bad request from client. Possible reasons for failure: Either "organisationId" or "provider" and "externalId" values are required for the operation.'
'INTERNAL SERVER ERROR. The requested operation failed due to a server error. Possible reasons for failure: Channel registration failed.'
PATCH /api/org/v1/update HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 385
{
"request": {
"organisationId": "0131630445447741440,",
"description": "updated description,",
"orgName": "Updated Org Name,",
"orgLocation": [
{
"id": "9541f516-4c01-4322-aa06-4062687a0ce5",
"type": "block"
},
{
"id": "6dd69f1c-ba40-4b3b-8981-4fb6813c5e71",
"type": "district"
},
{
"id": "e9207c22-41cf-4a0d-81fb-1fbe3e34ae24",
"type": "cluster"
},
{
"id": "ccc7be29-8e40-4d0a-915b-26ec9228ac4a",
"type": "state"
}
]
}
}
{
"id": "api.org.status.update",
"ver": "v1",
"ets": 1,
"params": {
"resmsgid": null,
"msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"ts": "2020-11-23 10:03:39:935+0000",
"result": {
"organisationId": 131636612466278400,
"response": "SUCCESS"
}
}
This API is for updating status of an existing Organisation on the Sunbird Platform.
- The endpoint for Organisation update status is
/org/v1/status/update
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Timestamp at which given API request is sent.
This ID uniquely identifies a request if the same API is executed multiple times.
Access token of registered user performing given API request.
Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.
OK. Successful operation. The requested operation was successfully executed.
'CLIENT_ERROR. The requested operation failed due to bad request from client. Possible reasons for failure: Either "organisationId" or "provider" and "externalId" values are required for the operation.'
'INTERNAL SERVER ERROR. The requested operation failed due to a server error. Possible reasons for failure: Channel registration failed.'
PATCH /api/org/v1/status/update HTTP/1.1
Host: staging.sunbirded.org
X-Authenticated-User-Token: text
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 75
{
"request": {
"filters": {
"organisationId": "0131630445447741440",
"status": 0
}
}
}
{
"id": "api.org.status.update",
"ver": "v1",
"ets": 1,
"params": {
"resmsgid": null,
"msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"ts": "2020-11-23 10:03:39:935+0000",
"result": {
"organisationId": 131636612466278400,
"response": "SUCCESS"
}
}
This API is for creation/addition of keys to an Organisation
Timestamp at which given API request is sent.
This ID uniquely identifies a request if the same API is executed multiple times.
Access token of registered user performing given API request.
Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.
OK. Successful operation. The Assign key to an Organisation operation was successfully executed.
'CLIENT_ERROR. The requested operation failed due to bad request from client. Possible reasons for failure: signKey is mandatory.'
'INTERNAL SERVER ERROR. The requested operation failed due to a server error.'
POST /api/org/v1/assign/key HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
X-Authenticated-User-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 85
{
"request": {
"id": "0131630445447741440",
"signKeys": [
"S1",
"S2"
],
"encKeys": [
"E1",
"E2"
]
}
}
{
"id": "api.org.assign.key",
"ver": "v1",
"ets": 1,
"params": {
"resmsgid": null,
"msgid": "5398bdd7-f80d-4a9e-9c13-90ae3c6bbcb0",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"ts": "2020-11-23 10:03:39:935+0000",
"result": {
"response": "SUCCESS"
}
}
Last updated
Was this helpful?