Dockingjudge docs

Contest Service API 0.1.0

Contest Service of Dockingjudge


Contest management


GET /api/v1/contests/

Description

Get all contests or create new one.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token

Response 200 OK

[
    {
        "id": 0,
        "name": "string",
        "author": 0,
        "description": "string",
        "is_started": true,
        "is_ended": true,
        "time_limit_seconds": 0,
        "pages": 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
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/Contest"
    }
}

POST /api/v1/contests/

Description

Get all contests or create new one.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token

Request body

{
    "name": "string",
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 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 request body
{
    "type": "object",
    "description": "Contest creation serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    },
    "required": [
        "description",
        "name"
    ]
}

{
    "name": "string",
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 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 request body
{
    "type": "object",
    "description": "Contest creation serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    },
    "required": [
        "description",
        "name"
    ]
}

{
    "name": "string",
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 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 request body
{
    "type": "object",
    "description": "Contest creation serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    },
    "required": [
        "description",
        "name"
    ]
}

Response 201 Created

{
    "id": 0,
    "name": "string",
    "author": 0,
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 0,
    "pages": 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
{
    "type": "object",
    "description": "Serializer for Contest objects.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "author": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "pages": {}
    },
    "required": [
        "author",
        "description",
        "id",
        "name"
    ]
}

GET /api/v1/contests/{id}/

Description

Get, update or delete a contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
id path integer No

Response 200 OK

{
    "id": 0,
    "name": "string",
    "author": 0,
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 0,
    "pages": 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
{
    "type": "object",
    "description": "Serializer for Contest objects.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "author": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "pages": {}
    },
    "required": [
        "author",
        "description",
        "id",
        "name"
    ]
}

PATCH /api/v1/contests/{id}/

Description

Get, update or delete a contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
id path integer No

Request body

{
    "name": "string",
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 0,
    "pages": 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
{
    "type": "object",
    "description": "Contest patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "pages": {}
    }
}

{
    "name": "string",
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 0,
    "pages": 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
{
    "type": "object",
    "description": "Contest patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "pages": {}
    }
}

{
    "name": "string",
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 0,
    "pages": 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
{
    "type": "object",
    "description": "Contest patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "pages": {}
    }
}

Response 200 OK

{
    "id": 0,
    "name": "string",
    "author": 0,
    "description": "string",
    "is_started": true,
    "is_ended": true,
    "time_limit_seconds": 0,
    "pages": 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
{
    "type": "object",
    "description": "Serializer for Contest objects.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "author": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "description": {
            "type": "string"
        },
        "is_started": {
            "type": "boolean"
        },
        "is_ended": {
            "type": "boolean"
        },
        "time_limit_seconds": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "pages": {}
    },
    "required": [
        "author",
        "description",
        "id",
        "name"
    ]
}

DELETE /api/v1/contests/{id}/

Description

Delete contest and notify other services.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
id path integer No

Response 204 No Content


GET /api/v1/contests/compilers/

Description

List available compilers.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token

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": "array",
    "items": {
        "type": "array",
        "items": {
            "type": "string"
        },
        "minItems": 2,
        "maxItems": 2
    }
}

Contest session


POST /api/v1/contests/{contest_id}/apply/

Description

Make an application for contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Response 204 No Content

Response 403 Forbidden

{
    "detail": "string",
    "code": "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": "object",
    "description": "Generic error serializer.",
    "properties": {
        "detail": {
            "type": "string",
            "description": "A message explaining the error."
        },
        "code": {
            "type": "string",
            "description": "A machine-readable error code."
        }
    },
    "required": [
        "code",
        "detail"
    ]
}

GET /api/v1/contests/{contest_id}/participants/

Description

Get list of users participating in contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Response 200 OK

[
    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
{
    "type": "array",
    "items": {
        "type": "integer"
    }
}

Response 404 Not Found


GET /api/v1/contests/{contest_id}/time-left/

Description

Get time user has to solve other tasks.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Response 200 OK

{
    "time_left": 0,
    "is_unlimited": true
}
⚠️ 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": "object",
    "description": "Serializer for /time-left.",
    "properties": {
        "time_left": {
            "type": "integer",
            "description": "The time left in seconds."
        },
        "is_unlimited": {
            "type": "boolean",
            "description": "Is time unlimited."
        }
    },
    "required": [
        "is_unlimited",
        "time_left"
    ]
}

Response 404 Not Found

Page & task management


GET /api/v1/contests/{contest_id}/tasks/code/

Description

List or create code tasks.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Response 200 OK

[
    {
        "contest": 0,
        "title": "string",
        "description": "string",
        "test_suite": 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
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/UserCodeTask"
    }
}

POST /api/v1/contests/{contest_id}/tasks/code/

Description

List or create code tasks.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Request body

{
    "title": "string",
    "description": "string",
    "test_suite": 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
{
    "type": "object",
    "description": "Code task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {
            "description": "A test suite description. See solution service and judgelet doc for more details."
        }
    },
    "required": [
        "description",
        "test_suite",
        "title"
    ]
}

