Download OpenAPI specification:Download
Documentation for interacting with the Fermion API
Create a new live event session that you can use to go live
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "eventTitle": "Untitled event",
- "estimatedStartAtIso": "2019-08-24T14:15:22Z",
- "estimatedEventDurationInMinutes": 15
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "liveEventId": "string",
- "liveEventSessionId": "string"
}
}
}
]
Create a new user in the system using the unique userId from your database. Note that this function is idempotent, therefore, calling it multiple times with the same userId will not do anything.
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "userId": "string",
- "profileDefaults": {
- "name": "string",
- "username": "string",
}
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": { }
}
}
]
Request DSA code execution. Batch run mode.
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "entries": [
- {
- "language": "C",
- "runConfig": {
- "customMatcherToUseForExpectedOutput": "ExactMatch",
- "expectedOutputAsBase64UrlEncoded": "string",
- "stdinStringAsBase64UrlEncoded": "string",
- "shouldEnablePerProcessAndThreadCpuTimeLimit": false,
- "shouldEnablePerProcessAndThreadMemoryLimit": false,
- "shouldAllowInternetAccess": false,
- "compilerFlagString": "",
- "maxFileSizeInKilobytesFilesCreatedOrModified": 1024,
- "stackSizeLimitInKilobytes": 65536,
- "cpuTimeLimitInMilliseconds": 2000,
- "wallTimeLimitInMilliseconds": 5000,
- "memoryLimitInKilobyte": 131072,
- "maxProcessesAndOrThreads": 60
}, - "sourceCodeAsBase64UrlEncoded": "string"
}
]
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "taskIds": [
- "string"
]
}
}
}
]
Request DSA code execution. Single run mode.
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "language": "C",
- "runConfig": {
- "customMatcherToUseForExpectedOutput": "ExactMatch",
- "expectedOutputAsBase64UrlEncoded": "string",
- "stdinStringAsBase64UrlEncoded": "string",
- "shouldEnablePerProcessAndThreadCpuTimeLimit": false,
- "shouldEnablePerProcessAndThreadMemoryLimit": false,
- "shouldAllowInternetAccess": false,
- "compilerFlagString": "",
- "maxFileSizeInKilobytesFilesCreatedOrModified": 1024,
- "stackSizeLimitInKilobytes": 65536,
- "cpuTimeLimitInMilliseconds": 2000,
- "wallTimeLimitInMilliseconds": 5000,
- "memoryLimitInKilobyte": 131072,
- "maxProcessesAndOrThreads": 60
}, - "sourceCodeAsBase64UrlEncoded": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "taskId": "string"
}
}
}
]
Get result of DSA code execution attempt
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "taskUniqueId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "taskUniqueId": "string",
- "sourceCodeAsBase64UrlEncoded": "string",
- "language": "C",
- "runConfig": {
- "customMatcherToUseForExpectedOutput": "ExactMatch",
- "expectedOutputAsBase64UrlEncoded": "string",
- "stdinStringAsBase64UrlEncoded": "string",
- "shouldEnablePerProcessAndThreadCpuTimeLimit": false,
- "shouldEnablePerProcessAndThreadMemoryLimit": false,
- "shouldAllowInternetAccess": false,
- "compilerFlagString": "",
- "maxFileSizeInKilobytesFilesCreatedOrModified": 1024,
- "stackSizeLimitInKilobytes": 65536,
- "cpuTimeLimitInMilliseconds": 2000,
- "wallTimeLimitInMilliseconds": 5000,
- "memoryLimitInKilobyte": 131072,
- "maxProcessesAndOrThreads": 60
}, - "codingTaskStatus": "Pending",
- "runResult": {
- "compilerOutputAfterCompilationBase64UrlEncoded": "string",
- "finishedAt": "2019-08-24T14:15:22Z",
- "runStatus": "compilation-error",
- "programRunData": {
- "cpuTimeUsedInMilliseconds": 0,
- "wallTimeUsedInMilliseconds": 0,
- "memoryUsedInKilobyte": 0,
- "exitSignal": 0,
- "exitCode": 0,
- "stdoutBase64UrlEncoded": "string",
- "stderrBase64UrlEncoded": "string"
}
}
}
}
}
]
Call this to end live event streaming and finalize the video. After you call this, the only possible playback mode with livestreaming would be HLS playback
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "liveEventSessionId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": { }
}
}
]
Get leaderboard of the top ranking users in your school
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "data": {
- "fermionSchoolId": "string",
- "period": "Today",
- "limit": 1
}
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "leaderboardUsers": [
- {
- "rank": 1,
- "xpTotal": 0,
- "xpDeltaInPeriod": 0,
- "fermionUserId": "string",
- "userCreatedAtIso": "2019-08-24T14:15:22Z",
- "name": "string",
- "username": "string",
}
]
}
}
}
]
Get price of a single course depending on the country of user requesting it
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "fermionCourseId": "string",
- "fermionSchoolId": "string",
- "discountCouponCode": "string",
- "userCountryHint": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "prices": [
- {
- "planType": "PartialPaymentPlan",
- "realFullPriceOfProductInLowestCurrencyUnitIrrespectiveOfTaxAndExclusiveOfDiscount": 0,
- "totalDiscountComponentValueInLowestCurrencyUnit": 0,
- "emiIntervalInDays": 180,
- "allInstallmentOptions": [
- {
- "eachInstallmentPaymentAmountInLowestCurrencyUnitExclusiveOfTaxAndDiscount": 0,
- "eachInstallmentPaymentAmountInLowestCurrencyUnitInclusiveOfDiscountButExclusiveOfTax": 0,
- "installmentCount": 1,
- "installmentPaymentScheduleInformation": [
- {
- "payByDate": null
}
]
}
], - "currencySymbol": "string",
- "currencyType": "Aud",
- "inrGstSpecificData": {
- "isAmountExclusiveOfGst": true,
- "additionalGstAmountInrPaise": 0
}, - "couponData": {
- "status": "ok",
- "discountCodeUsed": "string",
- "couponTypeSpecificData": {
- "type": "percent-off",
- "discountPercentOffApplied": 0
}, - "description": "string"
}
}
]
}
}
}
]
Get details of all published courses with this API
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "fermionSchoolId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "courses": [
- {
- "fermionCourseId": "string",
- "courseName": "string",
- "courseSlug": "string",
}
]
}
}
}
]
Get details of all published digital products with this API
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "fermionSchoolId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "products": [
- {
- "fermionDigitalProductId": "string",
- "type": "DownloadableProduct",
- "name": "string",
- "slug": "string",
}
]
}
}
}
]
Health check for our internal system. This is a placeholder API.
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": { }
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "hello": "world"
}
}
}
]
Get details of a lab from its ID
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "labId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "labTitle": "string",
- "labDescriptionMarkdown": "string",
- "labDescriptionHtml": "string"
}
}
}
]
Get result of a single user for a given lab
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "userId": "string",
- "labId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "challengeResult": {
- "isLabAttempted": true,
- "result": [
- {
- "challengeId": "string",
- "isChallengePassed": true,
- "challengeLabel": "string"
}
]
}
}
}
}
]
Get published course items for an individual course
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "fermionCourseId": "string",
- "fermionSchoolId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "response": {
- "courseType": "RecordedCourse",
- "courseItems": [
- {
- "courseItemId": "string",
- "sectionName": "string",
- "type": "Article",
- "articleTitle": "string"
}
]
}
}
}
}
]
Get a list of all labs from the school's private library
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "pageNumber": 1,
- "limit": 1
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "result": {
- "paginationMetadata": {
- "totalResultCount": 0,
- "totalPageCount": 0
}, - "labs": [
- {
- "labId": "string",
- "codingLabType": "Interactive",
- "title": "string"
}
]
}
}
}
}
]
Add or remove people from webrtc meeting stage. This will make the user a participant or instructor in a given live stream. Use this API to make certain user(s) instructors before the stream starts.
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "liveEventSessionId": "string",
- "userId": "string",
- "action": {
- "type": "add-to-webrtc-meeting"
}
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": { }
}
}
]
Call this to begin live event streaming. After you call this, your instructors can join the meeting area
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "liveEventSessionId": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": { }
}
}
]
Test function to check your fermion API key
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "message": "string"
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": {
- "message": "string"
}
}
}
]
Update user data like name, profile photo url, username, etc. using this resolver. Useful for using built-in services like coding labs and live classes
API Request Body
required | Array of objects | ||
Array
|
{- "data": [
- {
- "data": {
- "userId": "string",
- "newName": "string",
- "newUsername": "string",
}
}
]
}
[- {
- "output": {
- "status": "ok",
- "data": { }
}
}
]