Code Monkey home page Code Monkey logo

exam-system-api's Introduction

EXAM SYSTEM ENDPOINTS

Question category

Create Question Category [Post api/question-category/create]

Header

Content-type: application/json

Body

        {
            description: String
        }
    

Get All Question Categories [Get api/question-category/]

Response

        {
            _id: ObjectId
            description: String
        }
    

Update Question Category [Put api/question-category/update/:categoryId]

Header

Content-type: application/json

Body

        {
            description: String
        }
    

Delete Question Category [Delete api/question-category/delete/:categoryId]

Response

        {
            message: "Deleted",
            success: true
        }
    

Create Questions [Post api/question/create]

Header

Content-type: application/json

Body

        [{
            category: ObjectId,
            type: ["SINGLE CHOICE", "MULTI CHOICE", "FILL IN THE GAPS"],
            instruction: String,
            text: String,
            options: [String],
            answer: [String]
        }]
    

Get All Questions [Get api/question/]

Response

        {
            _id: ObjectId,
            category: {
                _id: ObjectId
                description: String
            },
            type: String,
            instruction: String,
            text: String,
            options: [String],
            answer: [String]
        }
    

Update Question [Put api/question/update/:questionId]

Header

Content-type: application/json

Body

        {
            category: ObjectId,
            type: ["SINGLE CHOICE", "MULTI CHOICE", "FILL IN THE GAPS"],
            instruction: String,
            text: String,
            options: [String],
            answer: [String]
        }
    

Delete Question [Delete api/question/delete/:questionId]

Response

        {
            message: "Deleted",
            success: true
        }
    

Create User [Post api/users/]

Header

Content-type: application/json

Body

        {
            name: String,
            email: String,
            password: String,
            role: ["user","admin"],
        }
    

Get All Users [Get api/users/]

Response

        {
            _id: ObjectId,
            name: String,
            email: String,
            password: String,
            role: String,
            isActive: Boolean,
            isVerified: Boolean
        }
    

Create Assessment [Post api/assessment/create]

Header

Content-type: application/json

Body

        {
            title: String,
            description: String,
            duration: Number,
            numberOfQuestion: Number,
            totalMark: Number,
            dateTime: Date,
            questionBank: [ObjectId]          
        }
    

Get All Assessments [Get api/assessment/]

Response

        {
            _id: ObjectId,
            title: String,
            description: String,
            duration: Number,
            numberOfQuestion: Number,
            totalMark: Number,
            markPerQuestion: Number,
            dateTime: Date,
            questionBank: [{
                _id: ObjectId,
                description: String
            }]     
        }
    

Update Assessment [Put api/assessment/update/:assessmentId]

Header

Content-type: application/json

Body

        {
            title: String,
            description: String,
            duration: Number,
            numberOfQuestion: Number,
            totalMark: Number,
            dateTime: Date,
            questionBank: [ObjectId]          
        }
    

Delete Assessment [Delete api/assessment/delete/:assessmentId]

Response

        {
            message: "Deleted",
            success: true
        }
    

Prepare Assessments For User [Get api/assessment/prepare/:userId/:assessmentId]

Response

        {
            _id: ObjectId,
            user: {
                 _id: ObjectId,
                name: String,
                email: String,
                password: String,
                role: String,
                isActive: Boolean,
                isVerified: Boolean
            },
            assessment: {
                _id: ObjectId,
                title: String,
                description: String,
                duration: Number,
                numberOfQuestion: Number,
                totalMark: Number,
                markPerQuestion: Number,
                dateTime: Date,
                questionBank: [{
                    _id: ObjectId,
                    description: String
                }]     
            },
            mark: Number,
            assessmentScript: [{
                question: {
                    _id: ObjectId,
                    category: {
                        _id: ObjectId,
                        description: String
                    },
                    type: String,
                    instruction: String,
                    text: String,
                    options: [String],
                    answer: [String]
                },
                choice: [String],
                isCorrect: Boolean,
                markGotten: Number
            }]
        }
    

Submit Assessments For User [Post api/assessment/submit/:userId/:assessmentId]

Header

Content-type: application/json

Body

            [{
                question: {
                    _id: ObjectId,
                    category: {
                        _id: ObjectId,
                        description: String
                    },
                    type: String,
                    instruction: String,
                    text: String,
                    options: [String],
                    answer: [String]
                },
                choice: [String],
            }]
    

Response

        {
            _id: ObjectId,
            user: {
                 _id: ObjectId,
                name: String,
                email: String,
                password: String,
                role: String,
                isActive: Boolean,
                isVerified: Boolean
            },
            assessment: {
                _id: ObjectId,
                title: String,
                description: String,
                duration: Number,
                numberOfQuestion: Number,
                totalMark: Number,
                markPerQuestion: Number,
                dateTime: Date,
                questionBank: [{
                    _id: ObjectId,
                    description: String
                }]     
            },
            mark: Number,
            assessmentScript: [{
                question: {
                    _id: ObjectId,
                    category: {
                        _id: ObjectId,
                        description: String
                    },
                    type: String,
                    instruction: String,
                    text: String,
                    options: [String],
                    answer: [String]
                },
                choice: [String],
                isCorrect: Boolean,
                markGotten: Number
            }]
        }
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.