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" \
--output "/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",
"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. |
402 | Returned when the number of blobs would exceed the user’s quota or the size of the blob exceeds the user’s allocation. |
403 | Returned when the user is not authorized to create a blob. |
429 | Returned when a user exceeds their subscription’s rate limit for requests. |
500 | Returned when the underlying system returns an error. |
get /archivist/v1/blobs/{uuid}
Download.
Description: Downloads a blob.
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. |
429 | Returned when a user exceeds their subscription’s rate limit for requests. |
500 | Returned 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",
"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. |
429 | Returned when a user exceeds their subscription’s rate limit for requests. |
500 | Returned when the underlying system returns an error. |
get /archivist/v1/blobs:openapi
Get OpenAPI spec for Blobs
Description: Get OpenAPI v2.0 spec for blobs
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/v1/blobs:openapi-ui
Get OpenAPI html for Blobs
Description: Get OpenAPI v2.0 html for blobs
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. |