{
    "title": "string",
    "description": "string",
    "test_suite": 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
{
    "type": "object",
    "description": "Code task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {
            "description": "A test suite description. See solution service and judgelet doc for more details."
        }
    },
    "required": [
        "description",
        "test_suite",
        "title"
    ]
}

{
    "title": "string",
    "description": "string",
    "test_suite": 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
{
    "type": "object",
    "description": "Code task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {
            "description": "A test suite description. See solution service and judgelet doc for more details."
        }
    },
    "required": [
        "description",
        "test_suite",
        "title"
    ]
}

Response 201 Created

{
    "id": 0,
    "title": "string",
    "description": "string",
    "test_suite": null,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for Code objects with sensitive info.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {},
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "description",
        "id",
        "test_suite",
        "title"
    ]
}

GET /api/v1/contests/{contest_id}/tasks/code/{id}/

Description

Get, update or delete a single code task.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Response 200 OK

{
    "contest": 0,
    "title": "string",
    "description": "string",
    "test_suite": 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
{
    "type": "object",
    "description": "Serializer for CodeTask objects that hides sensitive info.",
    "properties": {
        "contest": {
            "type": "integer"
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {}
    },
    "required": [
        "contest",
        "description",
        "test_suite",
        "title"
    ]
}

PATCH /api/v1/contests/{contest_id}/tasks/code/{id}/

Description

Get, update or delete a single code task.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Request body

{
    "title": "string",
    "description": "string",
    "test_suite": 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
{
    "type": "object",
    "description": "Code task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {
            "description": "A test suite description. See solution service and judgelet doc for more details."
        }
    }
}

{
    "title": "string",
    "description": "string",
    "test_suite": 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
{
    "type": "object",
    "description": "Code task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {
            "description": "A test suite description. See solution service and judgelet doc for more details."
        }
    }
}

{
    "title": "string",
    "description": "string",
    "test_suite": 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
{
    "type": "object",
    "description": "Code task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {
            "description": "A test suite description. See solution service and judgelet doc for more details."
        }
    }
}

Response 200 OK

{
    "id": 0,
    "title": "string",
    "description": "string",
    "test_suite": null,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for Code objects with sensitive info.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {},
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "description",
        "id",
        "test_suite",
        "title"
    ]
}

DELETE /api/v1/contests/{contest_id}/tasks/code/{id}/

Description

Delete page and update contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Response 204 No Content


GET /api/v1/contests/{contest_id}/tasks/quiz/

Description

List or create quiz tasks.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Response 200 OK

[
    {
        "contest": 0,
        "title": "string",
        "description": "string",
        "points": 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
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/UserQuizTask"
    }
}

POST /api/v1/contests/{contest_id}/tasks/quiz/

Description

List or create quiz tasks.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Request body

{
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 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 request body
{
    "type": "object",
    "description": "Quiz task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {
            "description": "A validator description. See solution service doc for more details."
        },
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    },
    "required": [
        "description",
        "points",
        "title",
        "validator"
    ]
}

{
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 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 request body
{
    "type": "object",
    "description": "Quiz task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {
            "description": "A validator description. See solution service doc for more details."
        },
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    },
    "required": [
        "description",
        "points",
        "title",
        "validator"
    ]
}

{
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 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 request body
{
    "type": "object",
    "description": "Quiz task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {
            "description": "A validator description. See solution service doc for more details."
        },
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    },
    "required": [
        "description",
        "points",
        "title",
        "validator"
    ]
}

