API V2
Available Locations
11 min
the available locations endpoint helps you determine which regions are currently able to host your game image this is particularly useful for finding the best location for a new game session checking server availability in different regions measuring latency to different hosting locations getting available locations endpoint get /available location/{image} path parameters parameter type required description image string yes the id of the game image you want to check locations for example request get /available location/my game server http/1 1 host api gameye io authorization bearer your token here success response on success, you'll receive a 200 ok response with a list of available locations regions use standardized names for clearer geographic understanding { "locations" \[ { "id" "eu west 1", "ips" \[ "203 0 113 42" ] }, { "id" "eu central 1", "ips" \[ "198 51 100 24" ] }, { "id" "us east 1", "ips" \[ "192 0 2 15" ] } ] } error responses status code description 401 unauthorized invalid bearer token 404 not found image not found or you're not authorized to use it using location information ip addresses for latency testing each location in the response includes a pingable ip address that you can use to test network latency these ips accept icmp ping messages, allowing you to determine which location will provide the best performance for your players example ping test \# testing latency to eu west region ping 203 0 113 42 \# testing latency to eu central region ping 198 51 100 24 best practices here are some recommended practices when working with location data don't cache location data the list of available locations may change, so it's best to request fresh data when needed rather than caching it latency based location selection test latency to each location to determine the best one for your players fallback locations have backup locations in case your preferred location is unavailable regular availability checks if your application needs to create sessions frequently, periodically check location availability common usage patterns player optimized location selection retrieve the list of available locations test latency from your player's location to each available location select the location with the lowest latency create a new session in that location geographic distribution if you have players from different regions group players by geographic proximity find the best available location for each group create sessions in multiple locations to minimize latency for all players availability monitoring for applications that need high availability regularly check which locations are available if a previously available location becomes unavailable, redirect new sessions to alternative locations

