The CloudCannon Software Development Kit (SDK) is a typed client for the CloudCannon API, with a sub-client for each resource and built-in pagination, sorting, and filtering. It handles authentication and request signing for you, so reach for it before calling the HTTP endpoints directly.
Installation#
npm install @cloudcannon/sdkThe SDK requires Node.js 20 or later and runs server-side only. It signs requests using Node's A credential that lets programs act on behalf of your Organization through the CloudCannon API, such as a program built with the CloudCannon SDK. An API Key is scoped to the permissions you choose when you create it and belongs to a single Organization. CloudCannon shows the key only once, and you manage your keys on the API Keys page in your Organization Settings. A workspace in CloudCannon that groups together Sites, team members, and shared resources. It is also the unit CloudCannon bills for. You can define permissions for your Organization, controlling the access each team member has to resources on CloudCannon. You can create and be a part of multiple Organizations.crypto module, which is not available in a browser. Because an API KeyAPI Key
Organization
Usage#
Create a client with your API key, then call a resource:
import CloudCannonClient from '@cloudcannon/sdk';
const client = new CloudCannonClient({ key: '<your-api-key>' });
const { items } = await client.orgs();API Keys are scoped to an Organization. To create one, please read our documentation on creating an API key. This organization-scoped API Key is distinct from the personal Access Key A personal credential that lets programs act in CloudCannon on your behalf, such as the CloudCannon CLI or a program built with the CloudCannon SDK. An Access Key is tied to your user account and inherits your full account access across every Organization and Site you belong to. CloudCannon shows the secret only once, when you create the key, and you manage your keys on the Access Keys page in your Account Settings.Access Key
{ userAccessKey }. For more detail on credentials and request signing, see the API reference.
Resources#
The SDK provides a typed sub-client for each CloudCannon resource, including Organizations, Sites, Builds, Backups, Syncs, Inboxes, and the DAM. List methods support pagination, sorting, and filtering. See the GitHub documentation for every resource and method.
Full documentation#
See the CloudCannon SDK on GitHub for the full documentation and the complete list of resources.