Skip to content

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:

https://<your-host>/api/v2

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:

curl -H "x-api-key: YOUR_KEY" https://<your-host>/api/v2/account/authorization

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

  1. Create an API key, choose its scopes and publish it.
  2. Call GET /account/authorization to check that the key works.
  3. Pick the operations you need on the endpoint pages and try them in the interactive API documentation.

Further sources