Skip to content

Download your artifacts

Starts downloading an artifact. This could be a file or a folder inside the underlying container. So make sure the path is an absolute Unix path to a specific file or folder.

Note: You can only download the artifact after you’ve stopped the session. You’ll then download it directly from the container itself. The artifact will be a .tar.gz archive containing your file or folder.

We’ll remove the artifacts when we remove the container from the host machine. That means you could lose them if you don’t grab them in time, container data is held on the machine for a duration of 4 hours before being cleared to retain space.

{
"tab": "examples",
"url": "https://api.gameye.io/artifacts",
"name": "Download artifact",
"method": "GET",
"request": {
"pathParameters": [
{
"name": "session",
"kind": "required",
"type": "string",
"description": "The unique ID of the session you're downloading the artifact from.",
"children": []
},
{
"name": "path",
"kind": "required",
"type": "string",
"description": "The local path inside the container for the target file or folder that you want to download.",
"children": []
}
],
"queryParameters": [],
"headerParameters": [],
"bodyDataParameters": [],
"formDataParameters": []
},
"results": {
"languages": [
{
"id": "ZJvq9dxXq1COk96yRLJtQ",
"code": "// A download of the artifact in .tar.gz format has been initiated.",
"language": "200",
"customLabel": ""
},
{
"id": "ahdBIzduUII2kfvp0l-VK",
"code": "// You are not authorized to fetch an artifact. Please make sure that the \nincluded bearer token is correct.",
"language": "401",
"customLabel": ""
},
{
"id": "FRHxk14zP45xe_w2ukqiU",
"code": "// Could not find a session with the given session id. It is possible that either the\nsession has never existed at all or the container's lifespan on the machine has\nexpired.",
"language": "404",
"customLabel": ""
}
],
"selectedLanguageId": "ahdBIzduUII2kfvp0l-VK"
},
"examples": {
"languages": [
{
"id": "s7Ai1aL6M6gyPpSNtkOeC",
"code": "curl --location --request GET 'https://api.gameye.io/artifacts?session=string&path=string' \\\n--header 'Accept: application/json'",
"language": "curl",
"customLabel": ""
},
{
"id": "BG_pkWve9zZ_GdRjOy64D",
"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/artifacts?session=string&path=string\", requestOptions)\n .then(response => response.text())\n .then(result => console.log(result))\n .catch(error => console.log('error', error));",
"language": "javascript",
"customLabel": ""
},
{
"id": "ltPO2wAWdZbTFJiHSjY13",
"code": "import requests\n\nurl = \"https://api.gameye.io/artifacts?session=string&path=string\"\n\npayload={}\nheaders = {\n 'Accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n\n",
"language": "python",
"customLabel": ""
},
{
"id": "t2xuYuVNTBxF3lPzaO8l1",
"code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.gameye.io/artifacts?session=string&path=string\")\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\n",
"language": "ruby",
"customLabel": ""
}
],
"selectedLanguageId": "t2xuYuVNTBxF3lPzaO8l1"
},
"description": "",
"currentNewParameter": {
"label": "Path Parameter",
"value": "pathParameters"
},
"response": [
{
"name": "id",
"kind": "optional",
"type": "string",
"description": "ID of the cake retrieved"
}
]
}