Swap Players In Session
POST/session/v1/session/:session_id/player:swap
Swap two players on different teams. Leaders cannot be swapped
For all sessions:
-
Required auth permissions are any of:
session:*,session:update:any -
Required session permissions are None
For sessions you are actively in:
-
Required auth permissions are any of:
session:*,session:update:any,session:update:self -
Required session permissions are
SessionPermissions.session_admin
Request
Path Parameters
Possible values: non-empty and <= 128 characters
Query Parameters
Default value: true
- application/json
Body
required
Possible values: >= 2, <= 2
Two player UUIDs for players who will swap teams
Responses
- 200
- 403
- 422
Successful Response
Response Headers
ETag
string
Used to identify this version of the content. Provide with a get request to avoid downloading the same data multiple times.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
players
object[]
required
List of updated players
Player UUID of the player updated
Possible values: [leader, member, invited, reserved]
What membership state players have in a session
Which team the player joined
custom_data
object
Resulting custom data about the player
{
"players": [
{
"player_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "leader",
"team_id": 0,
"custom_data": {}
}
]
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}