(mt):Get service details

  • This page was last modified on February 17, 2011, at 14:16.
The (mt) Community Wiki is a collaborative project. Any (mt) Media Temple customer or employee may contribute. Not all articles and/or content have been tested for accuracy by (mt) Media Temple.

For officially moderated and tested articles, be sure to visit our KnowledgeBase.

From (mt) Community Wiki

Retrieve details about a particular service over the Public API.

Contents

Request info

The following URL and HTTP method should be used:

HTTP Method URL
GET https://api.mediatemple.net/api/v1/services/{serviceId}


The following parameters must be provided in the URL:

Parameter Type Description
serviceId int The service id

Response info

The response will return an HTTP status code to indicate the general category of success or failure to the client. More specific error codes and messages will be contained in the response data itself, if provided. For more information on response codes and parsing response data, see Parsing API responses.

Sample request

To get a list of services in JSON format for service id 556, do the following:

curl -D log.txt -s -X "GET" "http://api.mediatemple.net/api/v1/services/556.json?apikey=a5h34sf62..."

Sample response

Here is an example of the returned result:

{
"service" : {
"id" : 556,
"serviceType" : 605,
"serviceTypeName" : "(dv) Dedicated-Virtual Base 3.5",
"ipAddresses" : [ "192.168.200.66" ],
"hostServer" : "vz000.mediatemple.net",
"billingStatus" : "0",
"billingStatusText" : "OPEN",
"operatingSystem" : "1002",
"operatingSystemName" : "Centos 5",
"accessDomain" : null,
"primaryDomain" : "dv35.tylerdurden.com",
"addons" : [ {
"id" : 258,
"description" : "(dv) Linux Plesk Basic Unlimit"
}, {
"id" : 298,
"description" : "(dv) Snapshot Backups"
}, {
"id" : 69,
"description" : "(dv) 256mb memory"
} ]
}
}

Response fields

The fields in the result represent the following:

Field Description
services The list of services associated with the currently authenticated account


The fields for each of the service items in the result represent the following:

Field Description
id The service id
serviceType The service type as an integer
serviceTypeName The service type description
ipAddresses The list of IP addresses associated with the service
hostServer The server this service is hosted on
billingStatus The billing status as an integer
billingStatusText The billing status description
operatingSystem The operating system as an integer
operatingSystemName The operating system description
accessDomain The access domain associated with the service
primaryDomain The primary domain for the service
addons Any add-ons associated with the service


The fields for each Add-on represent the following:

Field Description
id The add-on id
description The description of the add-on