Load Connectwise-manage data to DuckDB
Build a Connectwise-manage to DuckDB pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Connectwise-manage API base URL, auth, endpoints, and incremental loading.
ConnectWise Manage REST API provides programmatic access to ConnectWise Manage data for integration purposes. Everything needed to build a working Connectwise-manage → DuckDB pipeline is on this page: the API's base URL, authentication, endpoints, pagination and incremental field — plus a prompt that hands the whole job to your coding agent.
Build your Connectwise-manage to DuckDB pipeline
Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.
PromptRunuvx dlthub-init@latestto build a pipeline from Connectwise-manage to DuckDB and run it on dltHub
That scaffolds a dltHub workspace and installs the dltHub AI harness — the project rules, the secrets-management skill, and the dlt MCP server your agent needs to work safely. From there it reads the Connectwise-manage API, proposes the endpoints to load, then writes, runs and validates the pipeline while you review rather than type. Credentials are inspected through MCP tools, so your agent never reads secrets.toml itself. How the LLM-native workflow works →
Prefer to write it yourself? Every fact the agent uses is below.
Connectwise-manage API at a glance
| Base URL | https://{your_connectwise_site}/v4_6_release/apis/3.0 |
| Example endpoint | GET company/companies |
| Authentication | all requests require HTTP Basic authentication via public/private key pair and a ClientId header — sent in the Authorization header, prefixed Basic |
| Also required | clientId |
| Pagination | Page-number via continuationToken, next cursor at headers['Continuation-Token'], page size via pageSize (default 25, max 1000). ConnectWise Manage pagination for list endpoints uses query parameters 'page' and 'pageSize' (not a numeric page cursor). Some client guides describe continuation-token pagination via the response header 'Continuation-Token' using a request query parameter named 'continuationToken'; this is distinct from the 'page'/'pageSize' approach. Do not infer that you can combine both methods unless documentation explicitly supports it. |
| Incremental field | lastUpdated |
| API reference | https://developer.connectwise.com/Best_Practices/Getting_Started |
These values come from the Connectwise-manage API reference — the authoritative source if anything here looks out of date.
How do I authenticate with the Connectwise-manage API?
The API uses HTTP Basic authentication. The credentials must be a base64-encoded string of 'companyId+publicKey:privateKey'. This must be provided in the 'Authorization' header as 'Basic <base64_encoded_string>', and a 'clientId' header is also required.
1. Get your credentials
- Log in to ConnectWise Manage as an administrator.
- Navigate to System > Members.
- Select the API Members tab.
- Click the plus (+) icon to create a new API Member.
- Fill in required fields (Member ID, Member Name, and choose a Role ID). For the Role ID, use 'Admin' for full access or a custom security role with restricted permissions.
- Click Save to create the member.
- With the new API member record open, click the API Keys tab.
- Click the plus (+) icon to add a new API Key.
- Enter a description for the key and click Save. 10. IMPORTANT: Copy and store the Public Key and Private Key immediately. The Private Key is only visible at this moment and cannot be retrieved once the screen is closed.
2. Add them to .dlt/secrets.toml
[sources.connectwise_manage_source] company_id = "your_company_id" public_key = "your_public_key" private_key = "your_private_key" base_url = "https://api-na.myconnectwise.net" # Adjust for your region/hosting (e.g., api-au.myconnectwise.net)
dlt reads this file automatically at runtime. With the harness, the setup-secrets skill prompts you for the values and never handles the raw credential in chat. For production, see setting up credentials with dlt.
What Connectwise-manage data can I load into DuckDB?
These are the Connectwise-manage endpoints dlt can load into DuckDB:
| Resource | Endpoint | Method | Data selector | Description |
|---|---|---|---|---|
| companies | company/companies | GET | Retrieve list of companies | |
| tickets | service/tickets | GET | Retrieve list of service tickets | |
| configurations | configuration/configurations | GET | Retrieve list of configuration items | |
| members | system/members | GET | Retrieve list of system members | |
| agreements | finance/agreements | GET | Retrieve list of service agreements |
How do I load only new Connectwise-manage records?
Connectwise-manage exposes lastUpdated on company/companies, so dlt can request only the records that changed since the last run. Set it as the cursor_path and dlt tracks the high-water mark for you between runs.
{"name": "companies", "endpoint": { "path": "company/companies", "incremental": {"cursor_path": "lastUpdated", "initial_value": "2024-01-01T00:00:00Z"}, }}
On the first run dlt loads everything from initial_value; on every run after that it requests only what changed and appends with write_disposition="merge" if you set a primary key. See incremental loading.
What does the generated Connectwise-manage pipeline look like?
A standard dlt REST API pipeline — the same code you would write by hand, loading tickets and members from the Connectwise-manage API into DuckDB:
import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def connectwise_manage_source(api_key=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://{your_connectwise_site}/v4_6_release/apis/3.0", "auth": {"type": "http_basic", "username": "REPLACE_ME", "password": api_key}, }, "resources": [ {"name": "companies", "endpoint": {"path": "company/companies"}}, {"name": "tickets", "endpoint": {"path": "service/tickets"}} ], } yield from rest_api_resources(config) def load_connectwise_manage_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="connectwise_manage_pipeline", destination="duckdb", dataset_name="connectwise_manage_data", ) load_info = pipeline.run(connectwise_manage_source()) print(load_info) if __name__ == "__main__": load_connectwise_manage_to_duckdb()
Run it with python connectwise_manage_pipeline.py. The agent iterates on this until it loads cleanly — you review and approve, rather than write it from scratch.
How do I query Connectwise-manage data in DuckDB?
dlt creates one table per resource. Query the loaded data with Python or SQL — or ask your agent to, through the MCP server's execute_sql_query tool.
Python (pandas DataFrame):
import dlt data = dlt.pipeline("connectwise_manage_pipeline").dataset() df = data.companies.df() print(df.head())
SQL:
SELECT * FROM connectwise_manage_data.companies LIMIT 10;
See querying your data with dataset and exploring it in marimo notebooks.
How do I deploy the Connectwise-manage to DuckDB pipeline in production?
The pipeline runs locally, which is ideal for prototyping and one-off analysis. When you need it on a schedule, monitored on every load, and shared with your team, deploy the same dlt code on the dltHub platform — no infrastructure to maintain. The prompt above already ends with "run it on dltHub", so your agent can take it there directly.
- Deploy & schedule — run the pipeline as a managed job with automatic retries.
- Monitor — observable job queues, alerting, and load metrics for every run.
- Transform — promote raw Connectwise-manage loads into governed, documented models.
- Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.
What other destinations can I load Connectwise-manage data to?
dlt loads into any of these — only the destination argument changes:
| Destination | Example value |
|---|---|
| PostgreSQL | "postgres" |
| BigQuery | "bigquery" |
| Snowflake | "snowflake" |
| Redshift | "redshift" |
| Databricks | "databricks" |
| Filesystem (S3, GCS, Azure) | "filesystem" |
Set dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. On the dltHub platform the same pipeline runs against a managed Iceberg lakehouse. See the full destinations list.
Next steps
Was this page helpful?
Community Hub
Need more dlt context for Connectwise-manage to DuckDB?
Request dlt skills, commands, AGENT.md files, and AI-native context.