Dockingjudge docs

Solution service 0.0.1

Solution service docs


Servers

Description URL
/ /

Endpoints


GET /api/v1/solutions/my

GetMySolutions

Input parameters

Parameter In Type Default Nullable Description
jwt_auth header string N/A No API key

Response 200 OK

[
    {
        "id": "string",
        "task_id": 0,
        "task_type": "quiz",
        "user_id": 0,
        "score": 0,
        "short_verdict": "string",
        "submitted_at": "2022-04-13T15:42:05.901Z",
        "data": null
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "$ref": "#/components/schemas/SolutionSchema"
    },
    "type": "array"
}

GET /api/v1/solutions/my/{task_type}/{task_id}

GetMySolutionsForTask

Input parameters

Parameter In Type Default Nullable Description
jwt_auth header string N/A No API key
task_id path integer No
task_type path string No

Response 200 OK

[
    {
        "id": "string",
        "task_id": 0,
        "task_type": "quiz",
        "user_id": 0,
        "score": 0,
        "short_verdict": "string",
        "submitted_at": "2022-04-13T15:42:05.901Z",
        "data": null
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "$ref": "#/components/schemas/SolutionSchema"
    },
    "type": "array"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

GET /api/v1/solutions/score

GetScoreForTasks

Input parameters

Parameter In Type Default Nullable Description
jwt_auth header string N/A No API key
tasks query array No

Response 200 OK

[
    null
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "oneOf": [
            {
                "$ref": "#/components/schemas/SolutionSchema"
            },
            {
                "type": "null"
            }
        ]
    },
    "type": "array"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

GET /api/v1/solutions/{solution_uid}

GetSolution

Input parameters

Parameter In Type Default Nullable Description
jwt_auth header string N/A No API key
solution_uid path string No Solution ID

Response 200 OK

{
    "id": "string",
    "task_id": 0,
    "task_type": "quiz",
    "user_id": 0,
    "score": 0,
    "short_verdict": "string",
    "submitted_at": "2022-04-13T15:42:05.901Z",
    "data": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string"
        },
        "task_id": {
            "type": "integer"
        },
        "task_type": {
            "$ref": "#/components/schemas/TaskType"
        },
        "user_id": {
            "type": "integer"
        },
        "score": {
            "type": "integer"
        },
        "short_verdict": {
            "type": "string"
        },
        "submitted_at": {
            "type": "string",
            "format": "date-time"
        },
        "data": {
            "oneOf": [
                {
                    "$ref": "#/components/schemas/QuizSolutionExtraSchema"
                },
                {
                    "$ref": "#/components/schemas/CodeSolutionExtraSchema"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "id",
        "score",
        "short_verdict",
        "submitted_at",
        "task_id",
        "task_type",
        "user_id"
    ],
    "title": "SolutionSchema"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

GET /api/v1/solutions/standings/{contest_id}

GetStandings

Input parameters

Parameter In Type Default Nullable Description
jwt_auth header string N/A No API key
contest_id path integer No

Response 200 OK

{
    "tasks": [
        []
    ],
    "table": [
        {
            "user": {
                "id": 0,
                "username": "string",
                "profile_pic": null,
                "roles": [
                    "string"
                ]
            },
            "tasks_attempted": 0,
            "tasks_solved": 0,
            "solutions": [
                null
            ],
            "total_score": 0
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "tasks": {
            "items": {
                "prefixItems": [
                    {
                        "$ref": "#/components/schemas/TaskType"
                    },
                    {
                        "type": "integer"
                    },
                    {
                        "type": "string"
                    }
                ],
                "type": "array"
            },
            "type": "array"
        },
        "table": {
            "items": {
                "$ref": "#/components/schemas/UserStandingsRowSchema"
            },
            "type": "array"
        }
    },
    "type": "object",
    "required": [
        "table",
        "tasks"
    ],
    "title": "StandingsSchema"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

POST /api/v1/solutions/post/code/{task_id}

PostCodeSolution

Input parameters

Parameter In Type Default Nullable Description
jwt_auth header string N/A No API key
task_id path integer No

Request body

{
    "compiler": "string",
    "submission_type": "str",
    "text": "string",
    "main_file": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "compiler": {
            "type": "string"
        },
        "submission_type": {
            "$ref": "#/components/schemas/SubmissionType"
        },
        "text": {
            "type": "string"
        },
        "main_file": {
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "compiler",
        "submission_type",
        "text"
    ],
    "title": "PostCodeSolutionSchema"
}

Response 201 Created

{
    "id": "string",
    "task_id": 0,
    "task_type": "quiz",
    "user_id": 0,
    "score": 0,
    "short_verdict": "string",
    "submitted_at": "2022-04-13T15:42:05.901Z",
    "data": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string"
        },
        "task_id": {
            "type": "integer"
        },
        "task_type": {
            "$ref": "#/components/schemas/TaskType"
        },
        "user_id": {
            "type": "integer"
        },
        "score": {
            "type": "integer"
        },
        "short_verdict": {
            "type": "string"
        },
        "submitted_at": {
            "type": "string",
            "format": "date-time"
        },
        "data": {
            "oneOf": [
                {
                    "$ref": "#/components/schemas/QuizSolutionExtraSchema"
                },
                {
                    "$ref": "#/components/schemas/CodeSolutionExtraSchema"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "id",
        "score",
        "short_verdict",
        "submitted_at",
        "task_id",
        "task_type",
        "user_id"
    ],
    "title": "SolutionSchema"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

POST /api/v1/solutions/post/quiz/{task_id}

PostQuizSolution

Input parameters

Parameter In Type Default Nullable Description
jwt_auth header string N/A No API key
task_id path integer No

Request body

{
    "text": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "text": {
            "type": "string"
        }
    },
    "type": "object",
    "required": [
        "text"
    ],
    "title": "PostQuizSolutionSchema"
}

Response 201 Created

{
    "id": "string",
    "task_id": 0,
    "task_type": "quiz",
    "user_id": 0,
    "score": 0,
    "short_verdict": "string",
    "submitted_at": "2022-04-13T15:42:05.901Z",
    "data": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string"
        },
        "task_id": {
            "type": "integer"
        },
        "task_type": {
            "$ref": "#/components/schemas/TaskType"
        },
        "user_id": {
            "type": "integer"
        },
        "score": {
            "type": "integer"
        },
        "short_verdict": {
            "type": "string"
        },
        "submitted_at": {
            "type": "string",
            "format": "date-time"
        },
        "data": {
            "oneOf": [
                {
                    "$ref": "#/components/schemas/QuizSolutionExtraSchema"
                },
                {
                    "$ref": "#/components/schemas/CodeSolutionExtraSchema"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "id",
        "score",
        "short_verdict",
        "submitted_at",
        "task_id",
        "task_type",
        "user_id"
    ],
    "title": "SolutionSchema"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

GET /api/v1/solutions/ping

Ping

Response 200 OK

"string"
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "string"
}

GET /metrics

Get

Response 200 OK

Schema of the response body


Schemas

CodeSolutionExtraSchema

Name Type
compiler string
detailed_verdict string
group_scores
submission_url string

PostCodeSolutionSchema

Name Type
compiler string
main_file
submission_type SubmissionType
text string

PostQuizSolutionSchema

Name Type
text string

QuizSolutionExtraSchema

Name Type
submitted_answer string

SolutionSchema

Name Type
data
id string
score integer
short_verdict string
submitted_at string(date-time)
task_id integer
task_type TaskType
user_id integer

StandingsSchema

Name Type
table Array<UserStandingsRowSchema>
tasks Array<Array<>>

SubmissionType

Type: string

TaskType

Type: string

UserSchema

Name Type
id integer
profile_pic
roles Array<string>
username string

UserSolutionScore

Name Type
score integer
short_verdict string
task_id integer
task_type TaskType
user_id integer

UserStandingsRowSchema

Name Type
solutions Array<>
tasks_attempted integer
tasks_solved integer
total_score integer
user UserSchema

Security schemes

Name Type Scheme Description
jwt_auth apiKey
search