Attachments API

Attachments API Reference

Attachment API Examples

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

Retrieve a Specific Attachment on an Asset

curl -v \
    -H "@$BEARER_TOKEN_FILE" \
    https://app.rkvst.io/archivist/v2/attachments/assets/c04d5ecf-02e0-4be2-a014-ffbbf0e8ddeb/08838336-c357-460d-902a-3aba9528dd22

Retrieve a Specific Attachment on an Event

curl -v \
    -H "@$BEARER_TOKEN_FILE" \
    https://app.rkvst.io/archivist/v2/attachments/assets/c04d5ecf-02e0-4be2-a014-ffbbf0e8ddeb/events/de834094-f6c3-4e38-9b37-8c61dea312c9/08838336-c357-460d-902a-3aba9528dd22

Retrieve Information about a specific Attachment

It’s also possible to retrieve information about specific attachment using this API.

To do that simply issue request as above with a suffix /info

curl -v \
    -H "@$BEARER_TOKEN_FILE" \
    https://app.rkvst.io/archivist/v2/attachments/assets/c04d5ecf-02e0-4be2-a014-ffbbf0e8ddeb/08838336-c357-460d-902a-3aba9528dd22/info

The response will include basic information about the attachment:

{
    "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
}

Attachment OpenAPI Docs

API for uploading and downloading attachments.

get  /archivist/v2/attachments/assets/{asset_uuid}/events/{event_uuid}/{uuid}

Downloads an event attachment.

Description: Downloads an event attachment, if the given attachment is present in the ‘arc_attachments’ event atttribute.

ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
401Returned when the user is not authenticated to the system.
403Returned when the user is not authorized to get the blob.
404Returned when the underlying system can’t find the event.
429Returned when a user exceeds their subscription’s rate limit for requests.

get  /archivist/v2/attachments/assets/{asset_uuid}/events/{event_uuid}/{uuid}/info

Retrieve metadata on an attachment.

Description: Retrieve metadata on an attachment, if the given attachment is present in the ‘arc_attachments’ event atttribute.

{
  "hash": {
    "alg": "SHA256",
    "value": "xxxxxxxxxxxxxxxxxxxxxxx"
  },
  "identity": "blobs/08838336-c357-460d-902a-3aba9528dd22",
  "issuer": "xxxx@example.com",
  "mime_type": "image/jpeg",
  "scanned_bad_reason": "",
  "scanned_status": "SCANNED_OK",
  "scanned_timestamp": "2019-11-07T15:31:49Z",
  "size": 31424,
  "subject": "user-xxxx@example.com",
  "tenantid": "tenant/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "timestamp_accepted": "2019-11-07T15:31:49Z"
}
Response ParameterTypeDescription
hashblob hash.
identitystringblob identity.
issuerstringprincipal issuer.
mime_typestringhttp mime type.
scanned_bad_reasonstringif scanned as SCANNED_BAD contains a hint of scan result.
scanned_statusstringstatus of scan.
scanned_timestampstringdate and time when the attachments has been scanned.
sizeintegersize of the blob.
subjectstringprincipal subject.
tenantidstringidentity of the tenant the blob belongs to.
timestamp_acceptedstringdate and time when the request has been received.
ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
401Returned when the user is not authenticated to the system.
403Returned when the user is not authorized to get the blob metadata.
404Returned when the underlying system can’t find the event.
429Returned when a user exceeds their subscription’s rate limit for requests.

get  /archivist/v2/attachments/assets/{asset_uuid}/{uuid}

Downloads an asset attachment.

Description: Downloads an asset attachment, if the given attachment is present in the ‘arc_attachments’ asset atttribute.

ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
401Returned when the user is not authenticated to the system.
403Returned when the user is not authorized to get the blob.
404Returned when the underlying system can’t find the asset.
429Returned when a user exceeds their subscription’s rate limit for requests.

get  /archivist/v2/attachments/assets/{asset_uuid}/{uuid}/info

Retrieve metadata on an attachment.

Description: Retrieve metadata on an attachment, if the given attachment is present in the ‘arc_attachments’ asset atttribute.

{
  "hash": {
    "alg": "SHA256",
    "value": "xxxxxxxxxxxxxxxxxxxxxxx"
  },
  "identity": "blobs/08838336-c357-460d-902a-3aba9528dd22",
  "issuer": "xxxx@example.com",
  "mime_type": "image/jpeg",
  "scanned_bad_reason": "",
  "scanned_status": "SCANNED_OK",
  "scanned_timestamp": "2019-11-07T15:31:49Z",
  "size": 31424,
  "subject": "user-xxxx@example.com",
  "tenantid": "tenant/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "timestamp_accepted": "2019-11-07T15:31:49Z"
}
Response ParameterTypeDescription
hashblob hash.
identitystringblob identity.
issuerstringprincipal issuer.
mime_typestringhttp mime type.
scanned_bad_reasonstringif scanned as SCANNED_BAD contains a hint of scan result.
scanned_statusstringstatus of scan.
scanned_timestampstringdate and time when the attachments has been scanned.
sizeintegersize of the blob.
subjectstringprincipal subject.
tenantidstringidentity of the tenant the blob belongs to.
timestamp_acceptedstringdate and time when the request has been received.
ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
401Returned when the user is not authenticated to the system.
403Returned when the user is not authorized to get the blob metadata.
404Returned when the underlying system can’t find the asset.
429Returned when a user exceeds their subscription’s rate limit for requests.

