curl --request POST \
--url https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim \
--header 'Authorization: Bearer <token>'import requests
url = "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim', 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}/claim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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": {}
}
]
}Claim lobby seat
Assigns the caller to an open human seat in a draft lobby.
curl --request POST \
--url https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim \
--header 'Authorization: Bearer <token>'import requests
url = "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim', 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}/claim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/lobbies/{lobby_id}/seats/{position}/claim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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 containing the seat.
^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 claim.
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