Skip to content

Quick Start

This guide will help you install and start using the Datto RMM API clients.

  • Node.js v22 or higher (see .nvmrc)
  • pnpm v9.14.2 or higher
  • Rust (latest stable)
  • Cargo
  • Git
  • All of the above

Install from the monorepo or add as a dependency:

Terminal window
pnpm add datto-rmm-api

Add to your Cargo.toml:

[dependencies]
datto-api = { git = "https://github.com/josh-fisher/datto-rmm", path = "crates/datto-api" }
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
  1. Log in to your Datto RMM portal
  2. Navigate to Setup > API
  3. Create a new API key pair
  4. Note your API Key and API Secret
import { createDattoClient, Platform } from 'datto-rmm-api';
// Create a client
const client = createDattoClient({
platform: Platform.MERLOT, // Choose your platform
auth: {
apiKey: process.env.DATTO_API_KEY!,
apiSecret: process.env.DATTO_API_SECRET!,
},
});
// Make API calls
const { data, error } = await client.GET('/v2/account/devices');
if (error) {
console.error('Error:', error);
} else {
console.log('Devices:', data?.devices);
}
use datto_api::{DattoClient, Platform, Credentials};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = DattoClient::new(
Platform::Merlot,
Credentials {
api_key: std::env::var("DATTO_API_KEY")?,
api_secret: std::env::var("DATTO_API_SECRET")?,
},
).await?;
println!("Connected to {}", client.platform());
Ok(())
}

To work on the clients themselves:

Terminal window
# Clone the repository
git clone https://github.com/josh-fisher/datto-rmm.git
cd datto-rmm
# Install dependencies
pnpm install
# Sync the OpenAPI spec
pnpm sync:openapi
# Generate API clients
pnpm generate:api
# Build everything
pnpm build
CommandDescription
pnpm installInstall dependencies
pnpm buildBuild all packages
pnpm devStart development servers
pnpm sync:openapiFetch latest OpenAPI spec
pnpm generate:apiRegenerate API clients
pnpm typecheckRun TypeScript type checking
pnpm lintCheck code quality
pnpm testRun tests