The CryptoMove Developer Hub

Welcome to the CryptoMove Developer Hub. You'll find comprehensive guides and documentation to help you start working with CryptoMove as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Working with Files

You can store a file such as a PEM file or CRT file in the Tholos key vault where it is safe until you need to download it. When you upload a file with the same filename, the original version of the file is not overwritten. Instead, a new version of the file is created, and you can access older versions of a file at any time. You can use API requests to upload, list, download, and delete files from Tholos.

Uploading Files

You can upload a single file or, to save time, you can upload multiple files in one API request. Define the CountOfFiles parameter as greater than 1 if you want to upload multiple files in a single request. In the following example, cert.crt is uploaded to Tholos, where <token> is a valid access token.

curl --request POST \
   --url https://api.cryptomove.com/v1/user/protect_file \
   --header 'content-type: multipart/form-data' \
   --header 'authorization: <token>' \
   --header 'email: test@cryptomove.com' \
   --header 'CountOfFiles: 1' \
   -F 'file1=@cert.crt’

When identifying the uploaded file in future API requests, you refer to the file by its name rather than the form-field specified in the protect_file request. For example, if you want to delete the file later, you will specify cert.crt as the filename, not file2.

Listing Files

You can easily list the names and version numbers all of your files currently stored in Tholos. In the following example, the names and version numbers of the files that have been uploaded by test@cryptomove.com are returned in a JSON object.

curl --request POST \
  --url https://api.cryptomove.com/v1/user/list_file \
  --header 'authorization: <token>' \
  --header 'content-type: application/json' \
  --data '{"email":"test@cryptomove.com"}'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cryptomove.com/v1/user/list_file',
  headers: { 'content-type': 'application/json', authorization: '<token>' },
  body: '{"email":"test@cryptomove.com"}' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cryptomove.com/v1/user/list_file")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = '<token>'
request["content-type"] = 'application/json'
request.body = "{\"email\":\"test@cryptomove.com\"}"

response = http.request(request)
puts response.read_body
var data = "{\"email\":\"test@cryptomove.com\"}";

var xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cryptomove.com/v1/user/list_file");
xhr.setRequestHeader("authorization", "<token>");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
import requests

url = "https://api.cryptomove.com/v1/user/list_file"

payload = "{\"email\":\"test@cryptomove.com\"}"
headers = {
    'authorization': "<token>",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

Downloading a File

When downloading a file from Tholos, you can choose whether to download the latest version or a previous version. To download the latest version, exclude the version parameter from the body of the request. Downloading a file returns an http octet-stream response to the API request. In the following example, the latest version of cert.crt is downloaded from Tholos to the local machine.

curl --request POST \
     --url https://api.cryptomove.com/v1/user/download_file \
     --header 'authorization: <token>' \
     --header 'content-type: application/json' \
     --data '{"email":"test@cryptomove.com",
         "filename":"cert.crt"}'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cryptomove.com/v1/user/download_file',
  headers: { 'content-type': 'application/json', authorization: '<token>' },
  body: '{"email":"test@cryptomove.com","filename":"cert.crt"}' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cryptomove.com/v1/user/download_file")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = '<token>'
request["content-type"] = 'application/json'
request.body = "{\"email\":\"test@cryptomove.com\",\"filename\":\"cert.crt\"}"

response = http.request(request)
puts response.read_body
var data = "{\"email\":\"test@cryptomove.com\",\"filename\":\"cert.crt\"}";

var xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cryptomove.com/v1/user/download_file");
xhr.setRequestHeader("authorization", "<token>");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
import requests

url = "https://api.cryptomove.com/v1/user/download_file"

payload = "{\"email\":\"test@cryptomove.com\",\"filename\":\"cert.crt\"}"
headers = {
    'authorization': "<token>",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

Deleting Files

When it is no longer needed, you can remove a file from the Tholos database. By default, the delete_file endpoint removes all versions of a file from the database, but you can use the version parameter to limit the deletion to a single version. You also have the ability to remove all of your files from Tholos in a single request using the delete_all_files endpoint. Only the user who uploaded a file can delete it from the database.

In the following example, the test@cryptomove.com user is removing all versions of cert.crt.

curl --request POST \
  --url https://api.cryptomove.com/v1/user/delete_file \
  --header 'authorization: <token>' \
  --header 'content-type: application/json' \
  --data '{"email":"test@cryptomove.com",
         "filename":"cert.crt"}'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cryptomove.com/v1/user/delete_file',
  headers: { 'content-type': 'application/json', authorization: '<token>' },
  body: '{"email":"test@cryptomove.com","filename":"cert.crt"}' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cryptomove.com/v1/user/delete_file")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = '<token>'
request["content-type"] = 'application/json'
request.body = "{\"email\":\"test@cryptomove.com\",\"filename\":\"cert.crt\"}"

response = http.request(request)
puts response.read_body
var data = "{\"email\":\"test@cryptomove.com\",\"filename\":\"cert.crt\"}";

var xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cryptomove.com/v1/user/delete_file");
xhr.setRequestHeader("authorization", "<token>");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
import requests

url = "https://api.cryptomove.com/v1/user/delete_file"

payload = "{\"email\":\"test@cryptomove.com\",\"filename\":\"cert.crt\"}"
headers = {
    'authorization': "<token>",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

What's Next

Analytics

Working with Files


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.