Problems

Endpoints for managing problems

[ADMIN] Get all problems

get

Retrieves a list of all problems.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
chevron-right
200

OK

*/*
objectOptional
get
/api/problems

[ADMIN] Create a new problem

post

Creates a new problem using the provided data.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestringRequired

Name of the problem

Example: Sum of Two Numbers
descriptionstringRequired

Description of the problem

Example: Calculate the sum of two integers.
inDatastringRequired

Input data for the problem

Example: 1
outDatastringRequired

Expected output data for the problem

Example: 3
testsstringRequired

Test cases for the problem (JSON)

Example: {"in":"1","out":"3"}
examplesstringRequired

Example cases for the problem (JSON)

Example: {"in":"1","out":"3"}
Responses
chevron-right
200

OK

*/*
idinteger · int64Required

Unique identifier of the problem

Example: 1
namestringRequired

Name of the problem

Example: Sum of Two Numbers
descriptionstringRequired

Description of the problem

Example: Calculate the sum of two integers.
inDatastringRequired

Input data for the problem

Example: 1
outDatastringRequired

Expected output data for the problem

Example: 3
examplesstringRequired

Example cases for the problem

Example: Input: 1 2, Output: 3
publicbooleanOptional

Indicates if the problem is public

Example: true
post
/api/problems

[ADMIN] Get problem by ID

get

Retrieves a problem by its ID. Required admin role

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idinteger · int64Required
Responses
chevron-right
200

OK

*/*
idinteger · int64Required

Unique identifier of the problem

Example: 1
namestringRequired

Name of the problem

Example: Sum of Two Numbers
descriptionstringRequired

Description of the problem

Example: Calculate the sum of two integers.
inDatastringRequired

Input data for the problem

Example: 1
outDatastringRequired

Expected output data for the problem

Example: 3
examplesstringRequired

Example cases for the problem

Example: Input: 1 2, Output: 3
publicbooleanOptional

Indicates if the problem is public

Example: true
get
/api/problems/{id}

[ADMIN] Update a problem

patch

Applies partial updates to a problem by its ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idinteger · int64Required
Body
anyOptional
Responses
chevron-right
200

OK

*/*
idinteger · int64Required
namestringRequired
descriptionstringRequired
inDatastringRequired
outDatastringRequired
testsstringRequired
examplesstringRequired
patch
/api/problems/{id}

[ADMIN] Get problem by ID (extra fields)

get

Retrieves a problem by its ID with admin-level access. Required admin role

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idinteger · int64Required
Responses
chevron-right
200

OK

*/*
idinteger · int64Required
namestringRequired
descriptionstringRequired
inDatastringRequired
outDatastringRequired
testsstringRequired
examplesstringRequired
get
/api/problems/{id}/admin

Last updated