Update play session configuration
curl --request PUT \
--url https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "coworld",
"coworld_id": "<string>"
}
'import requests
url = "https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config"
payload = {
"kind": "coworld",
"coworld_id": "<string>"
}
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({kind: 'coworld', coworld_id: '<string>'})
};
fetch('https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config', 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/coworlds/play/session/{session_id}/config",
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([
'kind' => 'coworld',
'coworld_id' => '<string>'
]),
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/coworlds/play/session/{session_id}/config"
payload := strings.NewReader("{\n \"kind\": \"coworld\",\n \"coworld_id\": \"<string>\"\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/coworlds/play/session/{session_id}/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"coworld\",\n \"coworld_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config")
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 \"kind\": \"coworld\",\n \"coworld_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"coworld_id": "<string>",
"game_name": "<string>",
"variant_id": "<string>",
"player_count": 123,
"slots_filled": 123,
"allow_spectators": true,
"global_url": "<string>",
"status": "<string>",
"game_config": {},
"can_manage": false,
"viewer_target_url": "<string>",
"players": [
{
"slot": 123,
"label": "<string>",
"slot_kind": "human",
"user_id": "<string>",
"player_id": "<string>",
"player_name": "<string>",
"policy_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_name": "<string>",
"policy_version": 123,
"joined_at": "2023-11-07T05:31:56Z",
"is_viewer": false
}
],
"spectators": [
{
"label": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"player_id": "<string>",
"player_name": "<string>",
"is_viewer": false
}
],
"can_configure_game": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Coworlds
Update play session configuration
Changes the Coworld, variant, game configuration, or spectator access before start.
PUT
/
v2
/
coworlds
/
play
/
session
/
{session_id}
/
config
Update play session configuration
curl --request PUT \
--url https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "coworld",
"coworld_id": "<string>"
}
'import requests
url = "https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config"
payload = {
"kind": "coworld",
"coworld_id": "<string>"
}
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({kind: 'coworld', coworld_id: '<string>'})
};
fetch('https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config', 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/coworlds/play/session/{session_id}/config",
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([
'kind' => 'coworld',
'coworld_id' => '<string>'
]),
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/coworlds/play/session/{session_id}/config"
payload := strings.NewReader("{\n \"kind\": \"coworld\",\n \"coworld_id\": \"<string>\"\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/coworlds/play/session/{session_id}/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"coworld\",\n \"coworld_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/coworlds/play/session/{session_id}/config")
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 \"kind\": \"coworld\",\n \"coworld_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"coworld_id": "<string>",
"game_name": "<string>",
"variant_id": "<string>",
"player_count": 123,
"slots_filled": 123,
"allow_spectators": true,
"global_url": "<string>",
"status": "<string>",
"game_config": {},
"can_manage": false,
"viewer_target_url": "<string>",
"players": [
{
"slot": 123,
"label": "<string>",
"slot_kind": "human",
"user_id": "<string>",
"player_id": "<string>",
"player_name": "<string>",
"policy_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_name": "<string>",
"policy_version": 123,
"joined_at": "2023-11-07T05:31:56Z",
"is_viewer": false
}
],
"spectators": [
{
"label": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"player_id": "<string>",
"player_name": "<string>",
"is_viewer": false
}
],
"can_configure_game": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer token issued by Softmax
Path Parameters
Play session to configure.
Pattern:
^ps_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Body
application/json
- PlaySessionCoworldUpdate
- PlaySessionVariantUpdate
- PlaySessionGameConfigUpdate
- PlaySessionSpectatorsUpdate
Response
Successful Response
Coworld version selected for the session.
Name of the selected game.
Selected game variant, if any.
Number of player seats.
Number of occupied player seats.
Whether spectators may join.
Shared viewer URL.
Current session status.
Resolved public game configuration.
Whether the caller may manage the session.
Viewer URL for the current caller, when ready.
Player seat assignments.
Show child attributes
Show child attributes
Joined spectators.
Show child attributes
Show child attributes
Whether the selected Coworld supports lobby game configuration.