Skip to content

Commit 4464ddc

Browse files
committed
docs: update routes to use table
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent 9f8c1fb commit 4464ddc

File tree

1 file changed

+43
-17
lines changed

1 file changed

+43
-17
lines changed

docs/Routes.md

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
11
# Routes
22

3-
Current routes exposed by Subgraph Service:
4-
- `/`: greetings message
5-
- `/info`: the operator public address
6-
- `/version`: current indexer-service-rs version and dependencies
7-
- `/escrow` *(token required)*: quick endpoint that routes
8-
queries to escrow subgraph.
9-
- `/network` *(token required)*: quick endpoint that routes
10-
queries to network subgraph.
11-
- `/dips`: Dips GraphQL API
12-
- `/subgraph/health/:id`: get health state for a given subgraph
13-
- `/subgraphs/id/:id` *(receipt/token required)*: Route a query
14-
to a subgraph
15-
- `/cost`: Cost Model GraphQL API
16-
- `/status`: Routes graph-node status API
17-
18-
In case this documentation is outdated, you can check a list of
19-
all routes in the [end of this file](./crates/service/src/service/router.rs).
3+
This section lists the routes currently exposed by the Subgraph Service. Each route includes a brief description of its purpose and any requirements (e.g., tokens) for access.
4+
5+
## Public Routes
6+
7+
| Route | Description |
8+
|-------------------------|----------------------------------------------------------------------------------------------|
9+
| `/` | Returns a simple greetings message. |
10+
| `/info` | Displays the operator's public address. |
11+
| `/version` | Provides the current version of `indexer-service-rs` and its dependencies. |
12+
13+
## Token-Protected Routes
14+
15+
| Route | Description |
16+
|-------------------------|----------------------------------------------------------------------------------------------|
17+
| `/escrow` | Routes queries to the escrow subgraph. Requires a valid token. |
18+
| `/network` | Routes queries to the network subgraph. Requires a valid token. |
19+
20+
## GraphQL API Routes
21+
22+
| Route | Description |
23+
|-------------------------|----------------------------------------------------------------------------------------------|
24+
| `/dips` | Provides access to the Dips GraphQL API. |
25+
| `/cost` | Provides access to the Cost Model GraphQL API. |
26+
27+
## Subgraph Routes
28+
29+
| Route | Description |
30+
|--------------------------------------|----------------------------------------------------------------------------------------------|
31+
| `/subgraph/health/:id` | Retrieves the health state of a specified subgraph using its ID. |
32+
| `/subgraphs/id/:id` | Routes a query to a specific subgraph using its ID. Requires a receipt or valid token. |
33+
34+
## Node Status Route
35+
36+
| Route | Description |
37+
|-------------------------|----------------------------------------------------------------------------------------------|
38+
| `/status` | Routes requests to the graph-node status API. |
39+
40+
---
41+
42+
## Note
43+
44+
If this documentation is outdated or incomplete, you can view the complete and up-to-date list of routes in the source code:
45+
[Service Router Implementation](./crates/service/src/service/router.rs)

0 commit comments

Comments
 (0)