Get all Templates

Retrieves a list of all Templates associated with the given Project.

Response Code

200

Arguments

project_id The Project ID for the Templates

Definition

GET https://api.gathercontent.com/templates

cURL Example

curl https://api.gathercontent.com/templates?project_id=<PROJECT_ID> \ -u [email protected]:<YOUR_API_KEY> \ -H "Accept: application/vnd.gathercontent.v0.5+json"

Returns

JSON Object

Example Response

{ "data": [ { "id": 123456, "project_id": 123456, "created_by": 123456, "updated_by": 123456, "name": "Blog Theme", "description": "Blog theme", "used_at": "2015-08-26 17:03:20", "created_at": 1440604320, "updated_at": 1440608600, "usage": { "item_count": 1 } } [ }

PHP Example

<?php
$username 
[email protected]';
$apikey '<YOUR_API_KEY>';

$project_id '<PROJECT_ID>';

$ch curl_init();

curl_setopt$chCURLOPT_HTTPAUTHCURLAUTH_BASIC);
curl_setopt$chCURLOPT_HTTPHEADER, array('Accept: application/vnd.gathercontent.v0.5+json'));
curl_setopt$chCURLOPT_USERPWD$username ':' $apikey);
curl_setopt$chCURLOPT_URL'https://api.gathercontent.com/templates?project_id=' $project_id);
curl_setopt$chCURLOPT_RETURNTRANSFERtrue );

$response json_decodecurl_exec$ch ) );
curl_close$ch );

Great, welcome aboard!

That’s it! You’re signed up to our mailing list and can expect content strategy goodness in your inbox soon.