REST API v2¶
TrustSource CE provides a REST API for programmatic access to projects, modules, scans, products, risks, reports and compliance data. Use it to automate your software supply chain work from CI/CD pipelines, release tooling and your own portals.
| Page | What it covers |
|---|---|
| Authentication | API keys, the x-api-key header, scopes. |
| Errors & Responses | HTTP status codes, error bodies, limits. |
| Endpoint Reference | Where to find the specification, and the endpoint pages. |
| Example: curl | End-to-end workflow via curl. |
| Public Routes | Release keys, CSAF feed keys and other routes without an API key. |
| API Structure | How the API is organised, base URL, limits. |
| Endpoint groups | One page per group of operations. |
Base URL and header¶
The API is served by your own installation, under the address you set in ROOT_URL:
The version belongs to the base URL only. Endpoint paths never contain it, for example /core/projects. Send your key in the x-api-key header:
Requests and responses are JSON unless an endpoint says otherwise. CORS is enabled (Access-Control-Allow-Origin: *).
Note
The app itself speaks plain HTTP on port 3000. Put a TLS reverse proxy in front of it before you call the API from other machines. See HTTPS and reverse proxy.
Start here¶
- Create an API key, choose its scopes and publish it.
- Call
GET /account/authorizationto check that the key works. - Pick the operations you need on the endpoint pages and try them in the interactive API documentation.
Further sources¶
- API Structure - the building blocks of the API.
- API keys, Release keys and CSAF feed keys - manage your keys.
- API scopes - which scope may call which operation.
- Recipe: CI/CD integration - scan from GitHub Actions.