Purpose: To get the Section List and Data

Endpoint:

GET /sections

Request Details

Request URL:

https://{firebase_id}.cloudfunctions.net/fincurious_cloudAPI/sections?moduleId={module_id}&chapterId={chapter_id}

Header:

client-id:client123
client-secret: secret123

Possible operation types:

READ : Get Section List and Data

Response JSON Keys



Section Id string

Represents the Section Id/Name



Title string

Represents the Title of Chapter


InnerHTML string

Represents the InnerHTML of Chapter

Possible Errors



INVALID_URL_PATTERN HTTP 404

Please check if the URL trying to access is a correct one
Resolution The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above



CREDENTIAL_MISMATCH HTTP 401

Unauthorized
Resolution The User doesn't have permission to access the data



INTERNAL_ERROR HTTP 500

Internal Server Error
Resolution Unexpected and unhandled exception in the server. Contact support team



INVALID_REQUEST_METHOD HTTP 400

The http request method type is not a valid one
Resolution You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.

Sample Request

curl -X GET
"https://{firebase_id}.cloudfunctions.net/fincurious_cloudAPI/sections?moduleId={module_id}&chapterId={chapter_id}
"
\
-H "client-id: client123" \
-H "client-secret: secret123"

                    

Sample Response


[
{
"id": "Assignment 1",
"createdBy": "inpatfacultytrainer@gmail.com",
"created": {
"_seconds": 1692702371,
"_nanoseconds": 272000000
},
"title": "Assignment 1",
"pushedBy": "ganeshshetty@fincurious.com",
"pushed": {
"_seconds": 1701138330,
"_nanoseconds": 238000000
},
"index": 7,
"scripts": "document.getElementById('n13QUXzuEb3text').style.color = 'red' : null;\n",
"InnerHTML": "document.getElementById('n13QUXzuEb3text').style.color = 'red' : null;\n"
}
]