Skip to the page

Guides · Integrations

OpenAPI & no-code tools

Let Postman, Retool, n8n, Zapier or a custom GPT call your deployed queries through the OpenAPI document every project serves.

In the schema
—

What you’ll build#

You will connect third-party tools directly to your project, including API clients like Postman and Bruno, internal-tool builders like Retool and Appsmith, workflow automations in n8n, Zapier or Make, and custom GPT actions. Each tool calls your deployed queries over HTTPS with its own scoped service key under the same schema access policies as your app.

Live OpenAPI contract over deployed queries

Every branch compiles its deployed queries into GET /openapi.json with typed variables, row schemas and x-napalm-* metadata. Pair it with --passthrough none so external tools execute only approved queries.

You maintain no hand-written Swagger YAML or wrapper API. Pushing a new query updates the branch’s OpenAPI specification immediately.

Before you start#

Write a deployed query for each operation the external tool needs. The leading # comment line of each query file becomes the operation’s summary in the OpenAPI document and UI picker.

dbschema/queries/openTickets.edgeql
# Open tickets, with the GitHub issue that tracks eachselect Ticket { id, title, issue }filter not .is_resolvedorder by .titlelimit <int64>$limit
dbschema/queries/resolveTicket.edgeql
# Mark a ticket resolvedupdate Ticketfilter .id = <uuid>$ticketset { is_resolved := true }

Get the project’s OpenAPI document#

Fetch GET /openapi.json from the branch URL with any valid bearer credential to inspect or import the generated specification.

Terminal
curl https://support.napalmdata.com/openapi.json \  -H "Authorization: Bearer $NAPALM_KEY" \  -o openapi.json
One operation per query
Each deployed query is POST /query/{name}. The operationId is the query’s name. Variables and rows are typed from the schema.
Always current
Napalm writes the document from the deployed queries at request time. Push a new query and fetch the document again.
Extensions
x-napalm-is-write marks a query that changes data. x-napalm-action marks a query whose rows go to your handler.
Authentication
The document’s one security scheme is a bearer token. A tool sends a service key, and a person’s session works the same way.

For a typed client in your own code, napalm generate turns the same document into a client in eight languages. See SDKs.

Make a key for the tool#

Issue a dedicated service key per integration and lock the endpoint to deployed queries so external tools cannot execute ad-hoc EdgeQL statements.

Per-tool service key

Issue a labeled ndb_… key per integration (--read-only for dashboards) so revoking one credential leaves every other tool running.

Deployed-query lockdown

napalm endpoint --passthrough none rejects ad-hoc statements, confining callers strictly to deployed POST /query/{name} operations under access rules.

External tool caller

Retool, n8n, Zapier, Postman and custom GPT actions import GET /openapi.json and call typed operations over HTTPS.

Terminal
napalm queries push support # A key for the tool. This one can only read: leave --read-only off for a tool that writes.napalm keys create support --label retool --read-only # Nobody sends a statement of their own. Every caller is held to the queries you deployed.napalm endpoint support --passthrough none # What the key can reach, before a tool holds itnapalm keys reach support <key-id>
One key per tool
Label each key with the tool’s name. Revoking a leaked key with napalm keys revoke leaves every other tool working.
Read-only where possible
A dashboard only reads. Napalm refuses every write from a read-only key.
Deployed queries only
With --passthrough none, the key can run the queries in the document and nothing else. Ad-hoc statements are refused.
Access rules still apply
A query run by a service key returns the rows your rules give service keys. A key does not bypass a rule.

Make a sample call#

Invoke any operation in the document by posting a JSON variables object to POST /query/{name}.

Request · curl
curl https://support.napalmdata.com/query/openTickets \  -H "Authorization: Bearer $NAPALM_KEY" \  -H "Content-Type: application/json" \  -d '{ "variables": { "limit": 20 } }'
Response
{  "data": [    { "id": "8f2c1e64-0b7a-4f4e-9d2b-3a6c5e1f7d90", "title": "Export fails on large files", "issue": "acme/app#412" }  ]}

The body holds the query’s variables and nothing else. The answer’s data is always a list of rows. A refusal returns a stable code, and a query_failed refusal also carries the database’s exception type.

A read-only key calling resolveTicket
{  "error": {    "code": "query_failed",    "type": "DisabledCapabilityError"  }}
Dry run
Add "is_dry_run": true beside variables. The change runs as the caller and is rolled back. The answer lists the changes the write would have made.
Read your own writes
Each answer carries a Napalm-Bookmark header. Send the bookmark back on the next call, and that call sees the write on any replica. Running queries has the details.

Set up each tool#

Import openapi.json or point an HTTP step at your branch URL, attaching the tool’s service key as a bearer header.

ToolImport the queriesAdd the key
Postman, Insomnia, BrunoImport openapi.json. Each query becomes a saved request.Add the keyA bearer token on the collection.
Retool, AppsmithAdd the project’s address as a REST API resource. Retool also imports the document and lists each query by name.Add the keyAn Authorization: Bearer … header on the resource.
n8nAn HTTP Request node for each call, with POST, the query’s address and a JSON body with variables.Add the keyA header credential, so the key is not in the workflow.
Zapier, MakeZapier’s Webhooks app with a custom request, or Make’s HTTP module.Add the keyAn Authorization header on the step.
A custom GPTPaste the document as an action’s schema. The model picks each query from its summary.Add the keyAPI key authentication, sent as a bearer token.

Start an automation when a row changes#

The calls above go from the tool to Napalm. To start a workflow on a commit, send the change to the tool’s own webhook address. Declare a notify on the type, such as notify ticket_changed after insert, update;, and register a webhook that carries rows.

Terminal
# Deliveries may go to the tool's host and no othernapalm webhooks hosts support --add hooks.zapier.com # Rows, read as a key that can only readnapalm webhooks add support https://hooks.zapier.com/hooks/catch/<your-hook> \  --event ticket_changed --key <key-id>
Payload
A JSON body with the changed rows the key may read. Each row has type, op, id and fields. Notifications & webhooks lists every field.
The signature
Every delivery carries a signature in Napalm-Signature. A tool that can run code on the raw body should check the signature. A tool that cannot should treat the delivery as a nudge, take the ids and read the rows back with a query through its own service key.
A workflow that fails later
No-code tools answer as soon as the request arrives, and Napalm counts the delivery as taken. A step that fails afterwards gets no resend, so watch the tool’s own run history.
Requirements
A change log on the cluster (napalm storage enable <cluster> log) and a passthrough that admits service keys (--passthrough keys), because Napalm reads the rows from the log.

For your own code on the receiving end with retries you control, Email, Slack & push and Queues & streams fit better.

Check the setup#

  1. Fetch the document

    The document lists /query/openTickets and /query/resolveTicket with summaries. Only resolveTicket has x-napalm-is-write set.

  2. Call a read from the tool

    The rows come back as data.

  3. Call the write with the read-only key

    The call answers 400 query_failed with the type DisabledCapabilityError. The ticket stays unchanged.

  4. Send an ad-hoc statement

    POST /query with a query in the body answers 403 deployed_query_required.

Type a word or two to search every docs page.