opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.

Running Queries via Open Dental API

API & Integrations4 min read4/18/2026

If you need to pull specific, custom data out of your practice management software that isn't available in standard reports, you need to use the open dental API query endpoint. This feature allows you to execute SQL queries against your database through the API, giving you the flexibility to create custom dashboards, automated exports, or specialized reporting tools that fit your practice's unique needs.

Prerequisites

Before you can start running queries, you must ensure your environment is configured correctly. The API is not enabled by default.

  1. API Access Tier: You must have an active API subscription that includes the ApiQueries permission. This is typically part of the $15/month (or higher) tier. Check your current subscription details in the Open Dental Developer Portal.
  2. Developer Portal Access: You must have a registered account on the Open Dental Developer Portal to generate your DeveloperKey.
  3. eConnector: The eConnector service must be installed and running on your server. This service acts as the bridge between your external application and your local database.
  4. Enable API: In your Open Dental software, go to Setup > Advanced Setup > API. Ensure the "Enabled" checkbox is checked. You will also need to add the CustomerKey generated in the Developer Portal here.
  5. Permissions: Ensure the CustomerKey you are using has been granted the ApiQueries permission.

Implementation

The open dental API query endpoint accepts a POST request containing your SQL query. Because this is a powerful tool, you must be careful with the SQL you write.

The base URL for your requests will be https://{serverIP}:{port}/api/v1/.

Here is a basic example using JavaScript (Node.js) to execute a query:

const axios = require('axios');

// Replace with your actual credentials and endpoint
const baseUrl = 'https://your-server-ip:30223/api/v1/';
const developerKey = 'YOUR_DEVELOPER_KEY';
const customerKey = 'YOUR_CUSTOMER_KEY';

async function runQuery() {
  try {
    const response = await axios.post(`${baseUrl}Queries`, {
      "Query": "SELECT PatNum, LName, FName FROM patient LIMIT 10;"
    }, {
      headers: {
        'Authorization': `ODFHIR ${developerKey}/${customerKey}`,
        'Content-Type': 'application/json'
      }
    });
    console.log(response.data);
  } catch (error) {
    console.error('Error executing query:', error.response ? error.response.data : error.message);
  }
}

runQuery();

Common Errors

When working with the open dental API query endpoint, you may encounter these common issues:

Limitations

Don't want to build your own dashboard? DentalCanvas already connects to your Open Dental data and shows you everything in a visual interface.


This article is provided by opendentalsupport.com, an independent community resource. We are not affiliated with Open Dental Software, Inc.

Skip the API. Get a Dashboard.

Why build a custom integration when DentalCanvas already reads your Open Dental data and shows you everything in a visual dashboard?

Try DentalCanvas

Was this article helpful?

Related Articles

opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.