Last active
November 29, 2019 09:20
-
-
Save Rishabh04-021/2cdacf470068ef04b70cfa2968fa5d19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swagger: '2.0' | |
| info: | |
| description: This is a simple API for ESamwad | |
| version: 1.0.0 | |
| title: Simple ESamwad API | |
| # put the contact info for your development or API team | |
| contact: | |
| email: [email protected] | |
| license: | |
| name: Apache 2.0 | |
| url: http://www.apache.org/licenses/LICENSE-2.0.html | |
| # tags are used for organizing operations | |
| tags: | |
| - name: developers | |
| description: Operations available for the APP | |
| # Path for data fetching ['GET'] and ['POST'] API's | |
| paths: | |
| /<token>/<assessment_code>/<class_code>/<subject>: | |
| get: | |
| tags: | |
| - developers | |
| summary: Grade level data collection | |
| operationId: gradeLevelDataCollection | |
| description: This API will return the list of students and then the teacher will submit their respective grades. This api will fetch assessment_code and class_code data from assessment_lomaster table and on the basis of these two it’ll fetch the student_code and student_name from student_master table. This teacher submission will be returned on the following POST request. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: assessment_code | |
| description: pass assessment code | |
| required: true | |
| type: string | |
| - in: query | |
| name: class_code | |
| description: pass class code | |
| required: true | |
| type: string | |
| - in: query | |
| name: subject | |
| description: pass the subject name | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| $ref: '#/definitions/gradeLevelDataCollectionMultiple' | |
| 400: | |
| description: bad input parameter | |
| /question-cutoff/<token>/<class_code>/<subject>/<question_code>: | |
| get: | |
| tags: | |
| - developers | |
| summary: Question wise cutoff fetching | |
| operationId: questionWiseCutoffFetching | |
| description: This will be used to fetch the question wise cutoff based on the question_code, class_code and subject from questions_master table . The teacher will submit the question wise number of students who are above the cut-off (cutoff_cleared_count) and the response will be received by the following API. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: class_code | |
| description: pass class code | |
| required: true | |
| type: string | |
| - in: query | |
| name: subject | |
| description: pass subject name | |
| required: true | |
| type: string | |
| - in: query | |
| name: question_code | |
| description: pass the question code | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| $ref: '#/definitions/questionWiseCutoffFetchingMultiple' | |
| 400: | |
| description: bad input parameter | |
| /lodetails/<token>: | |
| get: | |
| tags: | |
| - developers | |
| summary: LO based data fetching | |
| operationId: loCodeFetching | |
| description: This will be used to fetch the lo based details (lo_code) from lo_master table. All the fetched lo’s will be displayed to the teacher and then the teacher will enter how many students understand a particular lo. Once the teacher fills and submits the details, they will be saved using the same route via a POST request. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: lo_code | |
| description: it'll return the lo code | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| $ref: '#/definitions/loCodeFetchingMultiple' | |
| 400: | |
| description: bad input parameter | |
| /<token>/<sms_template_code>: | |
| get: | |
| tags: | |
| - developers | |
| summary: SMS templates fetching | |
| operationId: smsCodeFetching | |
| description: This will fetch the data associated with the template from the sms_templates table. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: sms_template_code | |
| description: pass the template code | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/smsCodeFetching' | |
| 400: | |
| description: bad input parameter | |
| /cutoffbased/<token>/<assessment_code>/<class_code>/<subject>: | |
| get: | |
| tags: | |
| - developers | |
| summary: Submitted data fetching | |
| operationId: cutoffBased | |
| description: This will fetch the cutoff_cleared_count based on the data from school_assessment table. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: assessment_code | |
| description: pass assessment code | |
| required: true | |
| type: string | |
| - in: query | |
| name: class_code | |
| description: pass class code | |
| required: true | |
| type: string | |
| - in: query | |
| name: subject | |
| description: pass the subject name | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/cutoffBased' | |
| 400: | |
| description: bad input parameter | |
| /lobased/<token>/<assessment_code>/<class_code>/<subject>: | |
| get: | |
| tags: | |
| - developers | |
| summary: Submitted data fetching | |
| operationId: loBased | |
| description: This will fetch the lo_understanding_count based on the data from school_assessment table. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: assessment_code | |
| description: pass assessment code | |
| required: true | |
| type: string | |
| - in: query | |
| name: class_code | |
| description: pass class code | |
| required: true | |
| type: string | |
| - in: query | |
| name: subject | |
| description: pass the subject name | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/loBased' | |
| 400: | |
| description: bad input parameter | |
| /gradestatus/<token>/<assessment_code>/<class_code>/<subject>: | |
| get: | |
| tags: | |
| - developers | |
| summary: Check grade completion status | |
| operationId: gradeStatus | |
| description: This will fetch the count of students in the class from students_master table and will fetch the count of students whose grade has been submitted for a particular subject and assessment_code from the student_assessment table. It’ll return both of these values and the app can calculate the progress and status on the basis of these. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: assessment_code | |
| description: pass assessment code | |
| required: true | |
| type: string | |
| - in: query | |
| name: class_code | |
| description: pass class code | |
| required: true | |
| type: string | |
| - in: query | |
| name: subject | |
| description: pass the subject name | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/gradeStatus' | |
| 400: | |
| description: bad input parameter | |
| /submit-assessment: | |
| post: | |
| tags: | |
| - developers | |
| summary: Response of Grade level data collection | |
| operationId: submitAssessment | |
| description: This will fetch the count of students in the class from students_master table and will fetch the count of students whose grade has been submitted for a particular subject and assessment_code from the student_assessment table. It’ll return both of these values and the app can calculate the progress and status on the basis of these. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: student_code | |
| description: pass the student code | |
| required: true | |
| type: string | |
| - in: query | |
| name: grade | |
| description: pass the grade | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/submitAssessment' | |
| 400: | |
| description: bad input parameter | |
| /question-cutoff: | |
| post: | |
| tags: | |
| - developers | |
| summary: Response of Question wise cutoff | |
| operationId: submitQuestionWise | |
| description: The json response will have a list of the responses and will be saved in school_assessment table. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: class_code | |
| description: pass the class code | |
| required: true | |
| type: string | |
| - in: query | |
| name: subject | |
| description: pass the subject name | |
| required: true | |
| type: string | |
| - in: query | |
| name: question_code | |
| description: pass the question code | |
| required: true | |
| type: string | |
| - in: query | |
| name: cutoff_cleared_count | |
| description: pass the count of cutoff clearing students | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/submitQuestionWise' | |
| 400: | |
| description: bad input parameter | |
| /lodetails: | |
| post: | |
| tags: | |
| - developers | |
| summary: Response of LO based data | |
| operationId: submitLoWise | |
| description: This will receive the request submitted by the teacher for lo based questions i.e. how many students understand a particular lo. The json response will have a list of the responses and will be saved in school_assessment. | |
| produces: | |
| - application/json | |
| parameters: | |
| - in: query | |
| name: token | |
| description: pass the authentication token | |
| required: true | |
| type: string | |
| - in: query | |
| name: lo_code | |
| description: pass the class code | |
| required: true | |
| type: string | |
| - in: query | |
| name: lo_understanding_count | |
| description: pass the subject name | |
| required: true | |
| type: string | |
| responses: | |
| 200: | |
| description: search results matching criteria | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/submitLoWise' | |
| 400: | |
| description: bad input parameter | |
| definitions: | |
| gradeLevelDataCollectionMultiple: | |
| type: object | |
| items: | |
| $ref: '#/definitions/gradeLevelDataCollectionMultiple' | |
| example: | |
| - students: | |
| - code: 12436748376B21 | |
| name: Student Singh | |
| - code: 48392856846B20 | |
| name: Student Kumar | |
| - code: 12436748376B26 | |
| name: Student Singh | |
| - code: 48392856846B23 | |
| name: Student Kumar | |
| questionWiseCutoffFetchingMultiple: | |
| type: object | |
| items: | |
| $ref: '#/definitions/questionWiseCutoffFetchingMultiple' | |
| example: | |
| - questions: | |
| - code: FA101 | |
| detail: What is the name of the highest peak in the world? | |
| cutoff: 3 | |
| - code: FA101 | |
| detail: What is the name of the highest peak in the world? | |
| cutoff: 3 | |
| - code: FA101 | |
| detail: What is the name of the highest peak in the world? | |
| cutoff: 3 | |
| loCodeFetchingMultiple: | |
| type: object | |
| items: | |
| $ref: '#/definitions/loCodeFetchingMultiple' | |
| example: | |
| - lo_details: | |
| - code: M101 | |
| name: This is lo name | |
| - code: M102 | |
| name: Another lo name | |
| - code: M103 | |
| name: Other name here | |
| smsCodeFetching: | |
| type: object | |
| required: | |
| - sms_data | |
| properties: | |
| sms_data: | |
| type: string | |
| example: This is a sample template where student name is <<name>> | |
| cutoffBased: | |
| type: object | |
| required: | |
| - cutoff_cleared_count | |
| properties: | |
| cutoff_cleared_count: | |
| type: integer | |
| example: 32 | |
| loBased: | |
| type: object | |
| required: | |
| - lo_understanding_count | |
| properties: | |
| lo_understanding_count: | |
| type: integer | |
| example: 23 | |
| gradeStatus: | |
| type: object | |
| required: | |
| - total_students | |
| - grade_submitted | |
| - assessment_code | |
| properties: | |
| total_students: | |
| type: integer | |
| example: 48 | |
| grade_submitted: | |
| type: integer | |
| example: 34 | |
| assessment_code: | |
| type: string | |
| example: FA1244 | |
| submitAssessment: | |
| type: object | |
| required: | |
| - status | |
| properties: | |
| status: | |
| type: string | |
| example: submitted | |
| submitQuestionWise: | |
| type: object | |
| required: | |
| - status | |
| properties: | |
| status: | |
| type: string | |
| example: submitted | |
| submitLoWise: | |
| type: object | |
| required: | |
| - status | |
| properties: | |
| status: | |
| type: string | |
| example: submitted | |
| # Added by API Auto Mocking Plugin | |
| host: virtserver.swaggerhub.com | |
| basePath: /Rishabh04-021/esamwadAPI/1.0.0 | |
| schemes: | |
| - https | |
| - http |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment