Lightwell Network API access

Use the Lightwell Network API to integrate Lightwell data into your build pipelines, audit workflows, and automation tooling. You can query information such as a list of repositories, a list of packages within a repository, or retrieve metadata for each package.

To use the Lightwell Network API, perform the following steps:

Fetch a bearer token for the Lightwell Network API

Use the credentials generated when you created a service account to fetch a bearer token to access the API. For more information, see Guidelines for how to use service accounts with services. Note
Request the token shortly before you access the Lightwell Network API. The token expires in approximately 15 minutes.

Lightwell Network API usage examples

The following examples show how to query the Lightwell Network API.
  • To list package versions across all Lightwell repositories, with the security level set to Remediated:
    curl 'https://console.redhat.com/api/content-sources/v1.0/lightwell/package_versions?security_level=remediated' -H "Authorization: Bearer $TOKEN”
  • To list security advisories for Lightwell remediated packages, filtered by security level:
    curl 'https://console.redhat.com/api/content-sources/v1.0/advisories?severity_min=Important' -H "Authorization: Bearer $TOKEN"
  • To retrieve metadata for a specific Python package by name and version:
    curl 'https://console.redhat.com/api/content-sources/v1.0/lightwell/repositories/e4f8a1b2-3c56-4d78-9e01-abcdef123456/python_packages/requests/2.31.0' -H "Authorization: Bearer $TOKEN"
    where:
    e4f8a1b2-3c56-4d78-9e01-abcdef123456
    Represents the repository UUID ({UUID}).
    requests
    Represents the Python package name ({name}).
    2.31.0
    Represents the package version ({version}).