API V2
API Reference
/session
1 min
code examples curl location 'https //api sandbox gameye gameye net/session' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "location" "europe", "image" "nginx" }'import requests import json url = "https //api sandbox gameye gameye net/session" payload = json dumps({ "location" "europe", "image" "nginx" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) var options = new restclientoptions("https //api sandbox gameye gameye net") { maxtimeout = 1, }; var client = new restclient(options); var request = new restrequest("/session", method post); request addheader("accept", "application/json"); request addheader("content type", "application/json"); var body = @"{" + "\n" + @" ""location"" ""europe""," + "\n" + @" ""image"" ""nginx""" + "\n" + @"}"; request addstringbody(body, dataformat json); restresponse response = await client executeasync(request); console writeline(response content);var request = require('request'); var options = { 'method' 'post', 'url' 'https //api sandbox gameye gameye net/session', 'headers' { 'accept' 'application/json', 'content type' 'application/json' }, body json stringify({ "location" "europe", "image" "nginx" }) }; request(options, function (error, response) { if (error) throw new error(error); console log(response body); }); responses // a session has successfully been started on a machine in the provided location { "id" "", "host" "", "ports" \[ { "type" "", "container" 0, "host" 0 } ] }// you are not authorized to start a session please make sure that the included bearer token is correct { "statuscode" 0, "code" "", "message" "", "details" "", "path" "", "timestamp" "", "identifier" "", "violations" \[ { "field" "", "description" "" } ] }// the request contains a location, image or organization that does not exist { "statuscode" 0, "code" "", "message" "", "details" "", "path" "", "timestamp" "", "identifier" "", "violations" \[ { "field" "", "description" "" } ] }// cannot start a session with the provided id please use a unique identifier for your session it is recommended to use a uuid { "statuscode" 0, "code" "", "message" "", "details" "", "path" "", "timestamp" "", "identifier" "", "violations" \[ { "field" "", "description" "" } ] }// this session can not be started in the provided location currently this could also be the result of starting too many sessions in a short period of time please try again later! { "statuscode" 0, "code" "", "message" "", "details" "", "path" "", "timestamp" "", "identifier" "", "violations" \[ { "field" "", "description" "" } ] }// bad request this may imply that the given request has invalid syntax { "statuscode" 0, "code" "", "message" "", "details" "", "path" "", "timestamp" "", "identifier" "", "violations" \[ { "field" "", "description" "" } ] }
