Overview
Thedevgraph-api block defines API routes for a service. Routes are associated with a parent service defined by devgraph-service.
Syntax
Fields
| Field | Required | Description |
|---|---|---|
service | Yes | Name of the parent service |
routes | Yes | Object mapping routes to descriptions |
Route Format
Routes are defined asMETHOD /path: description:
Supported Methods
GETPOSTPUTPATCHDELETE
Path Parameters
Use:param syntax for path parameters:
Examples
REST API
Multiple API blocks
You can split routes across multiple blocks:Generated Output
API routes appear in:graph.jsonunder the service’sapifieldsummary.mdin the routes tableagents/{service}.mdcontext file