For the complete documentation index, see llms.txt. This page is also available as Markdown.

Competitions

Endpoints for managing competitions

Get competition by ID

get

Retrieves competition details by its ID. Requires access to the competition.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Responses
200

OK

*/*
idinteger · int64Required

Unique identifier of the competition

Example: 1
namestringRequired

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
publicbooleanRequired

If public everyone can join into competition

Example: true
showInputbooleanRequired
showOutputbooleanRequired
showRatingbooleanRequired
get/api/competitions/{compId}
GET /api/competitions/{compId} HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "checkers": [
    {
      "id": 1,
      "displayName": "Default Python3 Checker",
      "languageHighlightName": "python"
    }
  ],
  "name": "Code Battles 2023",
  "description": "A competitive coding event",
  "startedAt": "2023-01-01T10:00:00",
  "endedAt": "2023-01-01T18:00:00",
  "public": true,
  "showInput": true,
  "showOutput": true,
  "showRating": true
}
put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Body
namestringRequired

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
publicbooleanRequired

If public everyone can join into competition

Example: true
showInputbooleanRequired
showOutputbooleanRequired
showRatingbooleanRequired
Responses
200

OK

*/*
idinteger · int64Required

Unique identifier of the competition

Example: 1
namestringRequired

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
publicbooleanRequired

If public everyone can join into competition

Example: true
showInputbooleanRequired
showOutputbooleanRequired
showRatingbooleanRequired
put/api/competitions/{compId}
PUT /api/competitions/{compId} HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 204

{
  "name": "Code Battles 2023",
  "description": "A competitive coding event",
  "startedAt": "2023-01-01T10:00:00",
  "endedAt": "2023-01-01T18:00:00",
  "public": true,
  "showInput": true,
  "showOutput": true,
  "showRating": true
}
{
  "id": 1,
  "checkers": [
    {
      "id": 1,
      "displayName": "Default Python3 Checker",
      "languageHighlightName": "python"
    }
  ],
  "name": "Code Battles 2023",
  "description": "A competitive coding event",
  "startedAt": "2023-01-01T10:00:00",
  "endedAt": "2023-01-01T18:00:00",
  "public": true,
  "showInput": true,
  "showOutput": true,
  "showRating": true
}

[ADMIN] Get competition users

get

Retrieves the list of users participating in a specific competition. Required admin role.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Responses
200

OK

*/*
idinteger · int64Required

Unique identifier of the user

Example: 1
usernamestringRequired

Username of the user

Example: john_doe
get/api/competitions/{compId}/users
GET /api/competitions/{compId}/users HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": 1,
    "username": "john_doe"
  }
]

[ADMIN] Edit competition users

put

Updates the list of users participating in a specific competition. Required admin role.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Body

Request to edit users

usersIdsinteger · int64[]Required

Set of user IDs to be edited

Example: 1,2,3
Responses
202

Accepted

No content

put/api/competitions/{compId}/users
PUT /api/competitions/{compId}/users HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "usersIds": "1,2,3"
}

No content

[ADMIN] Edit competition checkers

put

Updates the list of checkers for a specific competition. Required admin role.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Body

Request to edit users

usersIdsinteger · int64[]Required

Set of user IDs to be edited

Example: 1,2,3
Responses
202

Accepted

No content

put/api/competitions/{compId}/checkers
PUT /api/competitions/{compId}/checkers HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "usersIds": "1,2,3"
}

No content

[ADMIN] Get all competitions

get

Retrieves a list of all competitions. Required admin role.

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

OK

*/*
idinteger · int64Required

Unique identifier of the competition

Example: 1
namestringRequired

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
publicbooleanRequired

If public everyone can join into competition

Example: true
showInputbooleanRequired
showOutputbooleanRequired
showRatingbooleanRequired
get/api/competitions
GET /api/competitions HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": 1,
    "checkers": [
      {
        "id": 1,
        "displayName": "Default Python3 Checker",
        "languageHighlightName": "python"
      }
    ],
    "name": "Code Battles 2023",
    "description": "A competitive coding event",
    "startedAt": "2023-01-01T10:00:00",
    "endedAt": "2023-01-01T18:00:00",
    "public": true,
    "showInput": true,
    "showOutput": true,
    "showRating": true
  }
]

[ADMIN] Create a new competition

post

Creates a new competition object. Required admin role.

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

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
Responses
200

OK

*/*
idinteger · int64Required

Unique identifier of the competition

Example: 1
namestringRequired

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
publicbooleanRequired

If public everyone can join into competition

Example: true
showInputbooleanRequired
showOutputbooleanRequired
showRatingbooleanRequired
post/api/competitions
POST /api/competitions HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 137

{
  "name": "Code Battles 2023",
  "description": "A competitive coding event",
  "startedAt": "2023-01-01T10:00:00",
  "endedAt": "2023-01-01T18:00:00"
}
{
  "id": 1,
  "checkers": [
    {
      "id": 1,
      "displayName": "Default Python3 Checker",
      "languageHighlightName": "python"
    }
  ],
  "name": "Code Battles 2023",
  "description": "A competitive coding event",
  "startedAt": "2023-01-01T10:00:00",
  "endedAt": "2023-01-01T18:00:00",
  "public": true,
  "showInput": true,
  "showOutput": true,
  "showRating": true
}

Submit an answer

post

Allows a user to submit an answer for a specific competition problem.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Body

Request to send an answer

checkerinteger · int64Required

ID of the checker

Example: 1
srcstringRequired

Source code submitted as the answer

Example: print(input())
idinteger · int64Required

ID of the answer

Example: 1001
Responses
200

OK

*/*
stringOptional
post/api/competitions/{compId}/send
POST /api/competitions/{compId}/send HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "checker": 1,
  "src": "print(input())",
  "id": 1001
}
text

