No logo available for Keeper to DuckDB connector icon

Load Keeper data to DuckDB

Build a Keeper to DuckDB pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Keeper API base URL, auth, endpoints, and incremental loading.

SourceKeeperDeveloper API / SDK Tools | Keeper DocumentationDestinationDuckDBIn-process analytical database. The default local destination for dlt pipelines.

Keeper Security provides multiple REST API interfaces including an Admin API for reporting/compliance, a Service Mode API for CLI automation, and SCIM endpoints for user management. Everything needed to build a working Keeper → 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 Keeper to DuckDB pipeline

Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.

Prompt
Run uvx dlthub-init@latest to build a pipeline from Keeper 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 Keeper 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.


Keeper API at a glance

Base URLThe base URL depends on the specific service: SCIM operations use 'https://keepersecurity.com/api/rest/scim/v2/{node_id}', while locally hosted Service Mode APIs often use 'http://localhost:{port}/api/v1' or 'https://127.0.0.1:{port}'.
Example endpointGET api/rest/public/events
Records found ataudit_events
Authenticationrequests require either an 'x-api-token' or 'api-key' header depending on the specific API endpoint used — sent in the x-api-token header, prefixed Bearer
PaginationCursor-based
Incremental fieldcontinuation_token
Record idid

These values come from the Keeper API documentation. Check them against the vendor's current reference before relying on them in production.


How do I authenticate with the Keeper API?

Authentication is handled via custom headers. The Admin REST API uses an 'x-api-token' header with the format 'Bearer <API_TOKEN>', while the Service Mode REST API uses an 'api-key' header.

1. Get your credentials

Keeper Security provides two primary REST API interfaces, each with different setup methods: 1. Admin REST API: Requires Enterprise Root Administrator permissions. API tokens are managed via the Keeper Commander CLI using the public-api-key command group (e.g., public-api-key generate --name "IntegrationName" --roles "SIEM:1"). 2. Commander Service Mode API: Install and log into the Keeper Commander CLI (keeper shell). Run the service-create command to start the configuration wizard. The wizard generates an API key, which can be stored directly in your Keeper vault record (using the -ur flag) for secure retrieval. For existing services, the key may be retrieved from the configured vault record identified in the service logs.

2. Add them to .dlt/secrets.toml

[sources.keeper_source] api_key = "your_generated_api_key_here"

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 Keeper data can I load into DuckDB?

These are the Keeper endpoints dlt can load into DuckDB:

ResourceEndpointMethodData selectorDescription
aram_events/api/rest/public/eventsGETaudit_eventsPaginated audit events
scim_users/api/rest/scim/v2/{node_id}/UsersGETResourcesRetrieve all users in a node
scim_groups/api/rest/scim/v2/{node_id}/GroupsGETResourcesRetrieve all groups in a node
risk_management_stats/api/rest/rmd/get_enterprise_statGETEnterprise security metrics
risk_management_alerts/api/rest/rmd/get_security_alerts_detailGETDetailed security alerts

How do I load only new Keeper records?

Keeper exposes continuation_token on api/rest/public/events, 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": "aram_events", "endpoint": { "path": "api/rest/public/events", "data_selector": "audit_events", "incremental": {"cursor_path": "continuation_token", "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 Keeper pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading /api/v2/executecommand-async and /public/events from the Keeper API into DuckDB:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def keeper_source(api_key=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "The base URL depends on the specific service: SCIM operations use 'https://keepersecurity.com/api/rest/scim/v2/{node_id}', while locally hosted Service Mode APIs often use 'http://localhost:{port}/api/v1' or 'https://127.0.0.1:{port}'.", "auth": {"type": "bearer", "token": api_key}, }, "resources": [ {"name": "aram_events", "endpoint": {"path": "api/rest/public/events", "data_selector": "audit_events"}}, {"name": "scim_users", "endpoint": {"path": "api/rest/scim/v2/{node_id}/Users", "data_selector": "Resources"}} ], } yield from rest_api_resources(config) def load_keeper_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="keeper_pipeline", destination="duckdb", dataset_name="keeper_data", ) load_info = pipeline.run(keeper_source()) print(load_info) if __name__ == "__main__": load_keeper_to_duckdb()

Run it with python keeper_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 Keeper 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("keeper_pipeline").dataset() df = data.aram_events.df() print(df.head())

SQL:

SELECT * FROM keeper_data.aram_events LIMIT 10;

See querying your data with dataset and exploring it in marimo notebooks.


How do I deploy the Keeper 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 Keeper loads into governed, documented models.
  • Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.

Book a demo →


What other destinations can I load Keeper data to?

dlt loads into any of these — only the destination argument changes:

DestinationExample 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 Keeper to DuckDB?

Request dlt skills, commands, AGENT.md files, and AI-native context.