Rover API Key Commands
Create and manage API keys for your organization
Rover enables you to manage operator and subgraph API keys for your GraphOS organization. These API key types are used to authenticate with GraphOS and determine permissions for accessing graphs, subgraphs, and other resources for your organization. You can manage your organization's API keys with the rover api-key set of commands.
Creating API keys
api-key create
The api-key create command creates a new API key for your organization:
1rover api-key create <ORGANIZATION_ID> <TYPE> <KEY_NAME>The available key types are:
operator: Full access to the organizationsubgraph: Limited access to specific subgraphs
For subgraph keys, you can specify which subgraphs the key should have access to using a configuration file:
1rover api-key create <ORGANIZATION_ID> subgraph <KEY_NAME> --subgraph-config subgraph-config.yamlThe subgraph configuration file should be in YAML format:
1graph-id:
2 variant-name:
3 - subgraph-name-1
4 - subgraph-name-2You can also pipe the subgraph configuration from stdin:
1cat subgraph-config.yaml | rover api-key create <ORGANIZATION_ID> subgraph <KEY_NAME>Listing API keys
api-key list
The api-key list command lists all API keys for your organization:
1rover api-key list <ORGANIZATION_ID>This command displays all API keys with their details, including creation date, expiration date (if any), ID, and name.
Deleting API keys
api-key delete
The api-key delete command deletes an existing API key:
1rover api-key delete <ORGANIZATION_ID> <KEY_ID>Renaming API keys
api-key rename
The api-key rename command renames an existing API key:
1rover api-key rename <ORGANIZATION_ID> <KEY_ID> <NEW_KEY_NAME>Use this command to organize and identify your API keys more easily.