# Manage Subgraphs and Endpoint Aliases

Source: https://docs.graphops.xyz/platform/cli/subgraphs

Look after your organization's Subgraphs from the terminal: see which Managed Subgraphs are synced,
give applications a stable query URL, and inspect any published Subgraph's schema. To deploy a
Subgraph and release new versions, see [Deploy your own Subgraph](/subgraphs/guides/deploy-your-subgraph)
and [Develop and release a Subgraph](/subgraphs/guides/develop-and-release).

## Manage Managed Subgraphs

* `graphops subgraphs list` lists your Managed Subgraphs with
their status, such as `Syncing (1200 blocks behind)` or `Suspended (credits exhausted)`, and
their promotion state, such as `Ready to promote`. Those being deleted appear only with `--all`.
* `graphops subgraphs status <name>` shows the Current and Next versions, and
`graphops subgraphs history <name>` every version, newest first.
* `graphops subgraphs rename <name> <new-name>` renames a Managed Subgraph.
* `graphops subgraphs target-type <name> --subgraph-id <id>` makes it follow a Graph Network
Subgraph ID, so new versions are staged and promoted for you. `--current-cid` stops following
and keeps the current Deployment CID.
* `graphops subgraphs delete <name> --confirm <name>` deletes it: indexing stops and so does its
billing. Cancel a staged upgrade with `graphops subgraphs unstage` and remove its
Endpoint Aliases first.

## Manage Endpoint Aliases

An Endpoint Alias keeps one query URL for your application while the version
behind it changes. [Endpoint Aliases](/subgraphs/endpoint-aliases)
explains what each target type serves and when it moves.

* `graphops subgraphs endpoint-aliases create <alias>` creates an Endpoint Alias for a Deployment
CID (`--cid`), a Managed Subgraph (`--managed-subgraph`) or a Graph Network
Subgraph ID (`--subgraph-id`). `--behavior` sets what it follows: `current` or `next` for a
Managed Subgraph, `latest-available` or `latest` for a Graph Network Subgraph ID.
* `graphops subgraphs endpoint-aliases create`, `show` and `list` print each alias's query URL, the
address your application queries, and name a Managed Subgraph target by its name.
* `graphops subgraphs endpoint-aliases retarget` points an alias at another target, and
`graphops subgraphs endpoint-aliases update` changes its behavior. Applications using the alias's
URL switch at once. `retarget` prints the old and new target. Both refuse to point an alias at a
Managed Subgraph version that is not yet synced and healthy, including a Next version for the
`next` behavior, unless you pass `--force`.
* `graphops subgraphs endpoint-aliases delete <alias> --confirm <alias>` deletes it, and its URL
stops working.

## Explore published Subgraphs

* `graphops subgraphs browse` pages through published Subgraphs; `--search` and `--network`
narrow them. Each row shows the Graph Network Subgraph ID and current Deployment CID.
* For a Graph Network Subgraph ID (`--subgraph-id`), a Deployment CID (`--cid`) or both,
`graphops subgraphs explore` summarizes the manifest, `schema` prints the GraphQL schema,
`entities` lists entities and their fields, `manifest` prints the manifest, and `metadata` shows
the network and start block.

[Developer workflow](/platform/cli/developer-workflow#explore-and-query-subgraphs) shows how to go
from a schema to a query with your stored key. [Identifier types](/subgraphs/concepts/identifier-types)
explains which identifier an application should query.

## Next steps

* [Deploy your own Subgraph](/subgraphs/guides/deploy-your-subgraph): Create a Managed Subgraph from your project.
* [Endpoint Aliases](/subgraphs/endpoint-aliases): Choose what an Endpoint Alias follows.
* [Check usage, credits and billing](/platform/cli/usage-and-billing): See what each Managed Subgraph and Endpoint Alias consumes.