Get a list of Files

Get a list of all files related to a particular Item. Check the sample response to learn how this data is structured.

Response Code

200

Definition

GET: /items/<ITEM_ID>/files

cURL Example

curl https://api.gathercontent.com/items/<ITEM_ID>/files \ -u [email protected]:<YOUR_API_KEY> \ -H "Accept: application/vnd.gathercontent.v0.5+json"

Returns

JSON Object

Example Response

{ "data": [ { "id": 1, "user_id": 1, "item_id": 1, "field": "abc123", "type": "1", "url": "http://link.to/filename.png", "filename": "original.png", "size": 123456, "created_at": "2015-12-10 18:49:17", "updated_at": "2015-12-10 18:49:17" } ] }

PHP Example

<?php
$username 
[email protected]';
$apikey '<YOUR_API_KEY>';
$item_id '<ITEM_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/' $item_id '/files');
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.