/mail/get_server_info
GET https://api.sitehost.nz/1.0/mail/get_server_info.json
Returns information about the specified server.
Query Parameters
Parameter | Type | Required | Description |
client_id | integer | Yes | The ID for the client that the server belongs to.Example: 1 |
server_name | string | Yes | The name of the server to query.Example: my-mail-server |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/mail/get_server_info.json?apikey=your_key_here&client_id=1&server_name=my-mail-server", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/mail/get_server_info.json?apikey=your_key_here&client_id=1&server_name=my-mail-server");
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.0/mail/get_server_info.json?apikey=your_key_here&client_id=1&server_name=my-mail-server")
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.0/mail/get_server_info.json?apikey=your_key_here&client_id=1&server_name=my-mail-server'
response = requests.get(uri)
Response
200:Server information returned successfully.