Join to public competition problem by ID

post

Every user can join to public competition.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Responses
200

OK

No content

post/api/competitions/{compId}/publicJoin
POST /api/competitions/{compId}/publicJoin HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get all answers

get

Retrieves all answers submitted by the authenticated user for a specific competition.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Responses
200

OK

*/*
idinteger · int64Optional

Unique identifier of the answer

Example: 1
statusstring · enumRequired

Current status of the answer

Example: IN_PROGRESSPossible values:
scoreinteger · int32Optional

Score awarded for the answer

Example: 100
codestringRequired

Code submitted by the user

Example: print('Hello, World!')
resultstringOptional

Result of the code execution

Example: Success
createdAtstring · date-timeRequired

Timestamp when the answer was created

Example: 2023-01-01T12:00:00Z
get/api/competitions/{compId}/sends
GET /api/competitions/{compId}/sends HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": 1,
    "user": {
      "id": 1,
      "username": "john_doe"
    },
    "status": "IN_PROGRESS",
    "score": 100,
    "code": "print('Hello, World!')",
    "result": "Success",
    "checker": {
      "id": 1,
      "displayName": "Default Python3 Checker",
      "languageHighlightName": "python"
    },
    "createdAt": "2023-01-01T12:00:00Z",
    "competitionsProblems": {
      "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"
    }
  }
]

Get competition problems

get

Retrieves all problems associated with a specific competition.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Responses
200

OK

*/*
idinteger · int64Required

Unique identifier of the competition problem

Example: 1
priorityinteger · int32Required

Priority of problem for sorting

Example: 12
slugstringRequired

Unique identifier of the competition problem

get/api/competitions/{compId}/problems
GET /api/competitions/{compId}/problems 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"
  }
]

Get competition problem by ID

get

Retrieves a specific problem by its ID within a competition.

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

OK

*/*
idinteger · int64Required

Unique identifier of the competition problem

Example: 1
priorityinteger · int32Required

Priority of problem for sorting

Example: 12
slugstringRequired

Unique identifier of the competition problem

get/api/competitions/{compId}/problems/{id}
GET /api/competitions/{compId}/problems/{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"
}

Get competition leaderboard

get

Retrieves the leaderboard for a specific competition.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
compIdinteger · int64Required
Responses
200

OK

*/*
get/api/competitions/{compId}/leaderboard
GET /api/competitions/{compId}/leaderboard HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "score": [
    {
      "userId": 1,
      "userX": "text",
      "score": 1,
      "time": "2026-01-01T00:00:00.000Z"
    }
  ],
  "data": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "userId": 1,
        "competitionproblemId": 1,
        "maxScore": 1
      }
    ]
  }
}

Get all public competitions

get

Retrieves a list of public competitions.

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

OK

*/*
idinteger · int64Required

Unique identifier of the competition

Example: 1
namestringRequired

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
publicbooleanRequired

If public everyone can join into competition

Example: true
showInputbooleanRequired
showOutputbooleanRequired
showRatingbooleanRequired
get/api/competitions/public
GET /api/competitions/public HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": 1,
    "checkers": [
      {
        "id": 1,
        "displayName": "Default Python3 Checker",
        "languageHighlightName": "python"
      }
    ],
    "name": "Code Battles 2023",
    "description": "A competitive coding event",
    "startedAt": "2023-01-01T10:00:00",
    "endedAt": "2023-01-01T18:00:00",
    "public": true,
    "showInput": true,
    "showOutput": true,
    "showRating": true
  }
]

Get competitions available for user

get

Retrieves all competitions accessible to the authenticated user.

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

OK

*/*
idinteger · int64Required

Unique identifier of the competition

Example: 1
namestringRequired

Name of the competition

Example: Code Battles 2023
descriptionstringRequired

Description of the competition

Example: A competitive coding event
startedAtstring · date-timeOptional

Start time of the competition

Example: 2023-01-01T10:00:00
endedAtstring · date-timeOptional

End time of the competition

Example: 2023-01-01T18:00:00
publicbooleanRequired

If public everyone can join into competition

Example: true
showInputbooleanRequired
showOutputbooleanRequired
showRatingbooleanRequired
get/api/competitions/me
GET /api/competitions/me HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": 1,
    "checkers": [
      {
        "id": 1,
        "displayName": "Default Python3 Checker",
        "languageHighlightName": "python"
      }
    ],
    "name": "Code Battles 2023",
    "description": "A competitive coding event",
    "startedAt": "2023-01-01T10:00:00",
    "endedAt": "2023-01-01T18:00:00",
    "public": true,
    "showInput": true,
    "showOutput": true,
    "showRating": true
  }
]

Last updated