Response 201 Created

{
    "id": 0,
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 0,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for QuizTask objects with sensitive info.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {},
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "description",
        "id",
        "points",
        "title"
    ]
}

GET /api/v1/contests/{contest_id}/tasks/quiz/{id}/

Description

Get, update or delete a single quiz task.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Response 200 OK

{
    "contest": 0,
    "title": "string",
    "description": "string",
    "points": 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
{
    "type": "object",
    "description": "Serializer for QuizTask objects that hides sensitive info.",
    "properties": {
        "contest": {
            "type": "integer"
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    },
    "required": [
        "contest",
        "description",
        "points",
        "title"
    ]
}

PATCH /api/v1/contests/{contest_id}/tasks/quiz/{id}/

Description

Get, update or delete a single quiz task.

If you are a contest manager, additional info is exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Request body

{
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 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 request body
{
    "type": "object",
    "description": "Quiz task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {
            "description": "A validator description. See solution service doc for more details."
        },
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    }
}

{
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 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 request body
{
    "type": "object",
    "description": "Quiz task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {
            "description": "A validator description. See solution service doc for more details."
        },
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    }
}

{
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 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 request body
{
    "type": "object",
    "description": "Quiz task creation & patch serializer.",
    "properties": {
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {
            "description": "A validator description. See solution service doc for more details."
        },
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        }
    }
}

Response 200 OK

{
    "id": 0,
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 0,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for QuizTask objects with sensitive info.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {},
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "description",
        "id",
        "points",
        "title"
    ]
}

DELETE /api/v1/contests/{contest_id}/tasks/quiz/{id}/

Description

Delete page and update contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Response 204 No Content


GET /api/v1/contests/{contest_id}/tasks/text/

Description

List or create text pages.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Response 200 OK

[
    {
        "id": 0,
        "name": "string",
        "text": "string",
        "is_enter_page": true,
        "contest": 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
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/TextPage"
    }
}

POST /api/v1/contests/{contest_id}/tasks/text/

Description

List or create text pages.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Request body

{
    "name": "string",
    "text": "string",
    "is_enter_page": true
}
⚠️ 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
{
    "type": "object",
    "description": "Text page creation & patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        }
    },
    "required": [
        "name",
        "text"
    ]
}

{
    "name": "string",
    "text": "string",
    "is_enter_page": true
}
⚠️ 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
{
    "type": "object",
    "description": "Text page creation & patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        }
    },
    "required": [
        "name",
        "text"
    ]
}

{
    "name": "string",
    "text": "string",
    "is_enter_page": true
}
⚠️ 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
{
    "type": "object",
    "description": "Text page creation & patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        }
    },
    "required": [
        "name",
        "text"
    ]
}

Response 201 Created

{
    "id": 0,
    "name": "string",
    "text": "string",
    "is_enter_page": true,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for TextPage objects.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        },
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "id",
        "name",
        "text"
    ]
}

GET /api/v1/contests/{contest_id}/tasks/text/{id}/

Description

Get, update or delete a single text page.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Response 200 OK

{
    "id": 0,
    "name": "string",
    "text": "string",
    "is_enter_page": true,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for TextPage objects.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        },
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "id",
        "name",
        "text"
    ]
}

PATCH /api/v1/contests/{contest_id}/tasks/text/{id}/

Description

Get, update or delete a single text page.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Request body

{
    "name": "string",
    "text": "string",
    "is_enter_page": true
}
⚠️ 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
{
    "type": "object",
    "description": "Text page creation & patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        }
    }
}

{
    "name": "string",
    "text": "string",
    "is_enter_page": true
}
⚠️ 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
{
    "type": "object",
    "description": "Text page creation & patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        }
    }
}

{
    "name": "string",
    "text": "string",
    "is_enter_page": true
}
⚠️ 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
{
    "type": "object",
    "description": "Text page creation & patch serializer.",
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        }
    }
}

Response 200 OK

{
    "id": 0,
    "name": "string",
    "text": "string",
    "is_enter_page": true,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for TextPage objects.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "name": {
            "type": "string",
            "maxLength": 255
        },
        "text": {
            "type": "string"
        },
        "is_enter_page": {
            "type": "boolean"
        },
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "id",
        "name",
        "text"
    ]
}

