跳至主要內容

Admin API

更新於
Aug 25, 2026

概覽

The Quicknode Admin API allows users to perform all actions available in the User Dashboard programmatically via REST API. These actions include:


  1. Creating, managing, and deleting endpoints
  2. Retrieving metrics and billing information
  3. Managing and rotating API keys
  4. Configuring security features (e.g., whitelisting, JWT authentication, and more)

API Specifications (OpenAPI)

Download the machine-readable API specifications for use with compatible tooling (e.g. Swagger Editor).


Access

The Admin API is available to accounts subscribed to paid plans.

驗證

To use the Admin API, you must authenticate your requests by including an API key in the HTTP headers. Follow these steps:

  1. Generate an API key from your Quicknode dashboard.
  2. Include the API key in the x-api-key header of your HTTP request. For example:
x-api-key: your-api-key-here

Here's an example of how to request usage data using the Admin API with cURL:

curl -X GET 'https://api.quicknode.com/v0/usage/rpc' \
-H 'accept: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE'

Prometheus Exporter (Enterprise Exclusive)

Enterprise customers now have access to a dedicated endpoint— Prometheus (/exporter/prometheus) — for deeper insights into their API usage. This endpoint provides real-time metrics that can be seamlessly integrated into internal dashboards. It offers the same data as the metrics dashboard, updated at intervals defined by Quicknode, and are compatible with any Prometheus scraper. This enables easy monitoring and tracking of usage metrics with accuracy.


Please note that this endpoint is currently available only for Enterprise customers. For more information or inquiries about accessing these endpoints, feel free to contact us.

Making Admin REST API Requests

In this documentation, you will see example requests made with cURL and various programming languages for each supported Admin API method. This section will explain how to execute it on your machine.

cURL

大多數基於 *nix 的系統預設即支援 cURL。cURL 是一款用於透過 URL 傳輸資料的命令列工具及函式庫。請執行以下指令,確認您的系統是否已安裝:

curl -h

CLI

To run CLI examples, install the qn command line tool:

brew install quicknode/tap/qn

Check if you have it by running the following:

qn --version

Then authenticate with an Admin API key from your Quicknode dashboard:

qn auth login

You can also provide the API key directly:

qn auth login --api-key YOUR_API_KEY_HERE

For other installation methods, output formats, and configuration options, see the CLI documentation.

Python

要執行我們的 Python 程式碼範例,您需要先安裝 Python 以及 requests 套件。您可以透過以下指令安裝此套件:

python -m pip install requests

JavaScript

To run our JavaScript code examples, you'll need to have Node v18 and up installed. You can follow this official document to install the latest, stable version of Node globally. Check if you have it by running the following:

節點 -v

Ruby

To run our Ruby code examples, you'll need to have Ruby installed. You can follow this official installation document for more information. Check if you have it by running the following:

ruby -v

SDK

To run SDK examples, install the SDK package for your preferred language, create an API key in the Quicknode dashboard, and set it in your environment:

export QN_SDK__API_KEY="YOUR_API_KEY"

Install the Node.js SDK package:

npm 安裝sdk

Then initialize the SDK and make an Admin API request:

import { QuicknodeSdk } from "@quicknode/sdk";

const qn = QuicknodeSdk.fromEnv();
const response = await qn.admin.getEndpoints({ limit: 20 });

console.log(response.data);

For other languages and setup options, see the SDK Quick Start.