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.
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
401 | Returned when the user is not authenticated to the system. |
403 | Returned when the user is not authorized to get the blob. |
404 | Returned when the underlying system can’t find the event. |
429 | Returned 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 Parameter | Type | Description |
---|---|---|
hash | blob hash. | |
identity | string | blob identity. |
issuer | string | principal issuer. |
mime_type | string | http mime type. |
scanned_bad_reason | string | if scanned as SCANNED_BAD contains a hint of scan result. |
scanned_status | string | status of scan. |
scanned_timestamp | string | date and time when the attachments has been scanned. |
size | integer | size of the blob. |
subject | string | principal subject. |
tenantid | string | identity of the tenant the blob belongs to. |
timestamp_accepted | string | date and time when the request has been received. |
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
401 | Returned when the user is not authenticated to the system. |
403 | Returned when the user is not authorized to get the blob metadata. |
404 | Returned when the underlying system can’t find the event. |
429 | Returned 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.
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
401 | Returned when the user is not authenticated to the system. |
403 | Returned when the user is not authorized to get the blob. |
404 | Returned when the underlying system can’t find the asset. |
429 | Returned 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 Parameter | Type | Description |
---|---|---|
hash | blob hash. | |
identity | string | blob identity. |
issuer | string | principal issuer. |
mime_type | string | http mime type. |
scanned_bad_reason | string | if scanned as SCANNED_BAD contains a hint of scan result. |
scanned_status | string | status of scan. |
scanned_timestamp | string | date and time when the attachments has been scanned. |
size | integer | size of the blob. |
subject | string | principal subject. |
tenantid | string | identity of the tenant the blob belongs to. |
timestamp_accepted | string | date and time when the request has been received. |
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
401 | Returned when the user is not authenticated to the system. |
403 | Returned when the user is not authorized to get the blob metadata. |
404 | Returned when the underlying system can’t find the asset. |
429 | Returned 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.
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
404 | Returned 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 Parameter | Type | Description |
---|---|---|
hash | blob hash. | |
identity | string | blob identity. |
issuer | string | principal issuer. |
mime_type | string | http mime type. |
scanned_bad_reason | string | if scanned as SCANNED_BAD contains a hint of scan result. |
scanned_status | string | status of scan. |
scanned_timestamp | string | date and time when the attachments has been scanned. |
size | integer | size of the blob. |
subject | string | principal subject. |
tenantid | string | identity of the tenant the blob belongs to. |
timestamp_accepted | string | date and time when the request has been received. |
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
404 | Returned 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.
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
404 | Returned 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 Parameter | Type | Description |
---|---|---|
hash | blob hash. | |
identity | string | blob identity. |
issuer | string | principal issuer. |
mime_type | string | http mime type. |
scanned_bad_reason | string | if scanned as SCANNED_BAD contains a hint of scan result. |
scanned_status | string | status of scan. |
scanned_timestamp | string | date and time when the attachments has been scanned. |
size | integer | size of the blob. |
subject | string | principal subject. |
tenantid | string | identity of the tenant the blob belongs to. |
timestamp_accepted | string | date and time when the request has been received. |
Responses | Description |
---|---|
200 | A successful response. |
400 | Returned when the request is badly formed. |
404 | Returned 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
Responses | Description |
---|---|
200 | A successful response. |
401 | Returned when the user is not authenticated to the system. |
429 | Returned when a user exceeds their subscription’s rate limit for requests. |
default | An unexpected error response. |
get /archivist/v2/attachments:openapi-ui
Get OpenAPI html for attachments
Description: Get OpenAPI v2.0 html for attachments
Responses | Description |
---|---|
200 | A successful response. |
401 | Returned when the user is not authenticated to the system. |
429 | Returned when a user exceeds their subscription’s rate limit for requests. |
default | An unexpected error response. |