Competition Problems
Endpoints for managing competition problems
Retrieves a paginated list of all competition problems. Required admin role.
Zero-based page index (0..N)
0The size of the page to be returned
20Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
OK
Unauthorized
Forbidden
Conflict
Internal Server Error
GET /api/competitionsProblems HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"content": [
{
"priority": 1,
"slug": "text",
"competition": {
"members": [
{
"musername": "text",
"mpassword": "text",
"name": "text",
"roles": [
"USER"
],
"id": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"authorities": [
{
"authority": "text"
}
],
"isAdmin": true,
"username": "text",
"password": "text",
"enabled": true,
"credentialsNonExpired": true,
"accountNonExpired": true,
"accountNonLocked": true
}
],
"checkers": [
{
"displayName": "text",
"languageHighlightName": "text",
"address": "text",
"id": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
],
"organizer": {
"musername": "text",
"mpassword": "text",
"name": "text",
"roles": [
"USER"
],
"id": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"authorities": [
{
"authority": "text"
}
],
"isAdmin": true,
"username": "text",
"password": "text",
"enabled": true,
"credentialsNonExpired": true,
"accountNonExpired": true,
"accountNonLocked": true
},
"name": "text",
"description": "text",
"startedAt": "2026-01-01T00:00:00.000Z",
"endedAt": "2026-01-01T00:00:00.000Z",
"showRating": true,
"showOutput": true,
"showInput": true,
"public": true,
"id": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"problem": {
"id": 1,
"name": "text",
"description": "text",
"inData": "text",
"outData": "text",
"tests": "text",
"examples": "text"
},
"id": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
],
"page": {
"size": 1,
"number": 1,
"totalElements": 1,
"totalPages": 1
}
}Creates a new competition problem.
Details for creating a competition problem
Priority of the problem in the competition
1Slug identifier for the problem
problem-slugID of the competition
1001ID of the problem
2002OK
Unique identifier of the competition problem
1Priority of problem for sorting
12Unique identifier of the competition problem
Unauthorized
Forbidden
Conflict
Internal Server Error
POST /api/competitionsProblems HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"priority": 1,
"slug": "problem-slug",
"competition_id": 1001,
"problem_id": 2002
}{
"id": 1,
"priority": 12,
"problem": {
"id": 1,
"name": "Sum of Two Numbers",
"description": "Calculate the sum of two integers.",
"inData": 1,
"outData": 3,
"examples": "Input: 1 2, Output: 3",
"public": true
},
"slug": "text"
}Deletes multiple competition problems by their IDs. Required admin role.
OK
No content
Unauthorized
Forbidden
Conflict
Internal Server Error
DELETE /api/competitionsProblems?ids=1 HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Applies partial updates to multiple competition problems. Required admin role.
OK
Unauthorized
Forbidden
Conflict
Internal Server Error
PATCH /api/competitionsProblems?ids=1 HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
[
1
]Retrieves details of a specific competition problem by its ID. Required admin role.
OK
Unique identifier of the competition problem
1Priority of problem for sorting
12Unique identifier of the competition problem
Unauthorized
Forbidden
Conflict
Internal Server Error
GET /api/competitionsProblems/{id} HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 1,
"priority": 12,
"problem": {
"id": 1,
"name": "Sum of Two Numbers",
"description": "Calculate the sum of two integers.",
"inData": 1,
"outData": 3,
"examples": "Input: 1 2, Output: 3",
"public": true
},
"slug": "text"
}Deletes a specific competition problem by its ID. Required admin role.
OK
Unique identifier of the competition problem
1Priority of problem for sorting
12Unique identifier of the competition problem
Unauthorized
Forbidden
Conflict
Internal Server Error
DELETE /api/competitionsProblems/{id} HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 1,
"priority": 12,
"problem": {
"id": 1,
"name": "Sum of Two Numbers",
"description": "Calculate the sum of two integers.",
"inData": 1,
"outData": 3,
"examples": "Input: 1 2, Output: 3",
"public": true
},
"slug": "text"
}Applies partial updates to a specific competition problem. Required admin role.
OK
Unique identifier of the competition problem
1Priority of problem for sorting
12Unique identifier of the competition problem
Unauthorized
Forbidden
Conflict
Internal Server Error
PATCH /api/competitionsProblems/{id} HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
{
"id": 1,
"priority": 12,
"problem": {
"id": 1,
"name": "Sum of Two Numbers",
"description": "Calculate the sum of two integers.",
"inData": 1,
"outData": 3,
"examples": "Input: 1 2, Output: 3",
"public": true
},
"slug": "text"
}Retrieves details of multiple competition problems by their IDs. Required admin role.
OK
Unique identifier of the competition problem
1Priority of problem for sorting
12Unique identifier of the competition problem
Unauthorized
Forbidden
Conflict
Internal Server Error
GET /api/competitionsProblems/by-ids?ids=1 HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": 1,
"priority": 12,
"problem": {
"id": 1,
"name": "Sum of Two Numbers",
"description": "Calculate the sum of two integers.",
"inData": 1,
"outData": 3,
"examples": "Input: 1 2, Output: 3",
"public": true
},
"slug": "text"
}
]Last updated