βQuerying
Here, we will cover the basics of making queries against our API.
Creating API Keys
The first step in querying your data with Carpool (after Indexing your data), is to create an API key. The process is very straightforward. Head to the API Keys page in the app and click New API Key. From this page, you can view and manage your keys. To remove a key (if itβs been compromised, for example), simple click the trash icon next to it.
Querying our API
View our API Reference for more information. Note that all of your queries must include your API key in the x-api-key
header.
API Structure
Carpool's query API layer revolves around one POST endpoint. At a high level, there are two core components to the POST body that help specify your query.
Type - This is the type of query you'd like to make and is a string. ex) LIST_INSTRUCTIONS
Query - Most other fields fall under here and is an object
The API is intent based and designed to be intuitive, removing the need for the user to understand any of the Elasticsearch DSL. It will be clear as you dive into the specifics of the API documentation here:
πAPI ReferenceDevnet Queries
We support all queries against Devnet data. Simply replace mainnet
with devnet
in the URL. In order to index data on Devnet, you must separately mark the program for indexing on Devnet on our UI. Furthermore, you will need to use Devnet-specific API keys.
Last updated