Nuxeo Python API Docs | dltHub
Build a Nuxeo-to-database pipeline in Python using dlt with AI Workbench support for Claude Code, Cursor, and Codex.
Last updated:
Nuxeo is a content services platform exposing a document-oriented REST API for managing repository documents, users, groups, search, workflows and related resources. The REST API base URL is https://{NUXEO_SERVER}/nuxeo/api/v1 and supports HTTP Basic auth, token auth (X-Authentication-Token) and OAuth2 token endpoints..
dlt is an open-source Python library that handles authentication, pagination, and schema evolution automatically. dlthub provides AI context files that enable code assistants to generate production-ready pipelines. Install with uv pip install "dlt[workspace]" and start loading Nuxeo data in under 10 minutes.
What data can I load from Nuxeo?
Here are some of the endpoints you can load from Nuxeo:
| Resource | Endpoint | Method | Data selector | Description |
|---|---|---|---|---|
| capabilities | /capabilities | GET | Get server capabilities (returns a JSON object with details). | |
| documents_by_id | /id/{docId} | GET | Get a document by its id (document object returned). | |
| documents_by_path | /path/{path} | GET | Get a document by repository path (document object returned). | |
| search_lang | /search/lang | POST (search) / GET examples | entries | Search using NXQL or query language; paginated results returned under 'entries'. |
| users | /user/{userId} | GET | Get user details by id (user object). | |
| groups | /group/{groupId} | GET | Get group details by id. | |
| directory | /directory/{directoryId} | GET | entries | Directory entries returned under 'entries' if listing. |
| workflow | /workflow/{workflowId} | GET | Get workflow definition/details. | |
| task | /task/{taskId} | GET | Get task details. | |
| oauth2_token | /oauth2/token | POST | Obtain OAuth2 tokens (not GET but important for auth). |
How do I authenticate with the Nuxeo API?
The API accepts HTTP Basic authentication (e.g., curl -u Administrator:Administrator) or a token provided in the X-Authentication-Token header; OAuth2 endpoints are available to manage OAuth2 clients and tokens. For Basic auth provide Authorization: Basic <base64(user:pass)> or use curl -u; for token auth send X-Authentication-Token: .
1. Get your credentials
- Create or use an existing Nuxeo user account (via Nuxeo Admin UI). 2) For Basic: use the username and password directly. 3) For Token auth: POST to /nuxeo/authentication/token providing applicationName, deviceId and permission (see server's token auth docs) to receive a token, then copy it. 4) For OAuth2: register a client via /nuxeo/api/v1/oauth2/client and request tokens via /nuxeo/api/v1/oauth2/token per OAuth2 flow.
2. Add them to .dlt/secrets.toml
[sources.nuxeo_rest_api_source] username = "your_username" password = "your_password" # or for token auth x_auth_token = "your_token_here"
dlt reads this automatically at runtime — never hardcode tokens in your pipeline script. For production environments, see setting up credentials with dlt for environment variable and vault-based options.
How do I set up and run the pipeline?
Set up a virtual environment and install dlt:
uv venv && source .venv/bin/activate uv pip install "dlt[workspace]"
1. Install the dlt AI Workbench:
dlt ai init --agent <your-agent> # <agent>: claude | cursor | codex
This installs project rules, a secrets management skill, appropriate ignore files, and configures the dlt MCP server for your agent. Learn more →
2. Install the rest-api-pipeline toolkit:
dlt ai toolkit rest-api-pipeline install
This loads the skills and context about dlt the agent uses to build the pipeline iteratively, efficiently, and safely. The agent uses MCP tools to inspect credentials — it never needs to read your secrets.toml directly. Learn more →
3. Start LLM-assisted coding:
Use /find-source to load data from the Nuxeo API into DuckDB.
The rest-api-pipeline toolkit takes over from here — it reads relevant API documentation, presents you with options for which endpoints to load, and follows a structured workflow to scaffold, debug, and validate the pipeline step by step.
4. Run the pipeline:
python nuxeo_rest_api_pipeline.py
If everything is configured correctly, you'll see output like this:
Pipeline nuxeo_rest_api_pipeline load step completed in 0.26 seconds 1 load package(s) were loaded to destination duckdb and into dataset nuxeo_rest_api_data The duckdb destination used duckdb:/nuxeo_rest_api.duckdb location to store data Load package 1749667187.541553 is LOADED and contains no failed jobs
Inspect your pipeline and data:
dlt pipeline nuxeo_rest_api_pipeline show
This opens the Pipeline Dashboard where you can verify pipeline state, load metrics, schema (tables, columns, types), and query the loaded data directly.
Python pipeline example
This example loads documents_by_path and search_lang from the Nuxeo API into DuckDB. It mirrors the endpoint and data selector configuration from the table above:
import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def nuxeo_rest_api_source(username=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://{NUXEO_SERVER}/nuxeo/api/v1", "auth": { "type": "http_basic", "password": username, }, }, "resources": [ {"name": "documents_by_path", "endpoint": {"path": "path/{path}"}}, {"name": "search_lang", "endpoint": {"path": "search/lang", "data_selector": "entries"}} ], } yield from rest_api_resources(config) def get_data() -> None: pipeline = dlt.pipeline( pipeline_name="nuxeo_rest_api_pipeline", destination="duckdb", dataset_name="nuxeo_rest_api_data", ) load_info = pipeline.run(nuxeo_rest_api_source()) print(load_info)
To add more endpoints, append entries from the resource table to the "resources" list using the same name, path, and data_selector pattern.
How do I query the loaded data?
Once the pipeline runs, dlt creates one table per resource. You can query with Python or SQL.
Python (pandas DataFrame):
import dlt data = dlt.pipeline("nuxeo_rest_api_pipeline").dataset() sessions_df = data.documents_by_path.df() print(sessions_df.head())
SQL (DuckDB example):
SELECT * FROM nuxeo_rest_api_data.documents_by_path LIMIT 10;
In a marimo or Jupyter notebook:
import dlt data = dlt.pipeline("nuxeo_rest_api_pipeline").dataset() data.documents_by_path.df().head()
See how to explore your data in marimo Notebooks and how to query your data in Python with dataset.
What destinations can I load Nuxeo data to?
dlt supports loading into any of these destinations — only the destination parameter changes:
| Destination | Example value |
|---|---|
| DuckDB (local, default) | "duckdb" |
| PostgreSQL | "postgres" |
| BigQuery | "bigquery" |
| Snowflake | "snowflake" |
| Redshift | "redshift" |
| Databricks | "databricks" |
| Filesystem (S3, GCS, Azure) | "filesystem" |
Change the destination in dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. See the full destinations list.
Troubleshooting
Authentication failures
Ensure you supply credentials: either HTTP Basic (Authorization header or curl -u) or X-Authentication-Token header. 401 responses indicate invalid credentials or missing token. For token auth verify token creation via /authentication/token and that token is active.
Pagination and selectors
Search and resource listing responses are paginated; search results commonly return an object with a top-level 'entries' array containing records. Use query parameters pageSize and currentPage (or pageProvider parameters) as documented in search endpoints to iterate pages.
Rate limits and errors
Nuxeo itself does not standardize a public rate-limit header; expect standard HTTP status codes: 400 for bad requests, 401 for auth errors, 403 for forbidden, 404 for not found, 409 for conflict, 500 for server errors. Check server logs or capabilities endpoint to debug server-specific issues.
Ensure that the API key is valid to avoid 401 Unauthorized errors. Also, verify endpoint paths and parameters to avoid 404 Not Found errors.
Next steps
Continue your data engineering journey with the other toolkits of the dltHub AI Workbench:
data-exploration— Build custom notebooks, charts, and dashboards for deeper analysis with marimo notebooks.dlthub-runtime— Deploy, schedule, and monitor your pipeline in production.
dlt ai toolkit data-exploration install dlt ai toolkit dlthub-runtime install
Was this page helpful?
Community Hub
Need more dlt context for Nuxeo?
Request dlt skills, commands, AGENT.md files, and AI-native context.