Querying > Managing your API keys

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.

  1. The Overview section will allow you to:
    • Edit your key name
    • Regenerate API keys
    • View the current usage of the API key with stats:
      • Number of queries
      • Amount of GRT spent
  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
Edit page

Previous
Querying The Graph
Next
Querying Best Practices
Edit page