> ## Documentation Index
> Fetch the complete documentation index at: https://developers.drpn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API explorer

> Send any query with your own API key, from this page.

Paste your `dgql_` key into **Authorization**, choose an example in the request panel, and press **Send**. Every query goes to the same endpoint; the body's `query` says what to read.

* **Your key goes only to the API.** Your browser sends the request straight to the API host; developers.drpn.ai never receives the key. The browser remembers it for this site, so on a shared computer clear the **Authorization** field when you finish.
* **Pick the host.** **Hosted Darpan** is `https://api.drpn.ai`. For your own instance, choose **Self-hosted Darpan** and enter its backend host; it must list `https://developers.drpn.ai` in [`webapp_public_api_origins`](https://developers.drpn.ai/self-host/production).
* **Start with Check your key.** It works on every tenant. The other examples name an audit (`month-close`), a date and a finding id (`F-20790`): replace them with ones from your tenant, or the answer is `… was not found`.
* **Write your own.** Switch the body to **JSON** and edit `query`. Field names and types are in the [reference](https://developers.drpn.ai/graphql/queries/audit-report.md); the full schema is at `GET /rest/s1/graphql/sdl`.

Something refused? See [When it does not work](https://developers.drpn.ai/graphql/quickstart.md#when-it-does-not-work).


## OpenAPI

````yaml graphql-reference/explorer.openapi.json POST /rest/s1/graphql/public
openapi: 3.1.0
info:
  title: Darpan GraphQL API
  version: v1
  description: >-
    One endpoint for every query. The body carries a GraphQL query; the API key
    picks the tenant.
servers:
  - url: https://api.drpn.ai
    description: Hosted Darpan
  - url: https://{host}
    description: Self-hosted Darpan
    variables:
      host:
        default: darpan.example.com
        description: >-
          Your instance's backend host, not the app's host. The instance must
          allow https://developers.drpn.ai as a public API origin.
security:
  - apiKey: []
paths:
  /rest/s1/graphql/public:
    post:
      summary: Run a query
      description: Runs one GraphQL query for the API key's tenant.
      operationId: runQuery
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
            examples:
              Check your key:
                summary: Check your key (works on any tenant)
                value:
                  query: |-
                    query KeyCheck {
                      reconciliationResults(first: 1) {
                        edges { node { reconciliationRunResultId createdDate } }
                        pageInfo { hasNextPage }
                      }
                    }
              auditReport:
                summary: >-
                  auditReport: An audit's report for one morning, from the
                  tenant of the API key.
                value:
                  query: |-
                    query MorningReport {
                      auditReport(audit: "month-close", date: "2026-10-08") {
                        schema
                        report { date period window { from thru } }
                        health {
                          complete
                          summary
                          sources { system read records reason affects }
                        }
                        summary { open pending newToday fixedToday }
                        categories {
                          id
                          label
                          statements {
                            id
                            text
                            status
                            counts { open pending }
                            findings { id headline state firstFound ageDays records { system recordType id } }
                          }
                        }
                      }
                    }
              auditFinding:
                summary: >-
                  auditFinding: One finding by id, with its records, evidence,
                  fix and history. Another tenant's finding reads as not found.
                value:
                  query: |-
                    query OneFinding {
                      auditFinding(id: "F-20790") {
                        finding {
                          id
                          headline
                          statement { id text }
                          status { state firstFound lastSeen timesSeen pendingUntil }
                          records { system recordType id internalId status }
                          fix { owner where action verify { by passesWhen } darpanChanges }
                          history { at event }
                        }
                        access { mode note }
                      }
                    }
              findings:
                summary: >-
                  findings: The tenant's findings, oldest first by default; each
                  node is the report's finding summary plus its audit,
                  statement, category and period. ageDays is as of today in the
                  tenant's time zone. Filter via `query:` search string. Allowed
                  keys: audit, statement, category, state, period, firstFound
                value:
                  query: |-
                    query OpenReturnsFindings {
                      findings(first: 2, query: "category:returns state:open period:2026-10", sortKey: FIRST_FOUND) {
                        edges {
                          cursor
                          node {
                            id
                            statement
                            headline
                            state
                            firstFound
                            ageDays
                            records { system recordType id internalId status }
                            next
                          }
                        }
                        pageInfo { hasNextPage endCursor }
                      }
                    }
              reconciliationResults:
                summary: >-
                  reconciliationResults: Reconciliation run results, newest or
                  oldest first. Filter via `query:` search string. Allowed keys:
                  savedRunId, reconciliationRunId, ruleSetId, statusEnumId
                value:
                  query: |-
                    query RecentRuns {
                      reconciliationResults(first: 2, sortKey: CREATED_DATE, reverse: true, query: "statusEnumId:AUT_STAT_SUCCESS") {
                        edges {
                          cursor
                          node { reconciliationRunResultId savedRunId differenceCount onlyInFile1Count onlyInFile2Count createdDate }
                        }
                        pageInfo { hasNextPage endCursor }
                      }
                    }
      responses:
        '200':
          description: 'Every response is HTTP 200, a refused one too: read `errors`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                ok:
                  summary: A key that works
                  value:
                    data:
                      reconciliationResults:
                        edges:
                          - node:
                              reconciliationRunResultId: '100457'
                              createdDate: '2026-10-26T06:30:12Z'
                        pageInfo:
                          hasNextPage: true
                    extensions:
                      cost:
                        requestedQueryCost: 3
                        actualQueryCost: 3
                        throttleStatus:
                          maximumAvailable: 1000
                          currentlyAvailable: 997
                          restoreRate: 50
                refused:
                  summary: A key that is unknown, disabled or expired
                  value:
                    extensions: {}
                    errors:
                      - message: invalid API key
                        extensions:
                          code: UNAUTHENTICATED
components:
  schemas:
    Request:
      type: object
      required:
        - query
      properties:
        query:
          type: string
          description: 'A GraphQL query document. Queries only: a mutation is rejected.'
        variables:
          type: object
          description: >-
            Values for the variables the query declares, e.g. `{"id":
            "F-20790"}`.
        operationName:
          type: string
          description: Which operation to run when the document names more than one.
    Response:
      type: object
      properties:
        data:
          type:
            - object
            - 'null'
          description: >-
            The fields you asked for. Absent when the query was refused before
            it ran.
        errors:
          type: array
          description: >-
            Present when something failed. Each has a `message` and, where
            Darpan sets one, `extensions.code`; see [Errors](/graphql/errors).
          items:
            type: object
            properties:
              message:
                type: string
              extensions:
                type: object
                properties:
                  code:
                    type: string
        extensions:
          type: object
          description: >-
            `cost`: what the query cost and what is left in the key's bucket;
            see [Cost and throttling](/graphql/cost-and-throttling).
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Your `dgql_` API key. Your browser sends it straight to the host above;
        developers.drpn.ai never receives it. See
        [Authentication](/graphql/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.