kloudless paperclip

The last cloud storage API you’ll ever need

Build multiple cloud storage services into your app by coding just once.

Built for Developers

Kloudless provides a clean, RESTful API with all the cloud storage features you need. We take care of the heavy lifting so you can focus on building great products.

See the documentation ⟶
preview features
  • Files
  • Folders
  • Links
  • Access Controls
  • Search
  • Python
  • NodeJS
  • Java/Android
  • iOS
  • cURL
import kloudless; kloudless.configure(api_key=API_KEY)
account = kloudless.Account.all()[0]

# Retrieve metadata on a file
kfile = account.files.retrieve(file_id)

# Download the file's contents
data = kfile.contents().content

# Move the file to the root folder of a different account
kfile.parent_id = "root"
kfile.account = kloudless.Account.all()[1].id
kfile.save()
              
import kloudless; kloudless.configure(api_key=API_KEY)
account = kloudless.Account.all()[0]

# Retrieve the root folder's contents
items = account.folders().contents()

# Create a folder within the root folder.
new_folder = account.folders.create(name="New Folder", parent_id="root")

# Rename the folder
new_folder.name = "Not-so-new Folder"
new_folder.save()
              
import kloudless; kloudless.configure(api_key=API_KEY)
account = kloudless.Account(id=account_id)

# Create a link with a password
link = account.links.create(file_id=file_id, password="p4ssw0rd")

# Update the link's expiration date to 24 hours from now.
from datetime import datetime, timedelta
link.expiration = datetime.utcnow() + timedelta(days=1)
link.save()

# Print the URL of the link
print link.url
              
var kloudless = require('kloudless')('your-api-key-goes-here!');
              
var kloudless = require('kloudless')(api_key);

// Retrieve metadata on a file
kloudless.files.get({
  "account_id": account_id,
  "file_id": file_id,
  }, function(err, res) {
    metadata = res;
  }
);

// Download file contents
kloudless.files.contents({
  "account_id": account_id,
  "file_id": file_id,
  }, function(err, filestream) {
    filecontents = "";
    filestream.on('data', function(chunk){
      filecontents += chunk;
    });
    filestream.on('end',function(){
      console.log("finished reading file!");
    });
  }
);

// Move the file to the root folder of a different account
kloudless.files.move({
  "account_id": account_id,
  "new_account_id": other_account_id,
  "parent_id": "root"
});
              
var kloudless = require('kloudless')(api_key);

// Retrieve the root folder's contents
kloudless.folders.contents({
  "account_id": account_id,
  "folder_id": "root"
  }, function(err, res) {
    contents = res;
  }
);

// Create a folder within the root folder.
var new_folder_id;
kloudless.folders.create({
  "account_id": account_id,
  "name": "New Folder",
  "parent_id": "root"
  }, function(err, res) {
    new_folder_id = res['id'];
  }
);

// Rename the folder
kloudless.folders.rename({
  "account_id": account_id,
  "folder_id": new_folder_id,
  "name": "Not-so-new Folder",
});
              
// Create a link with a password
var link_id;
var link_url;
kloudless.links.create({
  "account_id": account_id,
  "file_id": file_id,
  "password": "p4ssw0rd",
  }, function(err, res){
    link_id = res['id'];
    link_url = res['url'];
  }
);

// 24 hours from right now
var expiration_milliseconds = Date.now() + 86400000;

// Update the link's expiration date to 24 hours from now
kloudless.links.update({
  "account_id": account_id,
  "link_id": link_id,
  "expiration": expiration_milliseconds
  }
);

// Print the URL of the link
console.log(link_url);
              
Kloudless.apiKey = "API KEY";

// Retrieve metadata on a file
File fileInfo = File.retrieve(fileId, accountId, params);

// Download the file's contents to a path
KloudlessResponse response = File.contents(fileId, accountId,
  params);
ByteArrayOutputStream outputStream = response.getResponseStream();
FileOutputStream out = new FileOutputStream(path);
outputStream.writeTo(out);
out.close();
              
Kloudless.apiKey = "API KEY";

// Retrieve folder's contents
MetadataCollection contents = Folder.contents(folderId, accountId,
    params);

// Create a folder within the root folder
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("name", "new new folder");
params.put("parent_id", "root");
Folder folderInfo = Folder.create(accountId, params);

// Rename the folder
String newFolderId = folderInfo.id;
params.put("name", "new folder name");
Folder newFolderInfo = Folder.save(newFolderId, accountId, params);
              
Kloudless.apiKey = "API KEY";

// Create a link with a password
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("file_id", fileId);
params.put("password", "p4ssw0rd");
Link linkInfo = Link.create(accountId, params);

// Print the URL of the link
System.out.println(linkInfo.url);
              
- (void)getFileMetadata
{
  // Retrieve Metadata on a file
  NSString *fileId = "abcdef";
  [client getFile:fileId];
}
- (void)restClient:(KClient*)client getFileLoaded:
    (NSDictionary *)fileInfo
{
  // The metadata is returned in the delegate method
  NSLog(@"File Info: %@", fileInfo);
}

- (void)downloadFile
{
  // Download a file's contents
  NSString *fileId = "abcdef";
  [client downloadFile:fileId];
}
- (void)restClient:(KClient*)client downloadFileLoaded:
    (NSData *)fileData
{
  // The contents are returned in the delegate method
  NSString *path = "PATH";
  [fileData writeToFile:path atomically:YES];
}
              
