APIs

API Documentation:

Refer to **** the below various API documentation related to all the different APIs that are being consumed with in all the batch jobs.

Course Batch Management APIs are listed below:

CourseBatch Read

get

Fetch a particular Batch This API is associated with fetching a particular batch on the Sunbird Platform. The endpoint for Fetch a particular Batch is /batch/read/{Batch_ID} The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Path parameters
batch-idstringRequired

Append a valid Batch ID To the Request URL

Header parameters
AuthorizationstringRequired

'To make use of the 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: {{api-key}}
x-authenticated-user-tokenstringRequired

The alphanumeric string to access the API

Example: {{authToken}}
Content-TypestringRequired

'The Content Type entity is the media type of the resource.Possible
\ media types can be:- \n - application/json'

Example: application/json
Responses
200
SUCCESS. The **Fetch a batch** operation was successful!
application/json
get
GET /api/course/v1/batch/read/{batch-id} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
x-authenticated-user-token: {{authToken}}
Content-Type: application/json
Accept: */*
{
  "id": "api.course.batch.read",
  "ver": "v1",
  "ts": "2020-11-23 15:10:45:215+0000",
  "params": {
    "resmsgid": null,
    "msgid": "aa240e09-4481-4cbd-a832-617a15e8e872",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "identifier": 131439667998310400,
      "createdFor": [],
      "endDate": "2020-12-30",
      "description": "batch description1",
      "updatedDate": null,
      "cert_templates": {
        "Test_Template_4": {
          "identifier": "Test_Template_4",
          "criteria": {
            "enrollment": {
              "status": 2
            }
          },
          "name": "Test_Template_4",
          "notifyTemplate": {
            "emailTemplateType": "defaultCertTemp",
            "subject": "Completion certificate",
            "stateImgUrl": "https://sunbirddev.blob.core.windows.net/orgemailtemplate/img/File-0128212938260643843.png",
            "regards": "Minister of Gujarat",
            "regardsperson": "Chairperson"
          },
          "issuer": {
            "name": "Gujarat Council of Educational Research and Training",
            "url": "https://gcert.gujarat.gov.in/gcert/"
          },
          "url": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/test_template_4/artifact/cbse.svg",
          "signatoryList": [
            {
              "image": "https://cdn.pixabay.com/photo/2014/11/09/08/06/signature-523237__340.jpg",
              "name": "CEO Gujarat",
              "id": "CEO",
              "designation": "CEO"
            }
          ]
        },
        "Test_Template_prad": {
          "identifier": "Test_Template_prad",
          "criteria": {
            "enrollment": {
              "status": 2
            }
          },
          "name": "Updated Asset",
          "notifyTemplate": {
            "emailTemplateType": "defaultCertTemp",
            "subject": "Completion certificate",
            "stateImgUrl": "https://sunbirddev.blob.core.windows.net/orgemailtemplate/img/File-0128212938260643843.png",
            "regards": "Minister of Gujarat",
            "regardsperson": "Chairperson"
          },
          "issuer": {
            "name": "Gujarat Council of Educational Research and Training",
            "url": "https://gcert.gujarat.gov.in/gcert/"
          },
          "url": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/test_template_prad/artifact/file-0130860005482086401.svg",
          "signatoryList": [
            {
              "image": "https://cdn.pixabay.com/photo/2014/11/09/08/06/signature-523237__340.jpg",
              "name": "CEO Gujarat",
              "id": "CEO",
              "designation": "CEO"
            }
          ]
        },
        "template_01_dev_001": {
          "identifier": "template_01_dev_001",
          "criteria": {
            "enrollment": {
              "status": 2
            }
          },
          "name": "Course merit certificate",
          "notifyTemplate": {
            "emailTemplateType": "defaultCertTemp",
            "subject": "Completion certificate",
            "stateImgUrl": "https://sunbirddev.blob.core.windows.net/orgemailtemplate/img/File-0128212938260643843.png",
            "regards": "Minister of Gujarat",
            "regardsperson": "Chairperson"
          },
          "issuer": {
            "name": "Gujarat Council of Educational Research and Training",
            "url": "https://gcert.gujarat.gov.in/gcert/"
          },
          "url": "",
          "signatoryList": [
            {
              "image": "https://cdn.pixabay.com/photo/2014/11/09/08/06/signature-523237__340.jpg",
              "name": "CEO Gujarat",
              "id": "CEO",
              "designation": "CEO"
            }
          ]
        }
      },
      "batchId": 131439667998310400,
      "tandc": null,
      "createdDate": "2020-11-04 10:54:31:731+0000",
      "createdBy": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
      "mentors": [],
      "name": "test cert scalability",
      "id": 131439667998310400,
      "enrollmentType": "open",
      "enrollmentEndDate": null,
      "courseId": "do_1131396442662912001425",
      "collectionId": "do_1131396442662912001425",
      "startDate": "2020-11-04",
      "status": 1
    }
  }
}

CourseBatch Update

patch

This API is associated with updating a batch on the Sunbird Platform. The endpoint for Course Batch Update is /batch/update The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Header parameters
Content-TypestringRequired

'The Content Type entity is the media type of the resource.Possible
\ media types can be:- \n - application/json'

Example: application/json
x-authenticated-user-tokenstringRequired

The alphanumeric string for accessing the API

Example: {{authToken}}
AuthorizationstringRequired

'To make use of the 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: {{api-key}}
Body
Responses
200
SUCCESS. The **Update a batch** operation was successful!
application/json
patch
PATCH /api/course/v1/batch/update HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
Content-Type: application/json
x-authenticated-user-token: {{authToken}}
Accept: */*
Content-Length: 153

