/cloud/image/get
GET https://api.sitehost.nz/1.1/cloud/image/get.json
Returns information about a custom image.
Query Parameters
Parameter | Type | Required | Description |
client_id | integer | Yes | The ID for the client that the image belongs to.Example: 1 |
code | string | Yes | The code for the image.Example: my-custom-image |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.1/cloud/image/get.json?apikey=your_key_here&client_id=1&code=my-custom-image", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.1/cloud/image/get.json?apikey=your_key_here&client_id=1&code=my-custom-image");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'
uri = URI.parse("https://api.sitehost.nz/1.1/cloud/image/get.json?apikey=your_key_here&client_id=1&code=my-custom-image")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
import requests
uri = 'https://api.sitehost.nz/1.1/cloud/image/get.json?apikey=your_key_here&client_id=1&code=my-custom-image'
response = requests.get(uri)
Response
200:application/json
{
"return": {
"id": "491",
"client_id": "1",
"label": "My Custom Image",
"code": "my-custom-image",
"version": "",
"labels": "",
"changelog": "",
"date_added": "2017-02-09 15:29:13",
"date_updated": "2017-02-09 02:29:21",
"is_public": "0",
"is_missing": "0",
"project_id": "567",
"registry_id": "7",
"forked_from": null,
"pending": null,
"client_name": "My SiteHost Account",
"image_type": "Custom",
"registry_url": "registry-clients.sitehost.co.nz",
"container_count": 0
},
"msg": "Successful",
"status": true
}
"return": {
"id": "491",
"client_id": "1",
"label": "My Custom Image",
"code": "my-custom-image",
"version": "",
"labels": "",
"changelog": "",
"date_added": "2017-02-09 15:29:13",
"date_updated": "2017-02-09 02:29:21",
"is_public": "0",
"is_missing": "0",
"project_id": "567",
"registry_id": "7",
"forked_from": null,
"pending": null,
"client_name": "My SiteHost Account",
"image_type": "Custom",
"registry_url": "registry-clients.sitehost.co.nz",
"container_count": 0
},
"msg": "Successful",
"status": true
}