- (void)testGetFolderContents:(id)sender
{
    // Retrieve the contents of the folder 'root'
    NSString *folderId = @"root";
    [client getFolderContents:folderId];
}
- (void)restClient:(KClient*)client getFolderContentsLoaded:
    (NSDictionary *)folderContents
{
    // The contents of the folder will be returned
    NSLog(@"Folder Contents: %@", folderContents);
}

- (void)testCreateFolder:(id)sender
{
    // Create a folder named "upload" in the "root" folder
    NSDictionary *params = [NSDictionary
        dictionaryWithObjectsAndKeys:@"uploadfolder", @"name",
        @"root", @"parent_id", nil];
    [client createFolder:params];
}
- (void)restClient:(KClient*)client createFolderLoaded:
    (NSDictionary *)folderInfo
{
    // The new folder metadata will be returned
    NSLog(@"Folder Info: %@", folderInfo);
}

- (void)testUpdateFolder:(id)sender
{
    // Update the folder with id "12345" with a new name
    NSString *folderId = @"12345";
    NSString *folderName = @"New Folder Name";

    NSDictionary *params = [NSDictionary dictionaryWithObject:
      folderName forKey:@"name"];
    [client updateFolder:folderId andParams:params];
}
- (void)restClient:(KClient*)client updateFolderLoaded:
    (NSDictionary *)folderInfo
{
    // The new folder metadata will be returned
    NSLog(@"Folder Info: %@", folderInfo);
}
              
- (void)testCreateLink:(id)sender
{
    // Create a link from the file with id "12345" with a password
    NSString *fileId = @"12345";
    NSString *password = @"p4ssw0rd";
    NSDictionary *params = [NSDictionary
        dictionaryWithObjectsAndKeys:fileId, @"file_id",
        password, @"password", nil];
    [client createLink:params];
}
- (void)restClient:(KClient*)client createLinkLoaded:
    (NSDictionary *)linkInfo
{
    // The Link metadata will be returned
    NSLog(@"Link Info: %@", linkInfo);
}
              
# Retrieve metadata on a file
curl https://api.kloudless.com/v0/accounts/$ACCT_ID/files/$FILE_ID \
    -H "Authorization: ApiKey $API_KEY"

# Download the file's contents
curl https://api.kloudless.com/v0/accounts/$ACCT_ID/files/$FILE_ID/contents \
    -H "Authorization: ApiKey $API_KEY"

# Move the file to the root folder of another account
curl -X PATCH https://api.kloudless.com/v0/accounts/$ACCT_ID/files/$FILE_ID \
    -d '{"parent_id": "root", "account": $NEW_ACCT_ID}' \
    -H "Authorization: ApiKey $API_KEY" \
    -H "Content-Type: application/json"
              
# Retrieve the root folder's contents
curl https://api.kloudless.com/v0/accounts/$ACCT_ID/folders/root/contents \
    -H "Authorization: ApiKey $API_KEY"

# Create a folder within the root folder.
curl -X POST https://api.kloudless.com/v0/accounts/$ACCT_ID/folders \
    -d '{"parent_id": "root", "name": "New Folder"}' \
    -H "Authorization: ApiKey $API_KEY" \
    -H "Content-Type: application/json"

# Rename the folder
curl -X PATCH https://api.kloudless.com/v0/accounts/$ACCT_ID/folders/$FOLDER_ID \
    -d '{"name": "Not-so-new Folder"}' \
    -H "Authorization: ApiKey $API_KEY" \
    -H "Content-Type: application/json"
              
# Create a link with a password
curl -X POST https://api.kloudless.com/v0/accounts/$ACCT_ID/links \
    -d '{"file_id": "$FILE_ID", "password": "p4ssw0rd"}' \
    -H "Authorization: ApiKey $API_KEY" \
    -H "Content-Type: application/json"

# Update the link's expiration date to 24 hours from now.
curl -X PATCH https://api.kloudless.com/v0/accounts/$ACCT_ID/links/$LINK_ID \
    -d "{\"expiration\": \"$(date -v'+1d' -u +'%Y-%m-%dT%H:%M:%SZ')\"}" \
    -H "Authorization: ApiKey $API_KEY" \
    -H "Content-Type: application/json"
              
api-integrations

Code once, integrate many

Working with multiple APIs is time consuming and frustrating. Code once with Kloudless and connect your application to multiple cloud storage services. We maintain the integrations so you don’t have to!

  • Box
  • Barracuda Copy
  • Dropbox
  • Egnyte
  • Evernote
  • Google Drive
  • OneDrive
  • ShareFile
  • SharePoint
  • SugarSync
  • Amazon S3
  • Microsoft Azure
  • OneDrive for Business
  • CMIS
  • Alfresco
  • Want more?

UI Tools

We provide pre-built, customizable UI tools to quickly build cloud storage support into your application. This integration requires as much time as it takes to copy/paste a snippet of code.

View all the UI tools ⟶
test the file explorer
The chooser allows your users to select files from their cloud storage.
Learn more about the Chooser ⟶

  • security-thumb

    Security

    Sensitive data encrypted at rest with 4096-bit RSA keys. Multiple security tiers, with hardened servers and locked-down firewalls. Dedicated ops team on call 24/7.

  • support-thumb

    Support

    24/7 support from our own, real live developers, not someone sitting in a call center.

  • flexibility-thumb

    Flexibility

    Plans that make sense for you, whether your app supports hundreds or millions of users.