API Reference for Document Store Service (1.0)

Download OpenAPI specification:Download

Many blockchain use cases require the pinning of on-chain transactions to securely stored documents that cannot be held on-chain, either because they are too large or the information is too sensitive to put into your immutable shared ledger. Kaleido’s Document Store was created for these use cases, providing a private store solely for your individual use. We provide the mechanism to generate hashes that uniquely tie an on-chain asset, token, or transaction to off-chain data.

documentstore

Configuration

Retrieves the document store service configuration

Retrieves the document store service configuration.

Responses

200

Retrieve the document store service configuration.

500

Internal error

get /config

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/config

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "provider": "internal",
  • "region": "string",
  • "bucket_or_container": "string"
}

Documents

When the path matches a folder, it retrieves the (

When the path matches a folder, it retrieves the (paginated) list of documents and subfolders contained within it. When the path matches a document, it returns either its content or, if query parameter details_only is true, its metadata. Use empty string for root folder.

path Parameters
path
required
string

Path to document or folder.

query Parameters
offset
integer
Default: 0

Number of entries to skip.

limit
integer
Default: 100

Maximum number of entries.

Responses

200

Document content, metadata or list of documents and subfolders.

400

Parameters offset or limit invalid.

404

Document or folder not found.

500

Internal error.

get /documents/{path}

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/documents/{path}

Response samples

Content type
Example
Copy
Expand all Collapse all
{
  • "is_truncated": true,
  • "entries":
    [
    ]
}

Uploads a document. If the path doesn't exist, it

Uploads a document. If the path doesn't exist, it will be automatically created.

path Parameters
path
required
string

Path to document or folder.

Request Body schema: multipart/form-data
document
required
string <binary>

Document to upload.

Responses

201

Document successfully uploaded.

409

Document already existed.

500

Internal error.

post /documents/{path}

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/documents/{path}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result": "string",
  • "hash": "string"
}

Calculates and stores the hash of a document. Usef

Calculates and stores the hash of a document. Useful when working with external storage (AWS or Azure) where files may be uploaded through means other than the document store API.

path Parameters
path
required
string

Path to document or folder.

Responses

201

Hash successfully calculated.

404

Document not found.

500

Internal error.

patch /documents/{path}

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/documents/{path}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result": "string",
  • "hash": "string"
}

Uploads a document, overwriting it if it already e

Uploads a document, overwriting it if it already existed. If the path doesn't exist, it will be automatically created.

path Parameters
path
required
string

Path to document or folder.

Request Body schema: multipart/form-data
document
required
string <binary>

Document to upload.

Responses

201

Document successfully uploaded/updated.

500

Internal error.

put /documents/{path}

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/documents/{path}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result": "string",
  • "hash": "string"
}

Deletes a document.

Deletes a document.

path Parameters
path
required
string

Path to document or folder.

Responses

204

Document successfully deleted.

404

Document didn't exist.

500

Internal error.

delete /documents/{path}

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/documents/{path}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "errorMessage": "string"
}

Transfers

Retrieves the (paginated) document transfer log.

Retrieves the (paginated) document transfer log.

query Parameters
offset
integer
Default: 0

Number of entries to skip.

limit
integer
Default: 100

Maximum number of entries.

Responses

200

Document transfer log.

400

Parameters offset or limit invalid.

500

Internal error.

get /transfers

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/transfers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "is_truncated": true,
  • "entries":
    [
    ]
}

Transfers a document.

Transfers a document.

Request Body schema: application/json
from
required
string

Sender destination.

to
required
string

Recepient destination.

document
required
string

Path to document to send.

Responses

201

Document successfully uploaded.

500

Internal error.

post /transfers

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/transfers

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "from": "string",
  • "to": "string",
  • "document": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result": "string",
  • "hash": "string"
}

Search

Searches for document by name or hash. Result will

Searches for document by name or hash. Result will contain at most 100 entries.

query Parameters
query
required
string

String to search.

by_hash
boolean
Default: false

True to search by hash, false to search by name.

Responses

200

Search results.

500

Internal error.

get /search

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/search

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "documents":
    [
    ],
  • "missing_hashes": true
}

Ensures that every document in storage has its ass

Ensures that every document in storage has its associated hash calculated.

query Parameters
reset
boolean
Default: false

Resets all hashes. Useful for cleaning the internal database when using external storage (AWS or Azure) and documents are deleted through means other than document store API.

Responses

200

Hash sync result.

500

Internal error.

post /sync_hashes

Each Kaleido service instance gets assigned a unique hostname. The service URL can be obtained from the /status endpoint for that service. E.g: https://console.kaleido.io/api/v1/c/{consortia_id}/e/{environment_id}/services/{service_id}/status

https://service_host/api/v1/sync_hashes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "hashes_calculated": 0
}