API Endpoint

API Endpoint for SQL queries

API Endpoints allow you to access query results programmatically from Draxlr. Once created, you can use the endpoint in applications, scripts, or integrations to fetch data directly from your queries.

How to Create an API Endpoint

Follow these steps to create an API endpoint:

  1. Click Create API Endpoint to set up a new API integration.
  2. Choose the Query that should power this API endpoint.
  3. Click Create to finalize and create the API endpoint.
  4. Once created, Draxlr will generate:
    • API URL
    • API Key

You can now use these credentials to access the query results via HTTP requests.


API Request

Use the generated API URL to fetch query results.

Example cURL Request

curl https://api.draxlr.com/api/integrations/gW7AxKzIhqNebVTSQJFmb1sojGIwtH7S/result?page=1&pageSize=10&variables=%7B%7D -H "Authorization: wuIh2z8RBBdmy7IK5JiakrU29S1FNtfY"

Request Headers

HeaderDescription
AuthorizationAPI Key generated for the endpoint

Query Parameters

ParameterTypeDescription
pageintegerPage number for pagination
pageSizeintegerNumber of records per page
variablesJSONQuery variables encoded as URL string

Response

The API returns the query results in JSON format.

Example Response

{
  "page": 1,
  "pageSize": 10,
  "total": 120,
  "data": [
    {
      "month": "Jan 2026",
      "orders": 73
    },
    {
      "month": "Feb 2026",
      "orders": 74
    }
  ]
}

Tips

  • Keep your API key secure and never expose it publicly.
  • Use pagination for large datasets.
  • Use query variables to dynamically filter results.
  • API endpoints can be used in internal tools, dashboards, and automation scripts.