Get campaign history
curl --request GET \
--url https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history', 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/leagues/{league_id}/campaign/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/leagues/{league_id}/campaign/history"
req, _ := http.NewRequest("GET", 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.get("https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"league_id": "<string>",
"player_id": "<string>",
"round": 123,
"battles": [
{
"round": 123,
"kind": "invade",
"mode": "1v1",
"role": "attacker",
"target": "<string>",
"outcome": "claimed",
"result": "won",
"opponents": [
"<string>"
],
"allies": [
"<string>"
],
"round_id": "<string>",
"source": "<string>",
"staked": false,
"winner": "<string>",
"episode_ids": [
"<string>"
],
"replay_urls": [
"<string>"
]
}
],
"transfers": [
{
"round": 123,
"cell": "<string>",
"to_player": "<string>",
"why": "claim",
"from_player": "<string>"
}
],
"territory": [
{
"round": 123,
"cells": 123
}
],
"head_to_head": {},
"names": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Leagues
Get campaign history
Return one player’s battles, territory transfers, and territory totals in the retained window.
GET
/
v2
/
leagues
/
{league_id}
/
campaign
/
history
Get campaign history
curl --request GET \
--url https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history', 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/leagues/{league_id}/campaign/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/leagues/{league_id}/campaign/history"
req, _ := http.NewRequest("GET", 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.get("https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/leagues/{league_id}/campaign/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"league_id": "<string>",
"player_id": "<string>",
"round": 123,
"battles": [
{
"round": 123,
"kind": "invade",
"mode": "1v1",
"role": "attacker",
"target": "<string>",
"outcome": "claimed",
"result": "won",
"opponents": [
"<string>"
],
"allies": [
"<string>"
],
"round_id": "<string>",
"source": "<string>",
"staked": false,
"winner": "<string>",
"episode_ids": [
"<string>"
],
"replay_urls": [
"<string>"
]
}
],
"transfers": [
{
"round": 123,
"cell": "<string>",
"to_player": "<string>",
"why": "claim",
"from_player": "<string>"
}
],
"territory": [
{
"round": 123,
"cells": 123
}
],
"head_to_head": {},
"names": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer token issued by Softmax
Path Parameters
League whose campaign history should be searched.
Pattern:
^league_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Query Parameters
Campaign player whose history should be returned.
Pattern:
^ply_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Most recent retained rounds to include.
Required range:
x >= 1Response
Successful Response
League whose campaign history is returned.
Player whose history is returned.
Latest completed campaign round.
Battles involving the player in the retained window.
Show child attributes
Show child attributes
Territory transfers involving the player.
Show child attributes
Show child attributes
Player's territory count after each retained round.
Show child attributes
Show child attributes
Episode-seat record keyed by opponent player ID.
Show child attributes
Show child attributes
Current display names keyed by player ID.
Show child attributes
Show child attributes