DELETE /api/v1/contests/{contest_id}/tasks/text/{id}/

Description

Delete page and update contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No
id path integer No

Response 204 No Content

Permissions


GET /api/v1/contests/{id}/can-manage/

Description

Check if authenticated user can manage contest.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
id path integer No

Response 200 OK

{
    "can_manage": true
}
⚠️ 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": "object",
    "description": "Serializer for /can-manage.",
    "properties": {
        "can_manage": {
            "type": "boolean",
            "description": "Can I manage this contest."
        }
    },
    "required": [
        "can_manage"
    ]
}

GET /api/v1/contests/tasks/{task_type}/{task_id}/can-submit/{user_id}/

Description

Check if a user can submit solution to specific task.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
task_id path integer No
task_type path string No
user_id path integer No

Response 200 OK

{
    "can_submit": true,
    "reason": "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": "object",
    "description": "Serializer for /can-submit.",
    "properties": {
        "can_submit": {
            "type": "boolean",
            "description": "Can a user submit this task."
        },
        "reason": {
            "type": "string",
            "description": "A reason for rejection."
        }
    },
    "required": [
        "can_submit"
    ]
}

Internal


GET /internal/contests/{contest_id}/tasks/

Description

Get list of all tasks (with sensitive data). Do not expose.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
contest_id path integer No

Response 200 OK

[
    {
        "id": 0,
        "title": "string",
        "description": "string",
        "validator": null,
        "points": 0,
        "contest": 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
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/FullQuizTask"
    }
}

GET /internal/contests/tasks/code/{id}/

Description

Get code task (with all sensitive data). Should not be exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
id path integer No

Response 200 OK

{
    "id": 0,
    "title": "string",
    "description": "string",
    "test_suite": null,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for Code objects with sensitive info.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "test_suite": {},
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "description",
        "id",
        "test_suite",
        "title"
    ]
}

GET /internal/contests/tasks/quiz/{id}/

Description

Get quiz task (with all sensitive data). Should not be exposed.

Input parameters

Parameter In Type Default Nullable Description
tokenAuth header string N/A No JWT Bearer token
id path integer No

Response 200 OK

{
    "id": 0,
    "title": "string",
    "description": "string",
    "validator": null,
    "points": 0,
    "contest": 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
{
    "type": "object",
    "description": "Serializer for QuizTask objects with sensitive info.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "title": {
            "type": "string",
            "maxLength": 255
        },
        "description": {
            "type": "string"
        },
        "validator": {},
        "points": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
        },
        "contest": {
            "type": "integer"
        }
    },
    "required": [
        "contest",
        "description",
        "id",
        "points",
        "title"
    ]
}

Schemas

CanIManageContest

Name Type
can_manage boolean

CanSubmitTask

Name Type
can_submit boolean
reason string

CodeTaskCreation

Name Type
description string
test_suite
title string

Contest

Name Type
author integer
description string
id integer
is_ended boolean
is_started boolean
name string
pages
time_limit_seconds integer

ContestCreation

Name Type
description string
is_ended boolean
is_started boolean
name string
time_limit_seconds integer

Error

Name Type
code string
detail string

FullCodeTask

Name Type
contest integer
description string
id integer
test_suite
title string

FullQuizTask

Name Type
contest integer
description string
id integer
points integer
title string
validator

GetTime

Name Type
is_unlimited boolean
time_left integer

PatchedCodeTaskCreation

Name Type
description string
test_suite
title string

PatchedContestPatch

Name Type
description string
is_ended boolean
is_started boolean
name string
pages
time_limit_seconds integer

PatchedQuizTaskCreation

Name Type
description string
points integer
title string
validator

PatchedTextPageCreation

Name Type
is_enter_page boolean
name string
text string

QuizTaskCreation

Name Type
description string
points integer
title string
validator

TextPage

Name Type
contest integer
id integer
is_enter_page boolean
name string
text string

TextPageCreation

Name Type
is_enter_page boolean
name string
text string

UserCodeTask

Name Type
contest integer
description string
test_suite
title string

UserQuizTask

Name Type
contest integer
description string
points integer
title string

Security schemes

Name Type Scheme Description
tokenAuth http bearer

Contents

search