Encryption Keys

Encryption keys are used as back of backup jobs to secure files before they are stored in storage.

You will need to generate your Public/Private Key pair locally before submitting the key to us via the add endpoint

For example using the following OpenSSL commands. You will need to keep your private key (snapshooter.pem) very secure. SnapShooter does not get a copy of it and without it its impossible for anyone to view the contents of your backups.

mkdir snapshooter
cd snapshooter
openssl genrsa -des3 -out snapshooter.pem 4096
openssl rsa -in snapshooter.pem -outform PEM -pubout -out snapshooter.pub
cat snapshooter.pub | pbcopy

Add #

Parameters


string name required

The name to assign to your encryption key
Example: Amce Key


string public_key required

A PEM-encoded public key

                            POST
                            /v1/encryption-keys
                        
                           
curl https://api.snapshooter.com/v1/encryption-keys \
-X POST \
--header 'Authorization: Bearer API_TOKEN_HERE' \
-d name="Amce Key" \
HTTP/2 201
{
"data": {
"name": "Test Encryption Key",
"public_key": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}
}

Examples

curl -X POST https://api.snapshooter.com/v1/encryption-keys \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "My encryption key",
"public_key": "-----BEGIN PUBLIC KEY-----\n<key hash>\n-----END PUBLIC KEY-----"
}
DATA

Errors


Delete #

Parameters

This endpoint does not accept any parameters
                            DELETE
                            /v1/encryption-keys/{key_id}
                        
                           
curl https://api.snapshooter.com/v1/encryption-keys/{key_id} \
-X DELETE \
--header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 204
//Empty Response Body

Errors


Related

Jobs

Was this page helpful?

Thank you for helping us improve!