Competition Problems
Endpoints for managing competition problems
Retrieves a paginated list of all competition problems. Required admin role.
Zero-based page index (0..N)
0
The size of the page to be returned
20
Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
GET /api/competitionsProblems HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
Accept: */*
{
"content": [
{
"priority": 1,
"slug": "text",
"competition": {
"members": [
{
"musername": "text",
"mpassword": "text",
"name": "text",
"roles": [
"USER"
],
"id": 1,
"createdAt": "2025-06-30T18:46:23.746Z",
"updatedAt": "2025-06-30T18:46:23.746Z",
"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": "2025-06-30T18:46:23.746Z",
"updatedAt": "2025-06-30T18:46:23.746Z"
}
],
"organizer": {
"musername": "text",
"mpassword": "text",
"name": "text",
"roles": [
"USER"
],
"id": 1,
"createdAt": "2025-06-30T18:46:23.746Z",
"updatedAt": "2025-06-30T18:46:23.746Z",
"authorities": [
{
"authority": "text"
}
],
"isAdmin": true,
"username": "text",
"password": "text",
"enabled": true,
"credentialsNonExpired": true,
"accountNonExpired": true,
"accountNonLocked": true
},
"name": "text",
"description": "text",
"startedAt": "2025-06-30T18:46:23.746Z",
"endedAt": "2025-06-30T18:46:23.746Z",
"showRating": true,
"showOutput": true,
"showInput": true,
"public": true,
"id": 1,
"createdAt": "2025-06-30T18:46:23.746Z",
"updatedAt": "2025-06-30T18:46:23.746Z"
},
"problem": {
"id": 1,
"name": "text",
"description": "text",
"inData": "text",
"outData": "text",
"tests": "text",
"examples": "text"
},
"id": 1,
"createdAt": "2025-06-30T18:46:23.746Z",
"updatedAt": "2025-06-30T18:46:23.746Z"
}
],
"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
1
Slug identifier for the problem
problem-slug
ID of the competition
1001
ID of the problem
2002
POST /api/competitionsProblems HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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.
DELETE /api/competitionsProblems HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
Accept: */*
No content
Applies partial updates to multiple competition problems. Required admin role.
PATCH /api/competitionsProblems HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
[
1
]
Retrieves details of a specific competition problem by its ID. Required admin role.
GET /api/competitionsProblems/{id} HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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.
DELETE /api/competitionsProblems/{id} HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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.
PATCH /api/competitionsProblems/{id} HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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.
GET /api/competitionsProblems/by-ids HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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"
}
]
Was this helpful?