get  /archivist/v2/attachments/publicassets/{asset_uuid}/events/{event_uuid}/{uuid}

Downloads an event attachment from public asset.

Description: Downloads an event attachment, if the given attachment is present in the ‘arc_attachments’ event atttribute.

ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
404Returned when the underlying system can’t find the event.

get  /archivist/v2/attachments/publicassets/{asset_uuid}/events/{event_uuid}/{uuid}/info

Retrieve metadata on an attachment from a public asset.

Description: Retrieve metadata on an attachment, if the given attachment is present in the ‘arc_attachments’ event atttribute.

{
  "hash": {
    "alg": "SHA256",
    "value": "xxxxxxxxxxxxxxxxxxxxxxx"
  },
  "identity": "blobs/08838336-c357-460d-902a-3aba9528dd22",
  "issuer": "xxxx@example.com",
  "mime_type": "image/jpeg",
  "scanned_bad_reason": "",
  "scanned_status": "SCANNED_OK",
  "scanned_timestamp": "2019-11-07T15:31:49Z",
  "size": 31424,
  "subject": "user-xxxx@example.com",
  "tenantid": "tenant/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "timestamp_accepted": "2019-11-07T15:31:49Z"
}
Response ParameterTypeDescription
hashblob hash.
identitystringblob identity.
issuerstringprincipal issuer.
mime_typestringhttp mime type.
scanned_bad_reasonstringif scanned as SCANNED_BAD contains a hint of scan result.
scanned_statusstringstatus of scan.
scanned_timestampstringdate and time when the attachments has been scanned.
sizeintegersize of the blob.
subjectstringprincipal subject.
tenantidstringidentity of the tenant the blob belongs to.
timestamp_acceptedstringdate and time when the request has been received.
ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
404Returned when the underlying system can’t find the event.

get  /archivist/v2/attachments/publicassets/{asset_uuid}/{uuid}

Downloads an public asset attachment.

Description: Downloads an asset attachment, if the given attachment is present in the ‘arc_attachments’ asset atttribute.

ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
404Returned when the underlying system can’t find the asset.

get  /archivist/v2/attachments/publicassets/{asset_uuid}/{uuid}/info

Retrieve metadata on an attachment from a public asset.

Description: Retrieve metadata on an attachment, if the given attachment is present in the ‘arc_attachments’ asset atttribute.

{
  "hash": {
    "alg": "SHA256",
    "value": "xxxxxxxxxxxxxxxxxxxxxxx"
  },
  "identity": "blobs/08838336-c357-460d-902a-3aba9528dd22",
  "issuer": "xxxx@example.com",
  "mime_type": "image/jpeg",
  "scanned_bad_reason": "",
  "scanned_status": "SCANNED_OK",
  "scanned_timestamp": "2019-11-07T15:31:49Z",
  "size": 31424,
  "subject": "user-xxxx@example.com",
  "tenantid": "tenant/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "timestamp_accepted": "2019-11-07T15:31:49Z"
}
Response ParameterTypeDescription
hashblob hash.
identitystringblob identity.
issuerstringprincipal issuer.
mime_typestringhttp mime type.
scanned_bad_reasonstringif scanned as SCANNED_BAD contains a hint of scan result.
scanned_statusstringstatus of scan.
scanned_timestampstringdate and time when the attachments has been scanned.
sizeintegersize of the blob.
subjectstringprincipal subject.
tenantidstringidentity of the tenant the blob belongs to.
timestamp_acceptedstringdate and time when the request has been received.
ResponsesDescription
200A successful response.
400Returned when the request is badly formed.
404Returned when the underlying system can’t find the asset.

get  /archivist/v2/attachments:openapi

Get OpenAPI spec for Attachments

Description: Get OpenAPI v2.0 spec for attachments

ResponsesDescription
200A successful response.
401Returned when the user is not authenticated to the system.
429Returned when a user exceeds their subscription’s rate limit for requests.
defaultAn unexpected error response.

get  /archivist/v2/attachments:openapi-ui

Get OpenAPI html for attachments

Description: Get OpenAPI v2.0 html for attachments

ResponsesDescription
200A successful response.
401Returned when the user is not authenticated to the system.
429Returned when a user exceeds their subscription’s rate limit for requests.
defaultAn unexpected error response.

Edit this page on GitHub