Get all Items

Get a list of all Items that exist on a particular Project.

Response Code

200

Arguments

project_id The ID of a Project

Definition

GET: /items?project_id=<PROJECT_ID>

cURL Example

curl https://api.gathercontent.com/items?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, "parent_id": 0, "template_id": null, "position": "11", "name": "Home", "notes": "", "type": "item", "overdue": true, "created_at": { "date": "2015-07-31 10:58:12.000000", "timezone_type": 3, "timezone": "UTC" }, "updated_at": { "date": "2015-07-31 10:58:12.000000", "timezone_type": 3, "timezone": "UTC" }, "status": { "data": { "id": "123456", "is_default": true, "position": "1", "color": "#C5C5C5", "name": "Draft", "description": "", "can_edit": true } }, "due_dates": { "data": [ { "status_id": 123456, "overdue": true, "due_date": { "date": "2015-07-02 12:00:00.000000", "timezone_type": 3, "timezone": "UTC" } }, { "status_id": 123457, "overdue": true, "due_date": { "date": "2015-07-03 16:00:00.000000", "timezone_type": 3, "timezone": "UTC" } } ] } } ] }

PHP Example

<?php
$username 
[email protected]';
$apikey '<YOUR_API_KEY>';
$project_id '<YOUR_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/items?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.