User Tools

Site Tools


resource_attachment_list

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:
    curl -u user:apikey https://4thefile.com/api_v1/resources/MyjZLrPd/attachments.xml
  • example xml response:
<?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>
resource_attachment_list.txt · Last modified: 2011/01/04 21:50 by jay