{
  "request": {
    "enrollmentType": "open",
    "startDate": "2020-11-23",
    "enrollmentEndDate": "2021-12-30",
    "status": 1,
    "courseId": "{{course-id}}",
    "id": "{{batch-id}}"
  }
}
{
  "id": "api.course.batch.update",
  "ver": "v1",
  "ts": "2020-11-23 06:59:52:152+0000",
  "params": {
    "resmsgid": null,
    "msgid": "8e27cbf5-e299-43b0-bca7-8347f7e5abcf",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {}
}

CourseBatch Search

post

Lists the existing batches This API is associated with fetching and listing existing batches The endpoint for Lists the existing batches is /batch/list The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Query parameters
orgdetailsstringRequired

Extra data can be passed in query parameter with above mentioned key and comma separated value. Example,?orgdetails=email,name. Sunbird will take this query parameter and pass to content service as it is, and content service does the needful.

Header parameters
Content-TypestringRequired

-| 'The Content Type entity is the media type of the resource.Possible\ \ media types can be:- \n - application/json'

Example: application/json
AuthorizationstringRequired

'To make use of the 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: {{api-key}}
x-authenticated-user-tokenstringRequired

The alphanumeric string for accessing the API

Example: {{authToken}}
Body
Responses
200
SUCCESS. The **Lists the existing batches** operation was successful!
application/json
post
POST /api/course/v1/batch/list HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
Content-Type: application/json
x-authenticated-user-token: {{authToken}}
Accept: */*
Content-Length: 62

{
  "request": {
    "filters": {
      "courseId": "{{course-id}}"
    },
    "limit": 2
  }
}
{
  "id": "api.course.batch.search",
  "ver": "v1",
  "ts": "2020-11-23 15:31:47:895+0000",
  "params": {
    "resmsgid": null,
    "msgid": "3b07f74d-59af-494c-8d41-c8b665fa75ea",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "count": 15,
      "content": [
        {
          "identifier": 131440087048683520,
          "createdFor": [],
          "endDate": "2020-11-30",
          "description": "batch description1",
          "updatedDate": null,
          "cert_templates": {
            "Test_Template_prad": {
              "identifier": "Test_Template_prad",
              "criteria": {
                "enrollment": {
                  "status": 2
                }
              },
              "name": "Updated Asset",
              "notifyTemplate": {
                "emailTemplateType": "defaultCertTemp",
                "subject": "Completion certificate",
                "stateImgUrl": "https://sunbirddev.blob.core.windows.net/orgemailtemplate/img/File-0128212938260643843.png",
                "regards": "Minister of Gujarat",
                "regardsperson": "Chairperson"
              },
              "issuer": {
                "name": "Gujarat Council of Educational Research and Training",
                "url": "https://gcert.gujarat.gov.in/gcert/"
              },
              "url": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/test_template_prad/artifact/file-0130860005482086401.svg",
              "signatoryList": [
                {
                  "image": "https://cdn.pixabay.com/photo/2014/11/09/08/06/signature-523237__340.jpg",
                  "name": "CEO Gujarat",
                  "id": "CEO",
                  "designation": "CEO"
                }
              ]
            }
          },
          "batchId": 131440087048683520,
          "tandc": null,
          "createdDate": "2020-11-04 12:26:38:668+0000",
          "createdBy": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
          "mentors": [],
          "name": "test cert scalability",
          "id": 131440087048683520,
          "enrollmentType": "open",
          "enrollmentEndDate": null,
          "courseId": "do_1131396442662912001425",
          "collectionId": "do_1131396442662912001425",
          "startDate": "2020-11-04",
          "status": 1
        },
        {
          "identifier": 131439524674273280,
          "createdFor": [],
          "endDate": "2020-12-30",
          "description": "batch description1",
          "updatedDate": null,
          "cert_templates": {
            "Test_Template_prad": {
              "identifier": "Test_Template_prad",
              "criteria": {
                "enrollment": {
                  "status": 2
                }
              },
              "name": "Updated Asset",
              "notifyTemplate": {
                "emailTemplateType": "defaultCertTemp",
                "subject": "Completion certificate",
                "stateImgUrl": "https://sunbirddev.blob.core.windows.net/orgemailtemplate/img/File-0128212938260643843.png",
                "regards": "Minister of Gujarat",
                "regardsperson": "Chairperson"
              },
              "issuer": {
                "name": "Gujarat Council of Educational Research and Training",
                "url": "https://gcert.gujarat.gov.in/gcert/"
              },
              "url": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/test_template_prad/artifact/file-0130860005482086401.svg",
              "signatoryList": [
                {
                  "image": "https://cdn.pixabay.com/photo/2014/11/09/08/06/signature-523237__340.jpg",
                  "name": "CEO Gujarat",
                  "id": "CEO",
                  "designation": "CEO"
                }
              ]
            }
          },
          "batchId": 131439524674273280,
          "tandc": null,
          "createdDate": "2020-11-04 10:24:25:778+0000",
          "createdBy": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
          "mentors": [],
          "name": "test cert scalability",
          "id": 131439524674273280,
          "enrollmentType": "open",
          "enrollmentEndDate": null,
          "courseId": "do_1131396442662912001425",
          "collectionId": "do_1131396442662912001425",
          "startDate": "2020-11-04",
          "status": 1
        }
      ]
    }
  }
}

CourseBatch Create

post

This API is associated with batch creation The endpoint for Creates a Batch is /batch/create The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Header parameters
Content-TypestringRequired
  • 'The Content Type entity is the media type of the resource.Possible
    \ media types can be:- \n - application/json'
Example: application/json
x-authenticated-user-tokenstringRequired

The alphanumeric string to access the API

Example: {{authToken}}
AuthorizationstringRequired

'To make use of the 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: {{api-key}}
Body
Responses
200
Success example for batch create
application/json
post
POST /api/course/v1/batch/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
Content-Type: application/json
x-authenticated-user-token: {{authToken}}
Accept: */*
Content-Length: 178

{
  "request": {
    "courseId": "{{course-id}}",
    "name": "test cert scalability",
    "description": "batch description1",
    "enrollmentType": "open",
    "startDate": "2020-11-23",
    "endDate": "2021-12-30"
  }
}
{
  "id": "api.course.batch.create",
  "ver": "v1",
  "ts": "2020-11-23 06:42:39:001+0000",
  "params": {
    "resmsgid": null,
    "msgid": "8c244093-e19d-4694-a4ba-342bc0f8b721",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS",
    "batchId": 1315728917531852800
  }
}

Course Enrolment APIs are listed below:

Course Enrol

post

The API associated with user enrolment into a courseBatch. The endpoint for Course Enrol is /enrol

The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Header parameters
AuthorizationstringRequired

To make use of the 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: {{api-key}}
x-authenticated-user-tokenstringRequired

The alphanumeric string for accessing the API

Example: {{authToken}}
Body
Responses
200
SUCCESS. The "Course Enrol Request" operation was successful!
application/json
post
POST /api/course/v1/enrol HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
x-authenticated-user-token: {{authToken}}
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "request": {
    "courseId": "{{course-id}}",
    "batchId": "{{batch-id}}",
    "userId": "{{user-id}}"
  }
}
{
  "id": "api.course.enroll",
  "ver": "v1",
  "ts": "2020-12-03 04:24:19:186+0000",
  "params": {
    "resmsgid": null,
    "msgid": "d8e54177-acb2-4351-8dcc-a7e6fc5c8a2f",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Course Unenrol

post

The Course Unenrol API is associated with unenrol of a user from a CourseBatch. The endpoint for Course Unenrol is /unenrol

The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Header parameters
AuthorizationstringRequired

To make use of the 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: {{api-key}}
x-authenticated-user-tokenstringRequired

The alphanumeric string for accessing the API

Example: {{authToken}}
Body
Responses
200
SUCCESS. The "Course Unenrol Request" operation was successful!
application/json
post
POST /api/course/v1/unenrol HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
x-authenticated-user-token: {{authToken}}
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "request": {
    "courseId": "{{course-id}}",
    "batchId": "{{batch-id}}",
    "userId": "{{user-id}}"
  }
}
{
  "id": "api.course.unenroll",
  "ver": "v1",
  "ts": "2020-12-03 06:33:38:843+0000",
  "params": {
    "resmsgid": null,
    "msgid": "728efae3-8352-4886-8cb2-34b7b3fc41cc",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

UserEnrolment List

get

The UserEnrolmentList api provides the detail of a user's all enrolled CourseBatches The endpoint for UserEnrolment List is /user/enrollment/list/{{user-id}}

The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Path parameters
user-idstringRequired

Id of user for whom enrolment details we want

Query parameters
orgdetailsstringOptional

Org details related with course

Example: orgName,email
licenseDetailsstringOptional

License details related with course

Example: name,description,url
fieldsstringOptional

Different course related details can be passed

Example: contentType,topic,name,channel
batchDetailsstringOptional

Batch details can be passed to filter

Example: name,endDate,startDate,status,enrollmentType,createdBy,certificates
cachestringOptional

The batch data got updated in cache after sometime to get updated details immediately we can pass cache false

Example: cache=false
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource.Possible media types can be:- Application/json

Example: application/json
AuthorizationstringRequired

To make use of the 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: {{api-key}}
x-authenticated-user-tokenstringRequired

The alphanumeric string for accessing the API

Example: {{authToken}}
Responses
200
SUCCESS. The "User Enrolment List" operation was successful!
application/json
get
GET /api/course/v1/user/enrollment/list/{user-id} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
Content-Type: application/json
x-authenticated-user-token: {{authToken}}
Accept: */*
{
  "id": "api.user.courses.list",
  "ver": "v1",
  "ts": "2020-12-03 06:56:38:376+0000",
  "params": {
    "resmsgid": null,
    "msgid": "83f3347f-0d7a-4369-bde2-daae13aa5938",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "courses": [
      {
        "dateTime": 1594191696100,
        "lastReadContentStatus": 2,
        "enrolledDate": "2020-07-08 07:01:36:100+0000",
        "addedBy": null,
        "contentId": "do_11305961646828748812224",
        "active": true,
        "description": "Enter description for Course",
        "courseLogoUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11305961646828748812224/artifact/06_maths_book_1566813333849_1580197829074.thumb.jpg",
        "batchId": 1305961938705612800,
        "userId": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
        "content": {
          "ownershipType": [
            "createdBy"
          ],
          "copyright": "Sunbird",
          "channel": "b00bc992ef25f1a9a8d63291e20efc8d",
          "downloadUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511275_do_11305961646828748812224_1.0_spine.ecar",
          "organisation": [
            "Sunbird"
          ],
          "language": [
            "English"
          ],
          "mimeType": "application/vnd.ekstep.content-collection",
          "variants": {
            "online": {
              "ecarUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511612_do_11305961646828748812224_1.0_online.ecar",
              "size": 4936
            },
            "spine": {
              "ecarUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511275_do_11305961646828748812224_1.0_spine.ecar",
              "size": 76289
            }
          },
          "leafNodes": [
            "do_11305605610466508811"
          ],
          "c_sunbird_dev_private_batch_count": 0,
          "objectType": "Content",
          "appIcon": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11305961646828748812224/artifact/06_maths_book_1566813333849_1580197829074.thumb.jpg",
          "children": [
            "do_11305605610466508811"
          ],
          "primaryCategory": "Course",
          "appId": "dev.sunbird.portal",
          "contentEncoding": "gzip",
          "lockKey": "097e65a0-9c65-4198-b65c-269de9ae6072",
          "totalCompressedSize": 499149,
          "mimeTypesCount": "{\"application/vnd.ekstep.content-collection\":1,\"application/vnd.ekstep.ecml-archive\":1}",
          "contentType": "Course",
          "trackable": {
            "enabled": "Yes",
            "autoBatch": "Yes"
          },
          "identifier": "do_11305961646828748812224",
          "lastUpdatedBy": "8454cb21-3ce9-4e30-85b5-fade097880d8",
          "audience": [
            "Teacher"
          ],
          "visibility": "Default",
          "toc_url": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11305961646828748812224/artifact/do_11305961646828748812224_toc.json",
          "contentTypesCount": "{\"CourseUnit\":1,\"Resource\":1}",
          "consumerId": "6533af82-f38b-429a-bcfb-681ed02a62e3",
          "childNodes": [
            "do_11305961679918694412225",
            "do_11305605610466508811"
          ],
          "mediaType": "content",
          "osId": "org.ekstep.quiz.app",
          "graph_id": "domain",
          "nodeType": "DATA_NODE",
          "lastPublishedBy": "Ekstep",
          "version": 2,
          "license": "CC BY 4.0",
          "prevState": "Draft",
          "size": 76289,
          "lastPublishedOn": "2020-07-08T06:58:31.132+00:00",
          "IL_FUNC_OBJECT_TYPE": "Content",
          "name": "Test-auto-certificate-8thjuly",
          "status": "Live",
          "code": "org.sunbird.DuGnxI",
          "credentials": {
            "enabled": "Yes"
          },
          "prevStatus": "Processing",
          "description": "Enter description for Course",
          "idealScreenSize": "normal",
          "posterImage": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11294498061374259215/artifact/06_maths_book_1566813333849_1580197829074.jpg",
          "createdOn": "2020-07-08T06:57:43.417+00:00",
          "reservedDialcodes": "{\"U6K9M6\":0}",
          "batches": [
            {
              "createdFor": [
                "ORG_001"
              ],
              "endDate": null,
              "name": "Test-auto-certificate-8thjuly",
              "batchId": 1305961938705612800,
              "enrollmentType": "open",
              "enrollmentEndDate": null,
              "startDate": "2020-07-08",
              "status": 1
            },
            {
              "createdFor": [
                "ORG_001"
              ],
              "endDate": null,
              "name": "Test-auto-certificate-8thjuly",
              "batchId": 1306956038530662400,
              "enrollmentType": "open",
              "enrollmentEndDate": null,
              "startDate": "2020-07-22",
              "status": 1
            }
          ],
          "copyrightYear": 2020,
          "contentDisposition": "inline",
          "lastUpdatedOn": "2020-07-08T06:58:30.585+00:00",
          "licenseterms": "By creating and uploading content on DIKSHA, you consent to publishing this content under the Creative Commons Framework, specifically under the CC-BY-SA 4.0 license.",
          "SYS_INTERNAL_LAST_UPDATED_ON": "2020-07-23T12:24:29.5+00:00",
          "dialcodeRequired": "No",
          "createdFor": [
            "ORG_001"
          ],
          "lastStatusChangedOn": "2020-07-08T06:58:31.95+00:00",
          "creator": "Mentor First User",
          "IL_SYS_NODE_TYPE": "DATA_NODE",
          "os": [
            "All"
          ],
          "pkgVersion": 1,
          "versionKey": 1594191510585,
          "idealScreenDensity": "hdpi",
          "framework": "TPD",
          "depth": 0,
          "s3Key": "ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511275_do_11305961646828748812224_1.0_spine.ecar",
          "dialcodes": [
            "U6K9M6"
          ],
          "createdBy": "8454cb21-3ce9-4e30-85b5-fade097880d8",
          "compatibilityLevel": 4,
          "leafNodesCount": 1,
          "IL_UNIQUE_ID": "do_11305961646828748812224",
          "resourceType": "Course",
          "node_id": 452442,
          "c_sunbird_dev_open_batch_count": 2
        },
        "contentStatus": {
          "do_11305605610466508811": 2
        },
        "issuedCertificates": [],
        "completionPercentage": 100,
        "courseName": "Test-auto-certificate-8thjuly",
        "certificates": [
          {
            "id": "fe2aadc6-5065-460a-98ed-4de17bc13f62",
            "lastIssuedOn": "2020-07-22T12:57:44.335+00:00",
            "name": "Course completion certificate prad",
            "token": "A8T4Q7",
            "url": "https://dev.sunbirded.org/certs/ORG_001_01305961938705612812/eedc6a60-cc1a-11ea-bff5-c98df349f522.pdf"
          }
        ],
        "completedOn": 1595422613486,
        "leafNodesCount": 1,
        "progress": 1,
        "lastReadContentId": "do_11305605610466508811",
        "courseId": "do_11305961646828748812224",
        "collectionId": "do_11305961646828748812224",
        "status": 2
      }
    ]
  }
}

Course Progress APIs are listed below:

Read Content State

post

This API is used for reading the current progress of the course (content) consumed by a user. For example, the user can view and check the progress of a specific course or course(s) consumed.

  • The endpoint for Read Course State is /read

  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types are:-

  • application/json
Example: application/json
AuthorizationstringRequired

'To make use of the 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: {{api-key}}
x-authenticated-user-tokenstringRequired

'The registered user token/key to authenticate user and execute the API.'

Example: {{authToken}}
Body
Responses
200
SUCCESS. The "Read Course States" operation was successful!
application/json
post
POST /api/course/v1/content/state/read HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
Content-Type: application/json
x-authenticated-user-token: {{authToken}}
Accept: */*
Content-Length: 120

{
  "request": {
    "userId": "{{user-id}}",
    "courseId": "{{course-id}}",
    "contentIds": [
      "{{content-id}}"
    ],
    "batchId": "{{batch-id}}"
  }
}
{
  "id": "api.content.state.read",
  "ver": "v1",
  "ts": "2020-11-24 07:34:28:089+0000",
  "params": {
    "resmsgid": null,
    "msgid": "f00d1bf0-4014-40bb-b055-4972e598977a",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "contentList": []
  }
}

Update Content State

patch

This API is used to update the Course(content) state as consumed by a user. For example, when the user resumes a course or courses after the point at which it was stopped, the status of the course is updated.

The endpoint for Update Course State is /update

The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • application/json
Example: application/json
AuthorizationstringRequired

'To make use of the 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: {{api-key}}
x-authenticated-user-tokenstringRequired

'The registered user token/key to authenticate user and execute the API.'

Example: {{authToken}}
Body
Responses
200
SUCCESS. The "Update Course State" operation was successful!
application/json
patch
PATCH /api/course/v1/content/state/update HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
Content-Type: application/json
x-authenticated-user-token: {{authToken}}
Accept: */*
Content-Length: 384

{
  "request": {
    "userId": "{{user-id}}",
    "contents": [
      {
        "contentId": "{{content-id}}",
        "batchId": "{{batch-id}}",
        "status": 2,
        "courseId": "{{course-id}}",
        "lastAccessTime": "2020-11-23 12:58:35:179+0000"
      }
    ],
    "assessments": [
      {
        "contentId": "{{content-id}}",
        "batchId": "{{batch-id}}",
        "courseId": "{{course-id}}",
        "userId": "{{user-id}}",
        "attemptId": "{{attemptId}}",
        "assessmentTs": "1567591211000",
        "events": []
      }
    ]
  }
}
{
  "id": "api.content.state.update",
  "ver": "v1",
  "ts": "2020-11-27 14:07:27:025+0000",
  "params": {
    "resmsgid": null,
    "msgid": "74aa2cb5-0580-4183-adff-c6e69204f1ee",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "do_11259843042561228816": "SUCCESS"
  }
}

Course Batch Certificates APIs are listed below:

Add certificate template to a course batch

patch

This API allows you to attach certificate templates.

Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource.Possible media types can be Application/json

tsstringOptional

The timestamp at which the Add certificate template request was sent.

X-msgidstringOptional

A unique ID that identifies the request, in case the same API is executed multiple times.

x-authenticated-user-tokenstringRequired

The access token of the registered user sending the given API request. This is an alphanumeric string.

AuthorizationstringRequired

To make use of the 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.

Body
all ofOptional
and
Responses
200
OK ! Operation successful."Add Certificate template" operation was executed successfully.
application/json
patch
PATCH /api/course/batch/cert/v1/template/add HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: application/json
x-authenticated-user-token: text
Accept: */*
Content-Length: 341

{
  "id": "text",
  "ver": "text",
  "ets": 1,
  "params": {
    "msgid": "text",
    "did": "text"
  },
  "request": {
    "batch": {
      "courseId": "text",
      "batchId": "text",
      "template": {
        "identifier": "text",
        "criteria": {
          "enrollment": {
            "status": "2"
          }
        },
        "signatoryList": [
          {
            "name": "text",
            "id": "text",
            "designation": "CEO",
            "image": "text"
          }
        ],
        "issuer": {
          "name": "text",
          "url": "text",
          "publicKey": [
            7,
            8
          ]
        }
      }
    }
  }
}
{
  "id": "api.course.batch.cert.template.add",
  "ver": "v1",
  "ts": "2020-12-03 05:15:43:693+0000",
  "params": {
    "resmsgid": null,
    "msgid": "dcef916a-bbf0-48b6-bb20-2e4b9e90745d",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

remove certificate template from course batch

patch

This API is associated with detaching certificate templates.

Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource.Possible media types can be Application/json

tsstringOptional

The timestamp at which the remove certificate template request was sent.

X-msgidstringOptional

A unique ID that identifies the request in case the same API is executed multiple times.

x-authenticated-user-tokenstringRequired

The access token of the registered user sending the given API request. This is an alphanumeric string.

AuthorizationstringRequired

To make use of the 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.

Body
all ofOptional
and
Responses
200
OK ! Operation successful."Remove Certificate template" operation was executed successfully.
application/json
patch
PATCH /api/course/batch/cert/v1/template/remove HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: application/json
x-authenticated-user-token: text
Accept: */*
Content-Length: 113

{
  "request": {
    "batch": {
      "courseId": "courseId",
      "batchId": "batchId",
      "template": {
        "identifier": "template Identifier"
      }
    }
  }
}
{
  "id": "api.course.batch.cert.template.remove",
  "ver": "v1",
  "ts": "2020-12-03 05:36:09:531+0000",
  "params": {
    "resmsgid": null,
    "msgid": "cac9434e-fc66-47dc-b37b-15438b3c68ab",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Group Activity Aggregator

Group Activity Aggregator

post

This API is used for reading the current progress of the course (content) consumed by group members. For example, the mentor/user can view and check the progress of a specific activity.

  • The endpoint for Group Activity Aggregator is /agg

  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.

Authorizations
Header parameters
Content-TypestringRequired

'The Content Type entity is the media type of the resource.Possible
\ media types can be:- \n - application/json'

Example: application/json
x-authenticated-user-tokenstringRequired

'The registered user token/key to authenticate user and execute the API.'

Example: {{authToken}}
AuthorizationstringRequired

'To make use of the 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: {{api-key}}
Body
Responses
200
SUCCESS. The "Group Activity Aggregator" operation was successful!
application/json
post
POST /api/data/v1/group/activity/agg HTTP/1.1
Host: staging.open-sunbird.org
Authorization: {{api-key}}
Content-Type: application/json
x-authenticated-user-token: {{authToken}}
Accept: */*
Content-Length: 93

{
  "request": {
    "groupId": "{{group-id}}",
    "activityId": "{{activity-id}}",
    "activityType": "Course"
  }
}
{
  "id": "api.group.activity.agg",
  "ver": "v1",
  "ts": "2020-11-27 16:29:46:161+0000",
  "params": {
    "resmsgid": null,
    "msgid": "849f418c-7f6e-4a10-9c5c-16b15f8ea86e",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "activity": {
      "id": "{{activity-id-invalid}}",
      "type": "Course",
      "agg": [
        {
          "metric": "enrolmentCount",
          "lastUpdatedOn": 1606494586160,
          "value": 0
        }
      ]
    },
    "groupId": "b0c4a645-807e-41c7-972e-5c48c5b5e5e7",
    "members": []
  }
}

Collection Summary

Collection Summary(https://staging.open-sunbird.org/report/v1/collection/summary)

POST

This API gives the collection summary, like the total number of enrolments, completion count, count of certificates issued.

Request Body

Name
Type
Description

request*

Object

filters*

Object

Search filters

collectionId*

String

Id of the collection

batchId*

String

Id of the batch

group_by

String Array

"state", "dist"

intervals

String

2019-09-23T00:00:00.000Z/2019-09-24T00:00:00.000Z" StartDate - Batch Start Date and Default EndDate - Current Date

{
  "result": {
    "collectionId": "", // Collection/CourseId
    "name": "", // Collection Name
    "batchId": "", // Batch Identifier
    "enrolmentCount": "",
    "completionCount": "",
    "certificatesIssuedCount": "",
    "summary": {  // Summary by state and district level
      "state": {
        "enrolmentCount": "",
        "completionCount": ""
      },
      "district": {
        "enrolmentCount": "",
        "completionCount": ""
      }
    }
  }
}

Page APIs

Create Page

post

This API is associated with creating a new page. To create a page first create the page section using section create api.make page name unique.

  • The endpoint for Create Page is /create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • Application/json
  • Multipart/form-data
  • Application/x-www-form-urlencoded
X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

tsstringRequired

Time Stamp at which creating page request was sent.

AuthorizationstringRequired

All User APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

x-authenticated-user-tokenstringRequired

The token/key used to execute the API

Body
idstringRequiredExample: unique API ID
tsstringRequiredExample: 2013/10/15 16:16:39
paramsobjectRequired
Responses
200
OK ! Successful operation."create page" operation was successfully executed.
application/json
Responseall of

Create Content Response

and
post
POST /api/data/v1/page/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: application/json
X-msgid: text
ts: text
x-authenticated-user-token: text
Accept: */*
Content-Length: 443

{
  "id": "api.page.create",
  "ts": "2020/12/11 16:16:39",
  "params": {},
  "request": {
    "name": "Resources",
    "organisationId": "id of organisation, if you want to create page for your org only. if not pass then page will be created for all org.",
    "portalMap": [
      {
        "id": 1228383082462412800,
        "index": 1,
        "group": 1
      },
      {
        "id": 1228383384379392000,
        "index": 1,
        "group": 2
      }
    ],
    "appMap": [
      {
        "id": 1228383082462412800,
        "index": 1,
        "group": 1
      },
      {
        "id": 1228383384379392000,
        "index": 1,
        "group": 2
      }
    ]
  }
}
{
  "id": "api.page.create",
  "ver": "v1",
  "ts": "1606196636922",
  "params": {
    "resmsgid": "null,",
    "msgid": "a4b7041c-2d42-43e8-81d2-d3f3b6fbeccf",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS",
    "pageId": 131699903041208320
  }
}

Update Page Information

patch

This API is associated with updating the page information

  • The endpoint for Update Page Information is /update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • Application/json
  • Multipart/form-data
  • Application/x-www-form-urlencoded
X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

tsstringRequired

Time Stamp at which update page information request was sent.

AuthorizationstringRequired

All User APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

x-authenticated-user-tokenstringRequired

The token/key used to execute the API

Body
idstringRequiredExample: unique API ID
tsstringRequiredExample: 2013/10/15 16:16:39
paramsobjectRequired
Responses
200
OK ! Successful operation."update page information" operation was successfully executed.
application/json
Responseall of

Create Content Response

and
patch
PATCH /api/data/v1/page/update HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: application/json
X-msgid: text
ts: text
x-authenticated-user-token: text
Accept: */*
Content-Length: 333

{
  "id": "unique API ID",
  "ts": "2013/10/15 16:16:39",
  "params": {},
  "request": {
    "name": "Resourcessss",
    "id": 1228394137835929600,
    "portalMap": [
      {
        "id": 1228383082462412800,
        "index": 1,
        "group": 1
      },
      {
        "id": 1228383384379392000,
        "index": 1,
        "group": 2
      }
    ],
    "appMap": [
      {
        "id": 1228383082462412800,
        "index": 1,
        "group": 1
      },
      {
        "id": 1228383384379392000,
        "index": 1,
        "group": 2
      }
    ]
  }
}
{
  "id": "api.page.update",
  "ver": "v1",
  "ts": "1606196636922",
  "params": {
    "resmsgid": null,
    "msgid": "34b7041c-2d42-43e8-81d2-d3f3b6fbeccf",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Get Specific Page Resources

get

This API is associated with fetching specific resources.

  • The endpoint for Get Specific Page Resources is /read/{pageName}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Path parameters
pageNamestringRequired

Please append a valid Section Id to the request URL

Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • Application/json
X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

tsstringRequired

Time Stamp at which get specific page resources request was sent.

AuthorizationstringRequired

All User APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

x-authenticated-user-tokenstringRequired

The token/key used to execute the API

Responses
200
OK ! Successful operation."get specific page resources" operation was successfully executed.
application/json
Responseall of

Page Read Response

and
get
GET /api/data/v1/page/read/{pageName} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: text
X-msgid: text
ts: text
x-authenticated-user-token: text
Accept: */*
{
  "id": "api.page.read.Course",
  "ver": "v1",
  "ts": "2020-12-14 10:30:12:868+0000",
  "params": {
    "resmsgid": null,
    "msgid": "829f92fa-ef96-4250-a9b2-1a169e8ff59d",
    "err": null,
    "status": "success",
    "errmsg": null,
    "responseCode": "OK"
  },
  "result": {
    "page": {
      "name": "Course",
      "id": 1228382478150860800,
      "portalSections": {
        "display": "{\"name\":{\"en\":\"Latest Courses\"}}",
        "alt": null,
        "description": null,
        "index": 1,
        "sectionDataType": "course",
        "imgUrl": null,
        "searchQuery": "{\"request\":{\"filters\":{\"contentType\":[\"Course\"],\"objectType\":[\"Content\"],\"status\":[\"Live\"]},\"sort_by\":{\"lastPublishedOn\":\"desc\"},\"limit\":10}}",
        "name": "Latest Courses",
        "id": 1228382278062080000,
        "dynamicFilters": null,
        "dataSource": null,
        "status": 1,
        "group": 1
      },
      "appSections": {
        "display": "{\"name\":{\"en\":\"Latest Courses\",\"hi\":\"????????\"}}",
        "alt": null,
        "description": null,
        "index": 1,
        "sectionDataType": "course",
        "imgUrl": null,
        "searchQuery": "{\"request\":{\"filters\":{\"contentType\":[\"Course\"],\"objectType\":[\"Content\"],\"status\":[\"Live\"]},\"sort_by\":{\"lastPublishedOn\":\"desc\"},\"limit\":10}}",
        "name": "Latest Courses",
        "id": 1228382278062080000,
        "dynamicFilters": null,
        "dataSource": null,
        "status": 1,
        "group": 1
      }
    }
  }
}

Create Page Section

post

This API is associated with creating a new section on a page.

  • The endpoint for Create Page Section is /section/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • Application/json
X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

tsstringRequired

Time Stamp at which create section request was sent.

AuthorizationstringRequired

All User APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

x-authenticated-user-tokenstringRequired

The token/key used to execute the API

Body
idstringRequiredExample: unique API ID
tsstringRequiredExample: 2013/10/15 16:16:39
paramsobjectRequired
Responses
200
OK ! Successful operation."create section" operation was successfully executed.
application/json
Responseall of

Create Content Response

and
post
POST /api/data/v1/page/section/create HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: application/json
X-msgid: text
ts: text
x-authenticated-user-token: text
Accept: */*
Content-Length: 335

{
  "id": "unique API ID",
  "ts": "2013/10/15 16:16:39",
  "params": {},
  "request": {
    "name": "Recommended TextBook",
    "searchQuery": {
      "request": {
        "query": "",
        "filters": {
          "language": [
            "English"
          ],
          "contentType": [
            "TextBook"
          ]
        },
        "limit": 10,
        "sort_by": {
          "lastUpdatedOn": "desc"
        }
      }
    },
    "sectionDataType": "course",
    "display": {
      "name": {
        "en": "popular story",
        "hi": "????????"
      }
    }
  }
}
{
  "id": "api.page.section.create",
  "ver": "v1",
  "ts": "1606196636922",
  "params": {
    "resmsgid": "null,",
    "msgid": "a4b7041c-2d42-43e8-81d2-d3f3b6fbeccf",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS",
    "pageId": 131735539027230720
  }
}

Update Page Section

patch

This API is associated with updating content of a section on a page.

  • The endpoint for Update Page Section is /section/update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • Application/json
  • Multipart/form-data
  • Application/x-www-form-urlencoded
X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

tsstringRequired

Time Stamp at which updating page section request was sent.

AuthorizationstringRequired

All User APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

x-authenticated-user-tokenstringRequired

The token/key used to execute the API

Body
idstringRequiredExample: unique API ID
tsstringRequiredExample: 2013/10/15 16:16:39
paramsobjectRequired
Responses
200
OK ! Successful operation."create section" operation was successfully executed.
application/json
Responseall of

Create Content Response

and
patch
PATCH /api/data/v1/page/section/update HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: application/json
X-msgid: text
ts: text
x-authenticated-user-token: text
Accept: */*
Content-Length: 389

{
  "example": {
    "request": {
      "id": 1269259447543398400,
      "name": "Linked Content",
      "searchQuery": {
        "request": {
          "facets": [
            "medium"
          ],
          "filters": {
            "primaryCategory": [
              "Course"
            ],
            "mimeType": [
              "application/vnd.ekstep.content-collection"
            ],
            "status": [
              "Live"
            ],
            "compatibilityLevel": {
              "max": 4,
              "min": 1
            }
          },
          "mode": "collection",
          "limit": 10,
          "sort_by": {
            "lastUpdatedOn": "desc"
          }
        }
      },
      "display": {
        "name": null,
        "en": "Linked Content"
      }
    }
  }
}
{
  "id": "api.page.section.update",
  "ver": "v1",
  "ts": "1606196636922",
  "params": {
    "resmsgid": "null,",
    "msgid": "a4b7041c-2d42-43e8-81d2-d3f3b6fbeccf",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS",
    "pageId": 131735539027230720
  }
}

Fetch Section Details by Id

get

This API is associated with fetching specific section details.

  • The endpoint for Fetch Section Details by Id is /section/read/{sectionId}
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Path parameters
SectionIdstringRequired

Please append a valid Section Id to the request URL

Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • Application/json
  • Multipart/form-data
  • Application/x-www-form-urlencoded
X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

tsstringRequired

Time Stamp at which Fetch Section Details request was sent.

AuthorizationstringRequired

All User APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

x-authenticated-user-tokenstringRequired

The token/key used to execute the API

Responses
200
OK ! Successful operation."fetching section details" operation was successfully executed.
application/json
Responseall of

Create Content Response

and
get
GET /api/data/v1/page/section/read/{SectionId} HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: text
X-msgid: text
ts: text
x-authenticated-user-token: text
Accept: */*
{
  "id": "api.page.section.read",
  "ver": "v1",
  "ts": "2020-12-16 08:33:54:060+0000",
  "params": {
    "resmsgid": null,
    "msgid": "5d809eaf-525b-4f96-b3f1-798636b55ecf",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "section": {
      "updatedBy": null,
      "display": "{\"name\":{\"en\":\"Ongoing Courses\"}}",
      "alt": null,
      "description": null,
      "updatedDate": null,
      "sectionDataType": "coursebatch",
      "imgUrl": null,
      "createdDate": null,
      "createdBy": null,
      "searchQuery": "{\"request\":{\"query\":\"\",\"filters\":{\"status\":\"1\"},\"limit\":10,\"sort_by\":{\"createdDate\":\"desc\"}}}",
      "name": "Ongoing Course",
      "id": 127029938411765760,
      "dynamicFilters": null,
      "dataSource": "batch",
      "status": 1
    }
  }
}

Fetch Page Settings

get

This API is associated with fetching the settings of a page.

  • The endpoint for Fetch Page Settings is /section/list
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource. Possible media types can be:-

  • Application/json
  • Multipart/form-data
  • Application/x-www-form-urlencoded
X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

tsstringRequired

Time Stamp at which fetch settings request was sent.

AuthorizationstringRequired

All User APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

x-authenticated-user-tokenstringRequired

The token/key used to execute the API

Responses
200
OK ! Successful operation."fetch settings" operation was successfully executed.
application/json
Responseall of

Create Content Response

and
get
GET /api/data/v1/page/section/list HTTP/1.1
Host: staging.open-sunbird.org
Authorization: text
Content-Type: text
X-msgid: text
ts: text
x-authenticated-user-token: text
Accept: */*
{
  "id": "api.page.section.list",
  "ver": "v1",
  "ts": "2020-12-16 08:45:22:994+0000",
  "params": {
    "resmsgid": null,
    "msgid": "04c00561-c3af-46a9-924d-ab891e1b62a8",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": [
      {
        "display": "{\"name\":{\"en\":\"Latest Courses\"}}",
        "alt": null,
        "description": null,
        "sectionDataType": "ContentBrowser",
        "imgUrl": null,
        "searchQuery": "{\"request\":{\"filters\":{\"contentType\":[\"Course\"],\"objectType\":[\"Content\"],\"status\":[\"Live\"]},\"sort_by\":{\"lastPublishedOn\":\"desc\"},\"limit\":10}}",
        "name": "Latest Courses",
        "id": 131191751772733440,
        "dynamicFilters": null,
        "dataSource": null,
        "status": 1
      },
      {
        "display": "{\"name\":{\"en\":\"NCC\"}}",
        "alt": null,
        "description": null,
        "sectionDataType": "Content",
        "imgUrl": null,
        "searchQuery": "{\"request\":{\"filters\":{\"contentType\":[\"Course\"],\"status\":[\"Live\"],\"objectType\":[\"Content\"],\"createdFor\":[\"0129902071599595522\"],\"subject\":[\"NCC\"]},\"sort_by\":{\"lastPublishedOn\":\"desc\"},\"limit\":10}}",
        "name": "NCC",
        "id": 129916933832212480,
        "dynamicFilters": null,
        "dataSource": null,
        "status": 1
      }
    ]
  }
}

{host}/v1/jobrequest/submit

post

This API will internally call ‘/dataset/v1/request/submit’ API in SB-Obsrv ‘On Demand Data Exhaust API’, to submit the on demand exhaust job request. The job status will be in the submitted state. 

  • This API should encrypt the password using auto generated encryption key and pass it in the exhaust API request if the security level is L2 or L3. 
  • L1 and L4 do not need encryption keys. 
  • Fetch the security level using tenant preference APIs to check this.
  • Configure the exhaust api base url and endpoints.
Header parameters
x-authenticated-user-tokenstringOptional

User token

Example: {{auth_token}}
AuthorizationstringOptional

API key

Example: {{kong_api_key}}
Content-TypestringOptionalExample: application/json
x-channel-idstringOptional

Organisation id of the requestor

Example: {{organisation_id}}
x-authenticated-useridstringOptional

UserId of the requester - ORG_ADMIN, COURSE_MENTOR

Example: {{requested_user_id}}
Body
objectOptionalExample: {"request":{"tag":"do_2137002173427875841205_01370023185341644821","requestedBy":"fca2925f-1eee-4654-9177-fece3fd6afc9","dataset":"response-exhaust","datasetConfig":{"batchId":"01370023185341644821"},"output_format":"csv","encryptionKey":"encryption-keyencryption-keyencryption-keyencryption-keyencryption-key"}}
Responses
200
Successful response
application/json
post
POST /api/course/v1/jobrequest/submit HTTP/1.1
Host: {{host}}
Content-Type: application/json
Accept: */*
Content-Length: 312

{
  "request": {
    "tag": "do_2137002173427875841205_01370023185341644821",
    "requestedBy": "fca2925f-1eee-4654-9177-fece3fd6afc9",
    "dataset": "response-exhaust",
    "datasetConfig": {
      "batchId": "01370023185341644821"
    },
    "output_format": "csv",
    "encryptionKey": "encryption-keyencryption-keyencryption-keyencryption-keyencryption-key"
  }
}
200

Successful response

No content

{host}/v1/jobrequest/list

get

This API will internally call ‘/dataset/v1/request/list API in Obsrv ‘On Demand Data Exhaust API’, to list all the requests that are specific to a tag

Path parameters
tagstringRequired
Header parameters
x-authenticated-user-tokenstringOptional

User token

Example: {{auth_token}}
AuthorizationstringOptional

API Key

Example: {{kong_api_key}}
Content-TypestringOptionalExample: application/json
x-channel-idstringOptional

Organisation id of the requestor

Example: {{organisation_id}}
x-authenticated-useridstringOptional

UserId of the requester - ORG_ADMIN, COURSE_MENTOR

Example: {{requested_user_id}}
Responses
200
Successful response
application/json
get
GET /api/course/v1/jobrequest/list/{tag} HTTP/1.1
Host: {{host}}
Accept: */*
200

Successful response

No content

Last updated

Was this helpful?