update states
Developing
PATCH
/games/{id}/states
Request
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Path Params
id
integer
required
Example:
3
Header Params
Authorization
string
optional
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3MDM3MzM1NjQsImlzcyI6Imp3dCJ9.Xo_0epX1XR_SQ8_kPsEDNzUJ4Jyuns0cTdSJJQiaG8o
Body Params application/json
assign_ai_enabled
boolean
optional
commit_ai_enabled
boolean
optional
contest_script_environment_enabled
boolean
optional
private_match_enabled
boolean
optional
public_match_enabled
boolean
optional
test_match_enabled
boolean
optional
Example
{
"assign_ai_enabled": true,
"commit_ai_enabled": true,
"contest_script_environment_enabled": true,
"private_match_enabled": true,
"public_match_enabled": true,
"test_match_enabled": true
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH '/games/3/states' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3MDM3MzM1NjQsImlzcyI6Imp3dCJ9.Xo_0epX1XR_SQ8_kPsEDNzUJ4Jyuns0cTdSJJQiaG8o' \
--header 'Content-Type: application/json' \
--data-raw '{
"assign_ai_enabled": true,
"commit_ai_enabled": true,
"contest_script_environment_enabled": true,
"private_match_enabled": true,
"public_match_enabled": true,
"test_match_enabled": true
}'
Responses
🟢200OK
application/json
Body
object {0}
Example
{}