List available locations
Get all the locations that can currently host your image, including an IP that you can ping to find out the latency to the location.
{ "tab": "examples", "url": "https://api.gameye.io/available-location/{image}", "name": "List locations", "method": "GET", "request": { "pathParameters": [], "queryParameters": [], "headerParameters": [], "bodyDataParameters": [ { "kind": "required", "name": "image", "type": "string", "description": "The ID of the image." } ], "formDataParameters": [] }, "results": { "languages": [ { "id": "qtwVmKc3jsqVAxiIJ32er", "code": "// Ok, locations are in the body \n{\n \"locations\": [\n {\n \"id\": \"\",\n \"ips\": [\n \"\"\n ]\n }\n ]\n}", "language": "200", "customLabel": "" }, { "id": "O0pTAAeC2ER32Md3vUQrq", "code": "// Not authorized!", "language": "401", "customLabel": "" }, { "id": "va-zsEgC0Hhlz1I-gu_tb", "code": "// Image not found or you are not authorized to use this image.\n ", "language": "404", "customLabel": "" } ], "selectedLanguageId": "qtwVmKc3jsqVAxiIJ32er" }, "examples": { "languages": [ { "id": "3PnLE1tWnEC82-PxALsZZ", "code": "curl --location -g --request GET 'https://api.gameye.io/available-location/{image}' \\\n--header 'Accept: application/json'", "language": "curl", "customLabel": "" }, { "id": "_9bZwmSaOIT3wNjhN_fKV", "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/available-location/{image}\", requestOptions)\n .then(response => response.text())\n .then(result => console.log(result))\n .catch(error => console.log('error', error));", "language": "javascript", "customLabel": "" }, { "id": "vlYdVf9ZH2WYq6WMtMjsM", "code": "import requests\n\nurl = \"https://api.gameye.io/available-location/{image}\"\n\npayload={}\nheaders = {\n 'Accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)", "language": "python", "customLabel": "" }, { "id": "r9PizA44ko_b9GLfHRlPv", "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.gameye.io/available-location/{image}\")\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": "" } ], "selectedLanguageId": "3PnLE1tWnEC82-PxALsZZ" }, "description": "", "currentNewParameter": { "label": "Body Parameter", "value": "bodyDataParameters" }}