(mt):API Content Types
- This page was last modified on February 17, 2011, at 14:16.
From (mt) Community Wiki
The (mt) Media Temple API provides resource extensions and Accept Headers (see also API HTTP headers) that can be added to the request to specify content types for API requests and responses.
Extensions
The following is a list of extensions that can be used for any resource requests:
| Param | Description | Default | Example |
|---|---|---|---|
| json | Specify that response data should be in JSON format | yes | GET /api/stats/111.json |
| xml | Specify that response data should be in XML format | no | GET /api/stats/111.xml |
Query Parameters
See API Query parameters for information on the available HTTP query parameters that can be used to specify content types for requests or responses.
Headers
See API HTTP headers for information on the available HTTP headers that can be used to specify content types for requests or responses.