curl --request PUT \
--url https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 1
}
'import requests
url = "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}"
payload = { "expected_revision": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_revision: 1})
};
fetch('https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_revision' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}"
payload := strings.NewReader("{\n \"expected_revision\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"league_id": "<string>",
"coworld_id": "<string>",
"coworld_name": "<string>",
"coworld_version": "<string>",
"coworld_manifest_hash": "<string>",
"host_user_id": "<string>",
"variant_id": "<string>",
"variants": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"num_players": 123
}
],
"authored_game_config": {},
"game_config_schema": {},
"min_players": 123,
"max_players": 123,
"min_player_limit": 123,
"max_player_limit": 123,
"status": "draft",
"revision": 123,
"episode_request_id": "<string>",
"episode_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replay_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"termination_reason": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"seats": [
{
"position": 123,
"kind": "human_open",
"player_id": "<string>",
"player_name": "<string>",
"is_me": true,
"claimant_label": "<string>",
"can_claim": true,
"can_remove": true
}
],
"can_manage": true,
"permissions": {
"can_start": true,
"can_edit": true,
"can_remove_player": true,
"can_end_game": true
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update lobby seat
Changes a draft lobby seat to human, policy, random, or closed.
curl --request PUT \
--url https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 1
}
'import requests
url = "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}"
payload = { "expected_revision": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_revision: 1})
};
fetch('https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_revision' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}"
payload := strings.NewReader("{\n \"expected_revision\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"league_id": "<string>",
"coworld_id": "<string>",
"coworld_name": "<string>",
"coworld_version": "<string>",
"coworld_manifest_hash": "<string>",
"host_user_id": "<string>",
"variant_id": "<string>",
"variants": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"num_players": 123
}
],
"authored_game_config": {},
"game_config_schema": {},
"min_players": 123,
"max_players": 123,
"min_player_limit": 123,
"max_player_limit": 123,
"status": "draft",
"revision": 123,
"episode_request_id": "<string>",
"episode_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replay_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"termination_reason": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"seats": [
{
"position": 123,
"kind": "human_open",
"player_id": "<string>",
"player_name": "<string>",
"is_me": true,
"claimant_label": "<string>",
"can_claim": true,
"can_remove": true
}
],
"can_manage": true,
"permissions": {
"can_start": true,
"can_edit": true,
"can_remove_player": true,
"can_end_game": true
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer token issued by Softmax
Path Parameters
Lobby whose seat will be updated.
^lby_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Zero-based seat position to update.
Body
Current lobby revision used to reject stale updates.
x >= 0Seat type to assign.
human_open, random, human, league_player, closed League player to use for a policy seat.
^ply_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Response
Successful Response
Lobby ID.
League that owns the lobby.
Coworld version selected for the lobby.
Coworld name.
Coworld version.
Hash of the selected Coworld manifest.
User ID of the lobby host.
Selected Coworld variant.
Variants available for this Coworld.
Show child attributes
Show child attributes
Public game configuration selected by the host.
JSON Schema for configurable game values.
Minimum occupied seats required to start.
Number of visible player seats.
Smallest player count supported by the Coworld.
Largest player count supported by the Coworld.
Current lobby status.
draft, starting, running, completed, failed, cancelled, expired Revision used for optimistic concurrency checks.
Started episode request.
Recorded episode.
Replay artifact URL.
Time the lobby was created.
Time the lobby game started.
Time the lobby game ended.
Reason the lobby game ended early.
Time the draft lobby expires.
Lobby seat assignments.
Show child attributes
Show child attributes
Whether the caller may manage the lobby.
Actions available to the caller.
Show child attributes
Show child attributes