User Tools

Site Tools


resource_attachment_list

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

resource_attachment_list [2011/01/04 21:50] (current)
jay created
Line 1: Line 1:
 +===== GET /resources/:resourcekey/attachments.format=====
 +
 +GET /resources/:resourcekey/attachments.format returns a list of attachments and some metadata for resource :resourcekey. If the resource exists but has no attachments, the attachment_count will be 0 and there will be no attachment elements. If the :resourcekey does not exist, a 404 will be returned.
 +
 +  * response formats supported: .xml, .json
 +  * query parameters: none
 +  * Curl command line: <code>curl -u user:apikey https://4thefile.com/api_v1/resources/MyjZLrPd/attachments.xml</code>
 +  * example xml response:
 +<code xml>
 +<?xml version="1.0" encoding="UTF-8"?>
 +<data>
 +  <attachment>
 +    <attachment_https_url>https://4thefile.com/part/xerfpZe1</attachment_https_url>
 +    <attachment_url>http://4thefile.com/part/xerfpZe1</attachment_url>
 +    <content_type>image/png</content_type>
 +    <filename>logo_m5.80.png</filename>
 +    <filesize>22104</filesize>
 +    <partkey>xerfpZe1</partkey>
 +  </attachment>
 +  <attachment>
 +    <attachment_https_url>https://4thefile.com/part/vpIIUmAY</attachment_https_url>
 +    <attachment_url>http://4thefile.com/part/vpIIUmAY</attachment_url>
 +    <content_type>image/jpeg</content_type>
 +    <filename>ISO 9001_2008.jpg</filename>
 +    <filesize>16456</filesize>
 +    <partkey>vpIIUmAY</partkey>
 +  </attachment>
 +  <attachment_count>2</attachment_count>
 +  <resource_key>MyjZLrPd</resource_key>
 +  <resource_link>https://4thefile.com/api_v1/resources/MyjZLrPd</resource_link>
 +</data>
 +</code>
  
resource_attachment_list.txt ยท Last modified: 2011/01/04 21:50 by jay