hiper-backend
  1. create
hiper-backend
  • API Conventions
  • user
    • before login
      • login
      • register a user
      • request verification code
      • reset email
      • reset password
    • search users
      GET
    • get the user
      GET
    • get current user
      GET
    • update current user
      PATCH
  • game
    • create
      • create a game
    • administer
      • get settings related info about the game
      • update the game's game logic
      • update the game's match detail
    • get games
      GET
  • contest
    • create
      • create a contest
        POST
    • administer
      • get settings related info about the contest
      • update the registration password
    • get contests
      GET
    • register for contest
      PUT
    • exit contest
      DELETE
  • permission
    • grant creation permission
      PUT
    • revoke creation permission
      DELETE
  • base contest
    • administer
      • delete the game
      • add admin
      • relinquish admin
      • update contest script
      • update metadata
      • add a sdk
      • get a sdk
      • delete a sdk
      • update a sdk
      • update states
    • get the game
      GET
    • get AIs
      GET
    • commit an AI
      POST
    • get the ai
      GET
    • download the AI
      GET
    • edit ai note
      PUT
    • get contestants
      GET
    • assign an AI
      PUT
    • get current contestant
      GET
    • revoke the assigned AI
      DELETE
    • get matches
      GET
    • get a match
      GET
    • get sdks
      GET
  1. create

create a contest

Designing
POST
/contests
create_game_or_contest

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Header Params
Authorization
string 
optional
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3MDM1ODEyMDcsImlzcyI6Imp3dCJ9.7pOuZmvBeDx6CN2i2qFP9-V2i8wNjE3gJyNk_0ZIWSA
Body Params application/json
game_id
integer 
required
new_admin_username
string 
optional
Transfer the admin
Example
{
    "game_id": 2
}

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 POST '/contests' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3MDM1ODEyMDcsImlzcyI6Imp3dCJ9.7pOuZmvBeDx6CN2i2qFP9-V2i8wNjE3gJyNk_0ZIWSA' \
--header 'Content-Type: application/json' \
--data-raw '{
    "game_id": 2
}'

Responses

🟢200OK
application/json
Body
id
integer 
required
Example
{
    "id": 0
}
🟠422Unprocessable Content
Previous
get games
Next
get settings related info about the contest
Built with