List current sessions
Gives you a list of all the active sessions linked to your API token. (Note: It only shows active sessions, not those that have already been stopped.)
{ "tab": "examples", "url": "https://api.gameye.io/session", "name": "List sessions", "method": "GET", "request": { "pathParameters": [], "queryParameters": [ { "kind": "optional", "name": "filter", "type": "Object", "children": [], "description": "Give us a list of tags to use to filter your sessions. If none of the\nsessions meet the criteria, you'll get an empty list of sessions." } ], "headerParameters": [], "bodyDataParameters": [], "formDataParameters": [] }, "results": { "languages": [ { "id": "p-hQpXLyuKPJhm3SAOk0k", "code": "{\n \"sessions\": [\n {\n \"id\": \"c595bc6f-8522-4a62-95cd-8742136643ea\",\n \"image\": \"my-very-special-game\",\n \"location\": \"frankfurt\",\n \"host\": \"a.b.c.d\",\n \"created\": 1648472895000,\n \"port\": {\n \"80/tcp\": 49160\n },\n \"labels\": {\n \"env\": \"{\\\"GAMEYE_SESSION_ID\\\":\\\"this-is-my-test-session-103\\\",\\\"GAMEYE_HOST\\\":\\\"a.b.c.d\\\"}\",\n \"tags\": \"{\\\"my-example-tag\\\":\\\"1\\\",\\\"another-example-tag\\\":\\\"3\\\"}\"\n }\n }\n ]\n}", "language": "200", "customLabel": "" }, { "id": "DLdp9IwI4kU7YEH8w9pqa", "code": "// You are not authorized to fetch a list of active sessions. Please make sure that the \nincluded bearer token is correct.\n ", "language": "401", "customLabel": "" } ], "selectedLanguageId": "p-hQpXLyuKPJhm3SAOk0k" }, "examples": { "languages": [ { "id": "t9f2uCp1a-kDFDWiM0Ie6", "code": "curl --location --request GET 'https://api.gameye.io/session?Filter=Object' \\\n--header 'Accept: application/json'", "language": "curl", "customLabel": "" }, { "id": "jZavSeqeVmSCfQxMkyi7l", "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\n\nvar requestOptions = {\n method: 'GET',\n headers: myHeaders,\n redirect: 'follow'\n};\n\nfetch(\"https://api.gameye.io/session?Filter=Object\", requestOptions)\n .then(response => response.text())\n .then(result => console.log(result))\n .catch(error => console.log('error', error));", "language": "javascript", "customLabel": "" }, { "id": "Ee1BRyR0zH5k7TdUVQNFg", "code": "import requests\n\nurl = \"https://api.gameye.io/session?Filter=Object\"\n\npayload={}\nheaders = {\n 'Accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n", "language": "python", "customLabel": "" }, { "id": "uO9TofZYWEiI17bndqMwL", "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.gameye.io/session?Filter=Object\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n", "language": "ruby", "customLabel": "" }, { "id": "u2QdLlZKdXqDD0yzSDIrp", "code": "var request = require('request');\nvar options = {\n 'method': 'GET',\n 'url': 'https://api.gameye.io/session?Filter=Object',\n 'headers': {\n 'Accept': 'application/json'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new Error(error);\n console.log(response.body);\n});\n", "language": "nodejs", "customLabel": "" } ], "selectedLanguageId": "u2QdLlZKdXqDD0yzSDIrp" }, "description": "", "currentNewParameter": { "label": "Header Parameter", "value": "headerParameters" }}