Back to Aligni.com

GET /api/v2/:api_token/attachments
List attachments.

Retrieve the list of all attachments.

BETA API: This API is beta and is subject to change without notice.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/attachments

# response
<attachments>
  <attachment>
    <id>600</id>
    <created_by>username</created_by>
    <title>part_image.png</title>
    <note_type>File</note_type>
    <content_type>text/csv</content_type>
    <position>1</position>
    <published_at></published_at>
    <md5></md5>
    <file_size>256</file_size>
    <parent_reference>/part/3</parent_reference>
  </attachment>
</attachments>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
page
optional

Fetch requested page.


Value: Must be a Integer
per_page
optional

Fetch a specific number of entries per page.


Value: Must be a Integer

GET /api/v2/:api_token/attachments/:id
Show an attachment.

Retrieve one particular attachment by its id.

BETA API: This API is beta and is subject to change without notice.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/attachments/5
# response
<?xml version="1.0" encoding="UTF-8"?>
<attachment>
  <id>600</id>
  <created_by>username</created_by>
  <title>part_image.png</title>
  <note_type>File</note_type>
  <content_type>text/csv</content_type>
  <position>1</position>
  <published_at></published_at>
  <md5></md5>
  <file_size>256</file_size>
  <parent_reference>/part/3</parent_reference>
</attachment>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a Integer

GET /api/v2/:api_token/attachments/:id/download_uri
Show an attachment's file link.

Retrieve an attachment's URI by its 'ID'.

Use this method to retrieve a temporary link that can be used to download an attachment file. The URI is provided by Amazon S3 and will expire and become invalid after 10 minutes.

Note: the attachment is not included in the response. The attachment must be downloaded using the URI provided.

BETA API: This API is beta and is subject to change without notice.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/attachments/5/download_uri
# response
<?xml version="1.0" encoding="UTF-8"?>
<attachment_link>
  <uri>/attachment/file.pdf</uri>
  <created_at>2020-07-31T08:24:57-11:00</created_at>
  <expires_at>2020-07-31T08:34:57-11:00</expires_at>
</attachment_link>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a Integer
content_disposition
optional

String typically used to provide browser clients guidance on how to present the attachment to the user (e.g. show inline or download). For non-browser applications, this can probably be ignored.

Values considered: inline (default) and attachment.


Value: Must be a String