For Agents
Run SQL queries and bulk inserts against a CrateDB cluster and read or write BLOBs through HTTP. Use when an agent needs to query a distributed analytics or time-series database directly without a driver.
Get started with CrateDB HTTP API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"execute a sql query on cratedb"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with CrateDB HTTP API API.
Execute a single SQL statement against CrateDB and receive rows in JSON
Run parameterised SQL with bind variables to avoid string interpolation
Submit bulk inserts and updates as a single bulk_args payload
Upload a binary large object to a CrateDB blob table
Download or delete a BLOB by its SHA-1 digest
GET STARTED
Use for: Run a SQL query against the CrateDB cluster, Insert one million rows in bulk into the events table, Upload an image BLOB to CrateDB, Find the average sensor reading for the last 24 hours
Not supported: Does not handle cluster provisioning, user management, or backup orchestration — use for executing SQL statements and managing BLOBs via HTTP only.
CrateDB is a distributed SQL database for real-time analytics, time-series, and IIoT workloads, and the CrateDB HTTP API is its primary programmatic interface. The API accepts SQL statements as JSON over HTTP at /_sql, including parameterised queries and bulk operations, and returns results in JSON. A separate /_blobs endpoint family handles binary large object storage with PUT, GET, and DELETE operations on a table-and-digest path. Authentication uses HTTP Basic with a CrateDB user and password, or Bearer token where a JWT is configured.
Authenticate with Basic credentials or a Bearer JWT token
Patterns agents use CrateDB HTTP API API for, with concrete tasks.
★ Real-Time Analytics on Time-Series Data
An IIoT platform writes millions of sensor readings into CrateDB and runs ad-hoc analytical queries through POST /_sql. Dashboards call the same endpoint with parameterised aggregation SQL and receive JSON rows. The single HTTP API works from any language without a JDBC driver, which simplifies polyglot deployments.
POST to /_sql with {stmt: 'SELECT avg(value) FROM sensors WHERE ts > now() - INTERVAL ?', args: ['1 hour']} and return the avg value to the dashboard.
Bulk Ingest from ETL Pipelines
An ETL job batches CDC events from a source database and posts them to CrateDB using bulk_args on /_sql. A single HTTP request inserts many rows in one network round-trip, keeping ingestion throughput high without per-row overhead. Failures are reported per row index so the pipeline can retry only the failed records.
POST to /_sql with stmt 'INSERT INTO events (id, payload, ts) VALUES (?, ?, ?)' and bulk_args of 5000 rows pulled from the upstream Kafka topic.
BLOB Storage Alongside Relational Data
An IoT image-capture pipeline stores small image frames as BLOBs in a CrateDB blob table while keeping the metadata (timestamp, device, classification) in a regular SQL table. PUT /_blobs/{table}/{digest} uploads each image and the response confirms persistence. Later, dashboards reference frames via GET /_blobs/{table}/{digest}.
PUT /_blobs/frames/{sha1} with the JPEG bytes from the camera, then INSERT a row into the frames metadata table referencing the same digest.
Agent-Driven SQL Querying
An AI data agent answers natural language questions over a CrateDB cluster by translating to SQL and calling /_sql. Through Jentic, the agent finds the right operation by intent and uses the database credentials from the vault, so it never holds the password in plain text. The four-endpoint surface keeps tool selection unambiguous.
Search Jentic for 'execute a sql statement on cratedb', execute POST /_sql with a generated SELECT, and return the JSON rows to the user.
4 endpoints — cratedb is a distributed sql database for real-time analytics, time-series, and iiot workloads, and the cratedb http api is its primary programmatic interface.
METHOD
PATH
DESCRIPTION
/_sql
Execute a SQL statement, optionally with parameters or bulk_args
/_blobs/{table}/{digest}
Upload a BLOB to a CrateDB blob table
/_blobs/{table}/{digest}
Download a stored BLOB by digest
/_blobs/{table}/{digest}
Delete a stored BLOB by digest
/_sql
Execute a SQL statement, optionally with parameters or bulk_args
/_blobs/{table}/{digest}
Upload a BLOB to a CrateDB blob table
/_blobs/{table}/{digest}
Download a stored BLOB by digest
/_blobs/{table}/{digest}
Delete a stored BLOB by digest
Three things that make agents converge on Jentic-routed access.
Credential isolation
CrateDB user passwords or JWT tokens are stored encrypted in the Jentic vault. Jentic injects either the Basic auth header or the Bearer token at execution time — agents never see raw credentials.
Intent-based discovery
Agents search Jentic with intents like 'run a sql query on cratedb' or 'upload a blob to cratedb' and Jentic returns the matching CrateDB operation with its input schema.
Time to first call
Direct CrateDB integration: a few hours for HTTP client setup, parameter binding, and bulk_args handling. Through Jentic: under 15 minutes — search, load, execute.
Alternatives and complements available in the Jentic catalogue.
Elastic / Kibana API
Elasticsearch is a distributed search and analytics engine often considered alongside CrateDB.
Choose Elasticsearch when full-text search and the ELK ecosystem are the priority; choose CrateDB when standard SQL and time-series joins matter.
Snowflake API
Snowflake is a cloud analytical data warehouse with a SQL API.
Choose Snowflake for cloud-only OLAP at petabyte scale; choose CrateDB for real-time ingest and IIoT workloads where low latency matters.
Supabase API
Supabase exposes Postgres over HTTP and PostgREST.
Choose Supabase when the workload is OLTP on Postgres and you want a hosted backend; choose CrateDB for distributed analytical and time-series queries.
MongoDB Atlas API
MongoDB Atlas is often used alongside analytical stores like CrateDB in mixed workloads.
Use MongoDB alongside CrateDB when document data lives in MongoDB and time-series analytics are pushed into CrateDB.
Specific to using CrateDB HTTP API API through Jentic.
What authentication does the CrateDB HTTP API use?
CrateDB supports HTTP Basic authentication with a configured database user and password, or Bearer token authentication when JWT auth is enabled on the cluster. Through Jentic, credentials are stored encrypted in the vault and added to the request automatically.
Can I run parameterised SQL through the CrateDB HTTP API?
Yes. POST /_sql accepts a JSON body with `stmt` and an `args` array for parameter placeholders, and `bulk_args` for batches of arguments. This avoids string interpolation and keeps queries safe from injection.
How do I bulk insert rows into CrateDB through Jentic?
Search Jentic for 'execute sql on cratedb with bulk args', load POST /_sql, and execute with `stmt` set to your INSERT statement and `bulk_args` set to the array of value arrays. CrateDB returns one result per row index.
How do I store binary data in CrateDB?
Create a blob table in CrateDB, then PUT /_blobs/{table}/{digest} with the binary body. The digest is the SHA-1 of the content. Use GET /_blobs/{table}/{digest} to read it back and DELETE to remove it.
What are the rate limits for the CrateDB HTTP API?
CrateDB itself does not impose API-level rate limits — capacity is a function of the cluster's CPU, memory, and disk. Self-hosted clusters can serve millions of statements per second; CrateDB Cloud applies plan-based throughput caps. Production integrations should pool connections and use bulk_args for heavy ingest.
Is the CrateDB HTTP API free?
CrateDB itself is open-source under the Apache 2.0 license — the HTTP API costs nothing on a self-hosted cluster. CrateDB Cloud is a paid managed offering with usage-based pricing; the same HTTP API is exposed on each cluster.