{"meta":{"title":"REST-API-Endpunkte für Software-Stückliste (SBOM)","intro":"Verwende die REST-API, um die Software-Stückliste (SBOM) für ein Repository zu exportieren.","product":"REST-API","breadcrumbs":[{"href":"/de/rest","title":"REST-API"},{"href":"/de/rest/dependency-graph","title":"Abhängigkeitsdiagramm"},{"href":"/de/rest/dependency-graph/sboms","title":"Software-Stückliste (Software Bill of Materials, SBOM)"}],"documentType":"article"},"body":"# REST-API-Endpunkte für Software-Stückliste (SBOM)\n\nVerwende die REST-API, um die Software-Stückliste (SBOM) für ein Repository zu exportieren.\n\nWenn Sie mindestens Lesezugriff auf das Repository haben, können Sie das Abhängigkeitsdiagramm für das Repository als SPDX-kompatible Software Bill of Materials (SBOM) über die GitHub Benutzeroberfläche oder die GitHub REST-API exportieren. Weitere Informationen finden Sie unter [Exportieren einer Software-Stückliste (Software Bill of Materials, SBOM) für dein Repository](/de/code-security/how-tos/secure-your-supply-chain/establish-provenance-and-integrity/export-dependencies-as-sbom).\n\nDieser Artikel enthält Details zum REST-API-Endpunkt.\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## Export a software bill of materials (SBOM) for a repository.\n\n```\nGET /repos/{owner}/{repo}/dependency-graph/sbom\n```\n\nWarning\n\nClosing down notice: This operation is closing down and will not be accessible after November 13, 2026. Please migrate to the asynchronous flow. Use \"Request generation of a software bill of materials (SBOM) for a repository\" to trigger the report, then \"Fetch a software bill of materials (SBOM) for a repository\" to retrieve it. For more information, see the changelog.\n\nExports the software bill of materials (SBOM) for a repository in SPDX JSON format.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/dependency-graph/sbom\n```\n\n**Response schema (Status: 200):**\n\n* `sbom`: required, object:\n  * `SPDXID`: required, string\n  * `spdxVersion`: required, string\n  * `comment`: string\n  * `creationInfo`: required, object:\n    * `created`: required, string\n    * `creators`: required, array of string\n  * `name`: required, string\n  * `dataLicense`: required, string\n  * `documentNamespace`: required, string\n  * `packages`: required, array of objects:\n    * `SPDXID`: string\n    * `name`: string\n    * `versionInfo`: string\n    * `downloadLocation`: string\n    * `filesAnalyzed`: boolean\n    * `licenseConcluded`: string\n    * `licenseDeclared`: string\n    * `supplier`: string\n    * `copyrightText`: string\n    * `externalRefs`: array of objects:\n      * `referenceCategory`: required, string\n      * `referenceLocator`: required, string\n      * `referenceType`: required, string\n  * `relationships`: array of objects:\n    * `relationshipType`: string\n    * `spdxElementId`: string\n    * `relatedSpdxElement`: string\n\n## Fetch a software bill of materials (SBOM) for a repository.\n\n```\nGET /repos/{owner}/{repo}/dependency-graph/sbom/fetch-report/{sbom_uuid}\n```\n\nFetches a previously generated software bill of materials (SBOM) for a repository.\nWhen the SBOM is ready, the response is a 302 redirect to a temporary download URL for the SBOM in SPDX JSON format.\nThe generated SBOM report may be retained for up to one week from the original request.\nThe temporary download URL returned by this endpoint expires separately, and its expiry is set when the fetch request is made.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`sbom_uuid`** (string) (required)\n  The unique identifier of the SBOM export.\n\n### HTTP response status codes\n\n* **202** - SBOM is still being processed, no content is returned.\n\n* **302** - Redirects to a temporary download URL for the completed SBOM.\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/dependency-graph/sbom/fetch-report/SBOM_UUID\n```\n\n**Response schema (Status: 202):**\n\n## Request generation of a software bill of materials (SBOM) for a repository.\n\n```\nGET /repos/{owner}/{repo}/dependency-graph/sbom/generate-report\n```\n\nTriggers a job to generate a software bill of materials (SBOM) for a repository in SPDX JSON format.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/dependency-graph/sbom/generate-report\n```\n\n**Response schema (Status: 201):**\n\n* `sbom_url`: string"}