API
API usage
How the Relic API is served, how to authenticate to it, and where it is described.
The web UI and the relic CLI use the Relic API. See Relic API for details and SDK for clients.
| Property | Value |
|---|---|
| Schema | protobuf, api/proto/relic/v1 |
| Protocols | Connect, gRPC-Web and gRPC under /api/; REST under /api/v1/ |
| File contents | plain HTTP under /api/v1/files/ |
| Reference | the API reference, from the OpenAPI description at /api/v1/openapi.json. The SBOM and end-of-life routes are in File contents. |
| From the CLI | relic api docs, relic api <path> |
Authentication
| Method | Usage |
|---|---|
| Basic | curl -u <user>:<password-or-token> https://relic.example.com/api/v1/repositories |
| Bearer | curl -H "Authorization: Bearer <token>" ... |
| Session cookie | the UI's cookie, under /api/ only. Writes need the X-Relic-UI header. |
Examples
List the repositories over REST:
curl -u <user>:<token> https://relic.example.com/api/v1/repositories
Get the item details the UI shows:
curl -u <user>:<token> https://relic.example.com/api/v1/repositories/libs-local/details/org/app/1.0/app-1.0.jar