This is through the REST API, I'm using CiviCRM 4.4.14, REST API v3.
I read that there is an attachment API, but the attachment API does not seem to be available through the REST API.
CiviCRM Stack Exchange is a question and answer site for administrators and users of the CiviCRM Constituent Relationship Management software. It only takes a minute to sign up.Sign up to join this community
I think you're right. The table that links attachments to what they're attached to is
civicrm_entity_file, and the table with details of the file itself is
civicrm_file. In 4.4 (and indeed 4.6 and 4.7) the former has its own DAO but isn't its own API entity.
If you want to get details of the attachments on some entity, you might need to write a custom API function wrapping
One way you can present a link to the user to download the attachment, is
/civicrm/file?id=<file ID>&eid=<activity ID>, but they'll need the 'access uploaded files' permission. On Drupal (I don't know about roles and permissions in Wordpress) this means they'd either need to be actually logged into Civi with a role that has that permission, or the permission would need to be granted to anonymous users, which would mean anybody could grab any attachment by guessing the numbers.
Another way you could allow your app to download an attachment is to write a custom API that base64-encodes the file contents and includes that in the API result.