Attachment Method

Parameters

table
the singular name of the table or its alias as returned by the Describe (Database) method. Please note that this parameter is embedded into the URL before the method name.
column
the name or an alias of the column to query. Please note that this parameter is embedded into the URL after the table name/alias.
key or id
the value of key column or internal record id to retrieve. You should supply either key or id but not both, unless you are requesting data from public attachment column. In this case, these parameters are optional.

And either

revision
the revision to retrieve the file for. The column should have Allow See Revision History property checked to enable to access the information about previous revisions.

or

guid
globally unique identifier of the file.

Please note that output format should not be specified for this method as it returns the content of the file. Also, you can use HEAD HTTP method to retrieve file metadata for examination without retrieving its content.

Request

HEAD https://www.teamdesk.net/secure/api/v2/{appid}/{table}/{column}/attachment?parameters 
GET https://www.teamdesk.net/secure/api/v2/{appid}/{table}/{column}/attachment?parameters 

Or

HEAD https://www.teamdesk.net/secure/api/v2/{appid}/{table}/{column}/attachment/{guid}
GET https://www.teamdesk.net/secure/api/v2/{appid}/{table}/{column}/attachment/{guid} 

Retrieves the file metadata identified by GUID from the column File of in a table Test via HEAD.

HEAD https://www.teamdesk.net/secure/api/v2/21995/Test/File/attachment/5c98ad47-c6ca-437d-8c2f-cb2f929c54b8

Response

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Disposition: attachment; filename=DSC02688.JPG; filename*=utf-8''DSC02688.JPG
X-Revision: 2
Content-Type: image/jpeg
Content-Length: 326133
Last-Modified: Wed, 03 Dec 2014 16:02:31 GMT
X-Author: test user <test@test.com>

Retrieves latest file revision from the column File of the record with id 56 in a table Test.

GET https://www.teamdesk.net/secure/api/v2/21995/Test/File/attachment?id=56

Response

HTTP/1.1 200 OK
Cache-Control: private, must-revalidate, max-age=0
ETag: "1234567890.1234567890"
Content-Disposition: attachment; filename=DSC02688.JPG; filename*=utf-8''DSC02688.JPG
X-Revision: 2
Content-Type: image/jpeg
Content-Length: 326133
Last-Modified: Wed, 03 Dec 2014 16:02:31 GMT
X-Author: test user <test@test.com>

... binary data ...