---
title: "View source for Api Generation And Connections/Api Discovery - DreamFactory Wiki"
source: "https://wiki.dreamfactory.com/index.php?action=edit&title=Api_Generation_And_Connections%2FApi_Discovery"
canonical_url: "https://wiki.dreamfactory.com/index.php?action=edit&title=Api_Generation_And_Connections%2FApi_Discovery"
converted_at: "2026-11-23T12:12:35.675Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
[]()
	
	
	
	# View source for Api Generation And Connections/Api Discovery

	
		
		← [Api Generation And Connections/Api Discovery](/Api_Generation_And_Connections/Api_Discovery)
		
		
		
		[Jump to navigation](#mw-head)
		[Jump to search](#searchInput)
		You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: [Users](/index.php?title=DreamFactory_Wiki:Users&action=edit&redlink=1).---

You can view and copy the source of this page.

&lt;span id="api-discovery-spec-endpoints">&lt;/span>
= API Discovery &amp;amp; Spec Endpoints =

DreamFactory exposes OpenAPI 3.0 specs for every service. This is the first thing an LLM or programmatic client should do — discover what’s available and read the spec before making calls.

-----

&lt;span id="step-1-list-all-services">&lt;/span>
== Step 1: List All Services ==

&lt;syntaxhighlight lang="bash">curl -s http://your-df-host/api/v2/system/service \
  -H "X-DreamFactory-API-Key: YOUR_API_KEY" \
  -H "X-DreamFactory-Session-Token: YOUR_TOKEN" \
  | python3 -c "
import sys, json
for s in json.load(sys.stdin)['resource']:
    print(s['name'], '-', s['type'], '-', s['label'])
"&lt;/syntaxhighlight>
This gives you every service &lt;code>name&lt;/code> — used as the URL namespace in &lt;code>/api/v2/{name}/&lt;/code>.

-----

&lt;span id="step-2-get-the-openapi-spec-for-a-service">&lt;/span>
== Step 2: Get the OpenAPI Spec for a Service ==

&lt;span id="df-7.5-newer-versions">&lt;/span>
=== DF 7.5+ (newer versions) ===

Each service exposes its own spec directly:

&lt;pre>GET /api/v2/{service_name}/_spec&lt;/pre>
&lt;syntaxhighlight lang="bash">curl -s http://your-df-host/api/v2/system/_spec \
  -H "X-DreamFactory-API-Key: YOUR_API_KEY" \
  -H "X-DreamFactory-Session-Token: YOUR_TOKEN"&lt;/syntaxhighlight>
&lt;span id="df-7.4.x-and-earlier">&lt;/span>
=== DF 7.4.x and earlier ===

Use the &lt;code>api_docs&lt;/code> service instead:

&lt;pre>GET /api/v2/api_docs/{service_name}&lt;/pre>
&lt;syntaxhighlight lang="bash"># Full system API spec
curl -s http://your-df-host/api/v2/api_docs/system \
  -H "X-DreamFactory-API-Key: YOUR_API_KEY" \
  -H "X-DreamFactory-Session-Token: YOUR_TOKEN"

# Spec for a database service named 'mysql'
curl -s http://your-df-host/api/v2/api_docs/mysql \
  -H "X-DreamFactory-API-Key: YOUR_API_KEY" \
  -H "X-DreamFactory-Session-Token: YOUR_TOKEN"&lt;/syntaxhighlight>
&lt;span id="get-all-specs-at-once">&lt;/span>
=== Get all specs at once ===

&lt;syntaxhighlight lang="bash"># Full combined spec for all services
curl -s http://your-df-host/api/v2/api_docs \
  -H "X-DreamFactory-API-Key: YOUR_API_KEY" \
  -H "X-DreamFactory-Session-Token: YOUR_TOKEN"&lt;/syntaxhighlight>

-----

&lt;span id="step-3-extract-paths-from-spec">&lt;/span>
== Step 3: Extract Paths from Spec ==

&lt;syntaxhighlight lang="python">import requests, json

APIKEY = "your-api-key"
TOKEN = "your-session-token"
HOST = "http://your-df-host"

# Get spec for a service
spec = requests.get(
    f"{HOST}/api/v2/api_docs/system",
    headers={
        "X-DreamFactory-API-Key": APIKEY,
        "X-DreamFactory-Session-Token": TOKEN,
    }
).json()

# List all endpoints
for path, methods in sorted(spec["paths"].items()):
    for method in methods:
        if method in ["get", "post", "put", "patch", "delete"]:
            summary = methods[method].get("summary", "")
            print(f"{method.upper():7} /api/v2{path}  —  {summary}")&lt;/syntaxhighlight>

-----

&lt;span id="what-the-spec-tells-you">&lt;/span>
== What the Spec Tells You ==

Each path entry includes: - '''summary''' — one-line description - '''description''' — full explanation - '''parameters''' — query params with types and descriptions - '''requestBody''' — &lt;code>$ref&lt;/code> to schema in &lt;code>components/schemas&lt;/code> - '''responses''' — response schemas

The &lt;code>components/schemas&lt;/code> section has the full field definitions for every request and response object.

-----

&lt;span id="check-df-version">&lt;/span>
== Check DF Version ==

&lt;syntaxhighlight lang="bash">curl -s http://your-df-host/api/v2/system/environment \
  -H "X-DreamFactory-API-Key: YOUR_API_KEY" \
  -H "X-DreamFactory-Session-Token: YOUR_TOKEN" \
  | python3 -c "import sys,json; e=json.load(sys.stdin); print(e['platform']['version'])"&lt;/syntaxhighlight>
* '''7.5+''': Use &lt;code>GET /api/v2/{service}/_spec&lt;/code>
* '''7.4.x and earlier''': Use &lt;code>GET /api/v2/api_docs/{service}&lt;/code>

-----

&lt;span id="available-service-types">&lt;/span>
== Available Service Types ==

To see all service types you can create:

&lt;syntaxhighlight lang="bash">curl -s http://your-df-host/api/v2/system/service_type?fields=name,label,group \
  -H "X-DreamFactory-API-Key: YOUR_API_KEY" \
  -H "X-DreamFactory-Session-Token: YOUR_TOKEN"&lt;/syntaxhighlight>
This returns the valid &lt;code>type&lt;/code> values for &lt;code>POST /api/v2/system/service&lt;/code>.
Return to [Api Generation And Connections/Api Discovery](/Api_Generation_And_Connections/Api_Discovery).

Retrieved from "[https://wiki.dreamfactory.com/Api_Generation_And_Connections/Api_Discovery](https://wiki.dreamfactory.com/Api_Generation_And_Connections/Api_Discovery)"