No logo available for Backstage Software Catalog to DuckDB connector icon

Load Backstage Software Catalog data to DuckDB

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

SourceBackstage Software CatalogBackstage Software Catalog API DocumentationDestinationDuckDBIn-process analytical database. The default local destination for dlt pipelines.

The Backstage Software Catalog REST API provides programmatic access to catalog entities, locations, and system refresh operations within a Backstage developer platform installation. Everything needed to build a working Backstage Software Catalog → 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 Backstage Software Catalog 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 Backstage Software Catalog 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 Backstage Software Catalog 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.


Backstage Software Catalog API at a glance

Base URLThe base URL is typically the backend base URL (backend.baseUrl) configured for your Backstage installation, followed by /api/catalog (e.g., http://localhost:7007/api/catalog).
Example endpointGET entities/by-query
Records found atitems
Authenticationrequests require a Bearer token in the Authorization header — sent in the Authorization header, prefixed Bearer
PaginationCursor-based via cursor, next cursor at pageInfo.nextCursor, page size via limit (default 20)
Incremental fieldcursor
Record idmetadata.uid
API referencehttps://backstage.io/docs/features/software-catalog/api/catalog/

These values come from the Backstage Software Catalog API reference — the authoritative source if anything here looks out of date.


How do I authenticate with the Backstage Software Catalog API?

The API requires an 'Authorization' header containing a Bearer token. This token is typically a JWT obtained from the Backstage identity service or a configured static access token.

1. Get your credentials

Backstage does not provide a native "API key" dashboard for external service authentication. In the modern backend system, all requests to the Software Catalog REST API must be authenticated with a JWT Bearer token. To obtain credentials: (1) For internal plugins, use the auth.getPluginRequestToken service method. (2) For external services, you must implement service-to-service authentication using backend.auth.externalAccess configuration in your app-config.yaml to allow JWTs signed by your trusted identity provider (e.g., Auth0) or use a static token approach as permitted by your specific deployment configuration. If your instance is not publicly exposed and requires simple programmatic access, you may alternatively configure a reverse proxy to inject a pre-shared secret or header, or in extreme testing cases, use the backend.auth.dangerouslyDisableDefaultAuthPolicy flag (not recommended for production).

2. Add them to .dlt/secrets.toml

[sources.backstage_software_catalog_source] backstage_api_url = "https://your-backstage-instance.com/api/catalog" backstage_bearer_token = "eyJhbGciOiJFUzI1NiIsImtpZ..."

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 Backstage Software Catalog data can I load into DuckDB?

These are the Backstage Software Catalog endpoints dlt can load into DuckDB:

ResourceEndpointMethodData selectorDescription
entities/entities/by-queryGETitemsQuery entities with filtering, sorting, and cursor-based pagination.
entities/entitiesGETLists entities (deprecated).
entity_by_uid/entities/by-uid/:uidGETGet a single entity by its unique ID.
entity_by_name/entities/by-name/:kind/:namespace/:nameGETGet a single entity by kind, namespace, and name.
entities_batch/entities/by-refsPOSTitemsGet a batch of entities by their entity references.

How do I load only new Backstage Software Catalog records?

Backstage Software Catalog exposes cursor on entities/by-query, 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": "entities", "endpoint": { "path": "entities/by-query", "data_selector": "items", "incremental": {"cursor_path": "cursor", "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 Backstage Software Catalog pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading /entities and /refresh from the Backstage Software Catalog API into DuckDB:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def backstage_software_catalog_source(token=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "The base URL is typically the backend base URL (backend.baseUrl) configured for your Backstage installation, followed by /api/catalog (e.g., http://localhost:7007/api/catalog).", "auth": {"type": "bearer", "token": token}, }, "resources": [ {"name": "entities", "endpoint": {"path": "entities/by-query", "data_selector": "items"}}, {"name": "entities_batch", "endpoint": {"path": "entities/by-refs", "data_selector": "items"}} ], } yield from rest_api_resources(config) def load_backstage_software_catalog_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="backstage_software_catalog_pipeline", destination="duckdb", dataset_name="backstage_software_catalog_data", ) load_info = pipeline.run(backstage_software_catalog_source()) print(load_info) if __name__ == "__main__": load_backstage_software_catalog_to_duckdb()

Run it with python backstage_software_catalog_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 Backstage Software Catalog 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("backstage_software_catalog_pipeline").dataset() df = data.entities.df() print(df.head())

SQL:

SELECT * FROM backstage_software_catalog_data.entities LIMIT 10;

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


How do I deploy the Backstage Software Catalog 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 Backstage Software Catalog 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 Backstage Software Catalog 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 Backstage Software Catalog to DuckDB?

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