Answer

Endpoints for answers

Get answer by ID

get

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idinteger · int64Required
Responses
chevron-right
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/answers/{id}

[ADMIN] Get the last answer by problem and user ID

get

Retrieves the most recent answer submitted by a specific user for a specific competition problem. Required admin role.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
compProblemIdinteger · int64Required

The ID of CompetitionProblem id

userIdinteger · int64Required

The ID of the user

Responses
chevron-right
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/answers/last

Last updated