At https://developer.templatecloud.com/docs, we provide live documentation for each of the the API requests, along with convenient entry forms where you can specify values for parameters to test your queries.
Use standard HTTP requests to communicate with the API.
GET requests are used to read data from TemplateCloud using the API;
PUT and POST requests try to write information to TemplateCloud using the API.
The following example is a request to the API’s sandbox handler, which returns a list of tag types:
GET http://api.templatecloud.com/sandbox/tag_types/?user_key=ba386e729c5f6870cea89f38e92d7a5c&format=json
You have the option of specifying the response format using the format parameter. Allowed values are json or xml, the default being xml.
You’ll need your own user_key (see Getting your App Approved).
{ "status": "error", "message": "Template not found" }
Where one record is returned, it is presented as a lone object, e.g.
GET http://api.templatecloud.com/sandbox/tag_types/1?user_key=ba386e729c5f6870cea89f38e92d7a5c&format=json
{ "tag_type": { "id": "1", "name": "Industry Types" } }
Where more than one record is returned, the top-level object is an array (having a plural name tag_types), containing child tag type objects.
e.g. here are the requests and responses for tag types:
GET http://api.templatecloud.com/sandbox/tag_types/?user_key=ba386e729c5f6870cea89f38e92d7a5c&format=json
{
"tag_types": [
{
"id": "1",
"name": "Industry Types"
},
{
"id": "2",
"name": "Client"
},
etc...
]
}
The XML version is below. Note that the above JSON does not encapsulate the array's items as named objects, but the XML necessarily does:
GET http://api.templatecloud.com/sandbox/tag_types/?user_key=ba386e729c5f6870cea89f38e92d7a5c&format=xml
<response status="ok"> <tag_types> <tag_type> <id>1</id> <name>Industry Types</name> </tag_type> <tag_type> <id>2</id> <name>Client</name> </tag_type> etc... </tag_types> </response>
See also
|
|||
Jump to contents page of
|