---
title: "Get SBOM for an environment"
method: POST
path: "/api/v1/catalog/sbom/environment"
tags: ["sbom"]
---

# Get SBOM for an environment

`POST /api/v1/catalog/sbom/environment`

Get SBOM (Software Bill of Materials) for an environment.

Args:
    body: Request body containing lockfile and environment metadata
    format: SBOM format (defaults to SbomFormat.SPDX_2_3_JSON)
    user: Authenticated user context
    cache: Request-scoped dependency cache (injected)

Returns:
    SBOM document in the requested format

Raises:
    HTTPException: If lockfile is malformed, system is invalid, or SBOM generation fails

## Query parameters

- `format` 'spdx-2.3-json' — Supported SBOM format types.

## Request body

- EnvironmentSbomRequest — Request body for environment SBOM endpoint. The environment SBOM endpoint generates a Software Bill of Materials for a Flox environment by analyzing its lockfile and dependencies. Attributes: lockfile: The environment's lockfile dictionary (v0 or v1 format) system: Target system architecture (e.g., "x86_64-linux", "aarch64-darwin") environment_name: Name of the environment (for informational purposes in SBOM) environment_owner: Owner of the environment (for informational purposes in SBOM) generation: Optional generation number (for informational purposes in SBOM)
  - `lockfile` object, required
  - `system` 'aarch64-darwin' | 'aarch64-linux' | 'x86_64-darwin' | 'x86_64-linux' | 'invalid', required
  - `environment_name` string, required
  - `environment_owner` string, required
  - `generation` integer, nullable

## Response `200`

SBOM for the given environment

- object

## Other responses

- `422` — The request could not be processed

---

[API](https://skmtc.net/flox/apis/floxhub-catalog-server.md) · [All operations](https://skmtc.net/flox/apis/floxhub-catalog-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flox/floxhub-catalog-server/versions/05d6283fc201/schema)
