Retrieve AttachmentΒΆ

Warning

This endpoint is currently deprecated and has been replaced by the Blobs endpoint.

Note

Attachments in the Jitsuin Archivist system are not first-order objects in their own right: they are properties of other objects such as Asset Records or events. Due to this, Attachments MUST be retrieved by full unique resource identity as stored in an asset Record or Event property. They cannot be listed, filtered, or searched.

Create the bearer_token and store in a file in a secure local directory with 0600 permissions.

See API Request Authorization and Authentication.

Note

The following example shows use of the API over curl in a bash terminal. The concepts are fully portable to any other REST client (eg PostMan or python requests)

Set the URL (for example):

$ export URL=https://synsation.1234-5678.nodes.archivist.jitsuin.io

Retrieve a specific Attachment

$ curl -v \
    -H "@$BEARER_TOKEN_FILE" \
    -H "content_type=image/jpg" \
    -F "file=@/path/to/file" \
    $URL/archivist/v1/attachments/08838336-c357-460d-902a-3aba9528dd22

The response is:

{
    "identity": "attachments/08838336-c357-460d-902a-3aba9528dd22",
    "hash": {
        "alg": "SHA256",
        "value": "xxxxxxxxxxxxxxxxxxxxxxx"
    },
    "mime_type": "image/jpeg",
    "timestamp_accepted": "2019-11-07T15:31:49Z",
    "size": 31424
}

Note

The number of records returned has a maximum limit. If this limit is too small then one must use API Request Paging.

A full API reference is available in Swagger GET API