Skip to content

Commit

Permalink
add api key limit docs (#664)
Browse files Browse the repository at this point in the history
* add api key limit docs

* table typo
  • Loading branch information
azf20 authored May 6, 2024
1 parent 4b6333f commit 43a87ab
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions website/pages/en/querying/managing-api-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ title: Managing your API keys

Regardless of whether you’re a dapp developer or a subgraph developer, you’ll need to manage your API keys. This is important for you to be able to query subgraphs because API keys make sure the connections between application services are valid and authorized. This includes authenticating the end user and the device using the application.

The Studio will list out existing API keys, which will give you the ability to manage or delete them.
The "API keys" table lists out existing API keys, which will give you the ability to manage or delete them. For each key, you can see its status, the cost for the current period, the spending limit for the current period, as well as total query numbers. You can click the "three dots" menu to edit a given API key:

- Rename API key
- Regenerate API key
- Delete API key
- Manage spending limit: this is an optional monthly spending limit for a given API key, in USD. This limit is per billing period (calendar month).

You can click on an individual API key to view the Details page:

1. The **Overview** section will allow you to:
- Edit your key name
Expand All @@ -15,12 +22,3 @@ The Studio will list out existing API keys, which will give you the ability to m
2. Under **Security**, you’ll be able to opt into security settings depending on the level of control you’d like to have over your API keys. In this section, you can:
- View and manage the domain names authorized to use your API key
- Assign subgraphs that can be queried with your API key
3. Under **Indexer Preference**, you’ll be able to set different preferences for Indexers who are indexing subgraphs that your API key is used for. You can assign up to 5 points for each of these:
- **Fastest Speed**: Time between the query and the response from an indexer. If you mark this as important we will optimize for fast indexers.
- **Lowest Price**: The amount paid per query. If you mark this as important we will optimize for the less expensive indexers.
- **Data Freshness**: How recent the latest block an indexer has processed for the subgraph you are querying. If you mark this as important we will optimize to find the indexers with the freshest data.
- **Economic Security**: The amount of GRT an indexer can lose if they respond incorrectly to your query. If you mark this as important we will optimize for indexers with a large stake.
4. Under **Budget**, you’ll be able to update the maximum price per query. Note that we have a dynamic setting for that that's based on a volume discounting algorithm. **We strongly recommend using the default settings unless you are experiencing a specific problem.** Otherwise, you can update it under "Set a custom maximum budget". On this page you can also view different KPIs (in GRT and USD):
- Average cost per query
- Failed queries over max price
- Most expensive query

0 comments on commit 43a87ab

Please sign in to comment.