Skip to content

GET /session — List active sessions

GET https://api.sandbox-gameye.gameye.net/session

Section titled “GET https://api.sandbox-gameye.gameye.net/session”

Lists all active sessions tied to your API token. Stopped sessions are not included unless you pass all=true.

ParameterTypeRequiredDescription
allbooleanNoReturn all sessions regardless of status (including stopped). Defaults to false.
locationstringNoFilter results by location/region, e.g. europe.
imagestringNoFilter results by application image name.
tagstringNoFilter results by image tag/version.
hoststringNoFilter results by host IP address.
playerCount[lt]integerNoReturn only sessions with fewer than this many players. Useful for matchmaking backfill.
playerCount[gt]integerNoReturn only sessions with more than this many players.
filter[key]stringNoFilter by a specific label key/value pair, e.g. filter[game-mode]=ranked. Multiple keys may be combined.
cURL
curl --location 'https://api.sandbox-gameye.gameye.net/session' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.sandbox-gameye.gameye.net/session", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.sandbox-gameye.gameye.net/session")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
Python
import requests
import json
url = "https://api.sandbox-gameye.gameye.net/session"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)

Successfully looked up all of the active sessions that are tied to your API token.

FieldTypeRequired
sessionsarrayYes
// Successfully looked up all of the active sessions that are tied to your API token.
{
"sessions": [
{
"id": "f7965a22-e327-4541-a30e-8262890d3a29",
"image": "nginx",
"tag": "latest",
"location": "europe",
"host": "a.b.c.d",
"created": 1648472895000,
"port": "{\"port\":{\"80/tcp\":49160}}",
"status": "",
"labels": "{\"labels\":{\"env\":\"{\\\"GAMEYE_SESSION_ID\\\":\\\"c595bc6f-8522-4a62-95cd-8742136643ea\\\",\\\"GAMEYE_HOST\\\":\\\"a.b.c.d\\\"}\",\"tags\":\"{\\\"my-example-tag\\\":\\\"1\\\",\\\"another-example-tag\\\":\\\"3\\\"}\"}}",
"playerCount": 0
}
]
}

You are not authorized to fetch a list of active sessions. Please make sure that the included bearer token is correct.

FieldTypeRequired
statusCodeintegerYes
codestringYes
messagestringYes
detailsstringYes
pathstringYes
timestampstringYes
identifierstringYes
violationsarrayNo
// You are not authorized to fetch a list of active sessions. Please make sure that the included bearer token is correct.
{
"statusCode": 0,
"code": "",
"message": "",
"details": "",
"path": "",
"timestamp": "",
"identifier": "",
"violations": [
{
"field": "",
"description": ""
}
]
}