Blobs API

Blobs API Reference

Blob API Examples

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

Upload a Blob

Upload the blob stored at /path/to/file:

curl -v -X POST \
    -H "@$BEARER_TOKEN_FILE" \
    -H "content_type=image/jpg" \
    -F "file=@/path/to/file" \
    https://app.rkvst.io/archivist/v1/blobs

The response is:

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

Retrieve a Blob

Retrieve a specific Attachment

curl -v \
    -H "@$BEARER_TOKEN_FILE" \
    -H "content_type=image/jpg" \
    -F "file=@/path/to/file" \
    https://app.rkvst.io/archivist/v1/blobs/08838336-c357-460d-902a-3aba9528dd22

The response is:

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

Blobs OpenAPI Docs

API for uploading and downloading blobs.

post  /archivist/v1/blobs

Upload.

Description: Uploads a blob.

{
  "hash": {
    "alg": "SHA256",
    "value": "xxxxxxxxxxxxxxxxxxxxxxx"
  },
  "identity": "blobs/08838336-c357-460d-902a-3aba9528dd22",
  "issuer": "xxxx@example.com",
  "mime_type": "image/jpeg",
  "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.
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
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 create a blob.
429Returned when the user blob limit has been reached.
500Returned when the underlying system returns an error.

get  /archivist/v1/blobs/{uuid}

Download.

Description: Downloads a blob.

Responses Description
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.
500Returned when the underlying system returns an error.

get  /archivist/v1/blobs/{uuid}/info

Retrieve blob metadata.

Description: Returns metadata information on a blob.

{
  "hash": {
    "alg": "SHA256",
    "value": "xxxxxxxxxxxxxxxxxxxxxxx"
  },
  "identity": "blobs/08838336-c357-460d-902a-3aba9528dd22",
  "issuer": "xxxx@example.com",
  "mime_type": "image/jpeg",
  "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.
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
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.
500Returned when the underlying system returns an error.

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
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.

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",
  "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.
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
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.

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
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.

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",
  "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.
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
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.

Edit this page on GitHub