Skip to content

API Platform

The API Platform is an API management gateway in front of your Dags. A collection groups endpoints, clients and policies; the same collection is available over REST, GraphQL and MCP.

Protocols and URLs

Protocol URL shape Use it for
REST /api/{workspace}/{collection}/{endpoint} HTTP clients
GraphQL /graphql/{workspace}/{collection} GraphQL clients
MCP /mcp/{workspace}/{collection} AI clients and agents

The workspace prefix keeps every URL unambiguous. Credentials must belong to the same workspace as the URL.

There are two MCP surfaces: the collection MCP URL above exposes your published endpoints as tools, while the DagForge MCP server at /mcp lets an external AI agent operate the workspace itself. See MCP server.

Collections

A collection has a name, a URL path, a protocol and a published flag. It owns its endpoints, clients and policies.

Endpoints

An endpoint maps a route to a Dag task:

Field Meaning
Name Display name
Method and path REST route, for example GET /orders/{id}
Dag The Dag that serves the request
Response task The task whose result is returned (required in sync mode)
Request schema JSON Schema for the request body or arguments
Response schema JSON Schema for the response
Mode sync returns the result; async returns 202 with a run id
Timeout How long the gateway waits

Clients

Auth method Credential How it is sent
API key One df_… key X-API-Key: <key> or Authorization: Bearer df_…
OAuth2 client credentials client_id + client_secret POST /oauth/token, then Authorization: Bearer <token>
JWT Client's own RSA key pair Authorization: Bearer <signed JWT>

Secrets are shown once at create or rotate. The list shows only the non-secret identity — the key prefix or the client id. The auth method cannot be changed after the client is created.

Policies

Policies apply to every protocol:

  • rate limits per client;
  • quotas;
  • IP allow and deny rules.

Anonymous traffic has its own per-IP rate limit and is tagged client=anonymous in logs.

Public collections

A published collection can be made unauthenticated with Allow unauthenticated access in Collection → Settings. This exposes the collection and its docs without credentials. It is off by default. Other collections in the same workspace remain protected.

Docs and test console

Every collection has a generated Docs tab with a shareable public link. It covers authentication, operations, request and response examples and the error table. Use the Test console to call an endpoint from the browser before you hand the URL to a consumer.

Dashboard, logs and settings

  • Dashboard — API requests, 5xx error rate, p95 latency and concurrency.
  • Logs — request-level gateway logs. Filter by route, status, client, correlation id or collection.
  • Settings — concurrency limit, queue size and queue behavior for the workspace gateway.

Example

curl -H "X-API-Key: df_…" \
  https://api-preview.dagforge.com/api/acme/shop/orders/42

Limits and notes

  • An endpoint triggers a Dag task; this is not a connector marketplace.
  • The gateway records request-level logs with a correlation id. See Observability.
  • Request and response size, timeout and concurrency limits apply. See Reference.
  • API Docs — REST management API.
  • MCP Docs — MCP tool surface.
  • AI Chat — the agent can manage collections through MCP.