Load Action1 data to DuckDB
Build a Action1 to DuckDB pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Action1 API base URL, auth, endpoints, and incremental loading.
Action1 is an IT management platform that provides a REST API for automating patching, vulnerability management, and endpoint configuration tasks. Everything needed to build a working Action1 → 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 Action1 to DuckDB pipeline
Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.
PromptRunuvx dlthub-init@latestto build a pipeline from Action1 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 Action1 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.
Action1 API at a glance
| Base URL | https://app.action1.com/api/3.0 |
| Example endpoint | GET organizations |
| Authentication | all requests require an Authorization header with a Bearer token obtained via OAuth 2.0 flow — sent in the Authorization header, prefixed Bearer |
| Pagination | Offset-based page size via limit |
| Record id | endpointId |
| API reference | https://app.action1.com/apidocs/ |
These values come from the Action1 API reference — the authoritative source if anything here looks out of date.
How do I authenticate with the Action1 API?
Authentication uses OAuth 2.0. Users must first exchange their Client ID and Client Secret for a JWT access token via a POST request to the /oauth2/token endpoint, then include this token in an 'Authorization: Bearer ' header for all subsequent API requests.
1. Get your credentials
- Log in to your Action1 console.\n2. Navigate to the Configuration page and select Users & API Credentials.\n3. Click the + New API Credentials button.\n4. Provide a name for the credentials and optionally select a role.\n5. Click Save. A popup will appear displaying your Client ID and Client Secret.\n6. Copy these values immediately, as the secret will not be displayed again after the popup is closed. Store them in a secure location, such as a password manager.
2. Add them to .dlt/secrets.toml
[sources.action1_source] client_id, client_secret = "REPLACE_ME"
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 Action1 data can I load into DuckDB?
These are the Action1 endpoints dlt can load into DuckDB:
| Resource | Endpoint | Method | Data selector | Description |
|---|---|---|---|---|
| organizations | /organizations | GET | List all organizations | |
| managed_endpoints | /endpoints/managed/{organization_id} | GET | List managed endpoints for an organization | |
| endpoint_details | /endpoints/managed/{organization_id}/{endpoint_id} | GET | Get details for a specific endpoint | |
| endpoint_groups | /endpoints/groups/{organization_id} | GET | List endpoint groups for an organization | |
| packages | /packages/all | GET | List all available app packages | |
| updates | /updates/{organization_id} | GET | List updates for an organization |
How do I load only new Action1 records?
The Action1 API reference does not document a timestamp or sequence field for these endpoints, so there is nothing to advertise here as verified. Pick a field from the endpoints table above that increases with every write, then set it as the cursor_path.
{"name": "organizations", "endpoint": { "path": "organizations", # Replace with a field that increases on every write. "incremental": {"cursor_path": "REPLACE_ME", "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 Action1 pipeline look like?
A standard dlt REST API pipeline — the same code you would write by hand, loading /organizations and /endpoints/managed/{orgId} from the Action1 API into DuckDB:
import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def action1_source(client_id_client_secret=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://app.action1.com/api/3.0", "auth": {"type": "bearer", "token": client_id_client_secret}, }, "resources": [ {"name": "organizations", "endpoint": {"path": "organizations"}}, {"name": "managed_endpoints", "endpoint": {"path": "endpoints/managed/{organization_id}"}} ], } yield from rest_api_resources(config) def load_action1_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="action1_pipeline", destination="duckdb", dataset_name="action1_data", ) load_info = pipeline.run(action1_source()) print(load_info) if __name__ == "__main__": load_action1_to_duckdb()
Run it with python action1_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 Action1 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("action1_pipeline").dataset() df = data.organizations.df() print(df.head())
SQL:
SELECT * FROM action1_data.organizations LIMIT 10;
See querying your data with dataset and exploring it in marimo notebooks.
How do I deploy the Action1 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 Action1 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 Action1 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 Action1 to DuckDB?
Request dlt skills, commands, AGENT.md files, and AI-native context.