(mt):Get service ids

  • 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

Contents

This method provides a way to retrieve the (mt) Media Temple services associated with the currently authenticated account.

Request Info

The following URL and HTTP method should be used:

HTTP Method URL
GET https://api.mediatemple.net/api/v1/services/ids


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, do the following:

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

Sample Response

Here is an example of the returned result:

{
"serviceIds" : [ "560", "558", "559", "556", "557", "555" ]
}

Here is an example of the result in XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes">
<serviceIds>
<serviceId>560</serviceId>
<serviceId>558</serviceId>
<serviceId>559</serviceId>
<serviceId>556</serviceId>
<serviceId>557</serviceId>
<serviceId>555</serviceId>
</serviceIds>

Response Fields

The fields in the result represent the following:

Field Description
serviceIdsThe list of service ids associated with the currently authenticated account.