# Competition Problems

Endpoints for managing competition problems

## \[ADMIN] Get all competition problems

> Retrieves a paginated list of all competition problems. Required admin role.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PagedModelCompetitionsProblems":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/CompetitionsProblems"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"CompetitionsProblems":{"type":"object","properties":{"priority":{"type":"integer","format":"int32"},"slug":{"type":"string"},"competition":{"$ref":"#/components/schemas/Competition"},"problem":{"$ref":"#/components/schemas/Problem"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["competition","priority","problem","slug"]},"Competition":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/User"},"uniqueItems":true},"checkers":{"type":"array","items":{"$ref":"#/components/schemas/Checker"},"uniqueItems":true},"organizer":{"$ref":"#/components/schemas/User"},"name":{"type":"string"},"description":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"showRating":{"type":"boolean"},"showOutput":{"type":"boolean"},"showInput":{"type":"boolean"},"public":{"type":"boolean"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["description","name","public","showInput","showOutput","showRating"]},"User":{"type":"object","properties":{"musername":{"type":"string"},"mpassword":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["USER","ROLE_ADMIN","TESTTTSTCBEUYBEYUBYUCYUBYUBUBY","SYSADMIN"]},"uniqueItems":true},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"authorities":{"type":"array","items":{"$ref":"#/components/schemas/GrantedAuthority"}},"isAdmin":{"type":"boolean"},"username":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"}},"required":["authorities","isAdmin","roles"]},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"Checker":{"type":"object","properties":{"displayName":{"type":"string"},"languageHighlightName":{"type":"string"},"address":{"type":"string"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","displayName","languageHighlightName"]},"Problem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"inData":{"type":"string"},"outData":{"type":"string"},"tests":{"type":"string"}},"required":["description","examples","id","inData","name","outData","tests"]},"PageMetadata":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"}}},"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems":{"get":{"tags":["Competition Problems"],"summary":"[ADMIN] Get all competition problems","description":"Retrieves a paginated list of all competition problems. Required admin role.","operationId":"getAll_3","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelCompetitionsProblems"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"deprecated":true}}}}
```

## \[ADMIN] Create a competition problem

> Creates a new competition problem.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateCompetitionProblem":{"type":"object","description":"Details for creating a competition problem","properties":{"priority":{"type":"integer","format":"int64","description":"Priority of the problem in the competition"},"slug":{"type":"string","description":"Slug identifier for the problem"},"competition_id":{"type":"integer","format":"int64","description":"ID of the competition"},"problem_id":{"type":"integer","format":"int64","description":"ID of the problem"}},"required":["competition_id","priority","problem_id","slug"]},"CompetitionsProblemsDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition problem"},"priority":{"type":"integer","format":"int32","description":"Priority of problem for sorting"},"problem":{"$ref":"#/components/schemas/ProblemDto","description":"Unique identifier of the competition problem"},"slug":{"type":"string","description":"Unique identifier of the competition problem"}},"required":["id","priority","problem","slug"]},"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]},"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems":{"post":{"tags":["Competition Problems"],"summary":"[ADMIN] Create a competition problem","description":"Creates a new competition problem.","operationId":"create_3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompetitionProblem"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompetitionsProblemsDto"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}}}
```

## \[ADMIN] Delete multiple competition problems

> Deletes multiple competition problems by their IDs. Required admin role.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems":{"delete":{"tags":["Competition Problems"],"summary":"[ADMIN] Delete multiple competition problems","description":"Deletes multiple competition problems by their IDs. Required admin role.","operationId":"deleteMany","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}}}
```

## \[ADMIN] Update multiple competition problems

> Applies partial updates to multiple competition problems. Required admin role.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"JsonNode":{},"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems":{"patch":{"tags":["Competition Problems"],"summary":"[ADMIN] Update multiple competition problems","description":"Applies partial updates to multiple competition problems. Required admin role.","operationId":"patchMany","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonNode"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}}}
```

## \[ADMIN] Get competition problem by ID

> Retrieves details of a specific competition problem by its ID. Required admin role.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompetitionsProblemsDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition problem"},"priority":{"type":"integer","format":"int32","description":"Priority of problem for sorting"},"problem":{"$ref":"#/components/schemas/ProblemDto","description":"Unique identifier of the competition problem"},"slug":{"type":"string","description":"Unique identifier of the competition problem"}},"required":["id","priority","problem","slug"]},"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]},"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems/{id}":{"get":{"tags":["Competition Problems"],"summary":"[ADMIN] Get competition problem by ID","description":"Retrieves details of a specific competition problem by its ID. Required admin role.","operationId":"getOne","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompetitionsProblemsDto"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}}}
```

## \[ADMIN] Delete a competition problem

> Deletes a specific competition problem by its ID. Required admin role.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompetitionsProblemsDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition problem"},"priority":{"type":"integer","format":"int32","description":"Priority of problem for sorting"},"problem":{"$ref":"#/components/schemas/ProblemDto","description":"Unique identifier of the competition problem"},"slug":{"type":"string","description":"Unique identifier of the competition problem"}},"required":["id","priority","problem","slug"]},"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]},"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems/{id}":{"delete":{"tags":["Competition Problems"],"summary":"[ADMIN] Delete a competition problem","description":"Deletes a specific competition problem by its ID. Required admin role.","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompetitionsProblemsDto"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}}}
```

## \[ADMIN] Update a competition problem

> Applies partial updates to a specific competition problem. Required admin role.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"JsonNode":{},"CompetitionsProblemsDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition problem"},"priority":{"type":"integer","format":"int32","description":"Priority of problem for sorting"},"problem":{"$ref":"#/components/schemas/ProblemDto","description":"Unique identifier of the competition problem"},"slug":{"type":"string","description":"Unique identifier of the competition problem"}},"required":["id","priority","problem","slug"]},"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]},"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems/{id}":{"patch":{"tags":["Competition Problems"],"summary":"[ADMIN] Update a competition problem","description":"Applies partial updates to a specific competition problem. Required admin role.","operationId":"patch_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonNode"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompetitionsProblemsDto"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}}}
```

## \[ADMIN] Get multiple competition problems

> Retrieves details of multiple competition problems by their IDs. Required admin role.

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"tags":[{"name":"Competition Problems","description":"Endpoints for managing competition problems"}],"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompetitionsProblemsDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition problem"},"priority":{"type":"integer","format":"int32","description":"Priority of problem for sorting"},"problem":{"$ref":"#/components/schemas/ProblemDto","description":"Unique identifier of the competition problem"},"slug":{"type":"string","description":"Unique identifier of the competition problem"}},"required":["id","priority","problem","slug"]},"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]},"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}},"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}},"paths":{"/api/competitionsProblems/by-ids":{"get":{"tags":["Competition Problems"],"summary":"[ADMIN] Get multiple competition problems","description":"Retrieves details of multiple competition problems by their IDs. Required admin role.","operationId":"getMany","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompetitionsProblemsDto"}}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConflictResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codebattles.ru/api/backend/competition-problems.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
