The API
Shadow Drive exposes an API that you can interact directly without the need of the CLI or SDK. You may build on top of these methods.
👉Mainnet-Beta API Base URL: https://shadow-storage.genesysgo.net
Request content type: application/json
Parameters:
- 1.storage_account: Publickey of the storage account you want to get information for
Response for V1 Storage Account:
{
storage_account: PublicKey,
reserved_bytes: Number,
current_usage: Number,
immutable: Boolean,
to_be_deleted: Boolean,
delete_request_epoch: Number,
owner1: PublicKey,
owner2: PublicKey,
accountCoutnerSeed: Number,
creation_time: Number,
creation_epoch: Number,
last_fee_epoch: Number,
identifier: String
version: "V1"
}
Response for V2 Storage Account
{
storage_account: PublicKey,
reserved_bytes: Number,
current_usage: Number,
immutable: Boolean,
to_be_deleted: Boolean,
delete_request_epoch: Number,
owner1: PublicKey,
accountCoutnerSeed: Number,
creation_time: Number,
creation_epoch: Number,
last_fee_epoch: Number,
identifier: String,
version: "V2"
}
Request content type: multipart/form-data
Parameters (FormData fields):
- 1.file: The file you want to upload. You may add up to 5 files each with a field name of
file
. - 2.message: Base58 message signature.
- 3.signer: Publickey of the signer of the message signature and owner of the storage account
- 4.storage_account: Key of the storage account you want to upload to
Response:
{
"finalized_locations": [String],
"message": String
"upload_errors": [{file: String, storage_account: String, error: String}] or [] if no errors
}
Request content type: multipart/form-data
Parameters (FormData fields):
- 1.file: The file you want to upload. You may add up to 5 files each with a field name of
file
. - 2.message: Base58 message signature.
- 3.signer: Publickey of the signer of the message signature and owner of the storage account
- 4.storage_account: Key of the storage account you want to upload to
- 5.url: Url of the original file you want to edit. Example: `https://shdw-drive.genesysgo.net/<storage-account>/<file-name>`
Response:
{
"finalized_location": String,
"error": String or not provided if no error
}
Request content type: application/json
Parameters:
- 1.message: Base58 message signature.
- 2.signer: Publickey of the signer of the message signature and owner of the storage account
- 3.location: URL of the file you want to delete
Response:
{
"message": String,
"error": String or not passed if no error
}
Last modified 5mo ago