# ソフトウェア部品表 (SBOM) 用の REST API エンドポイント

REST API を使って、リポジトリのソフトウェア部品表 (SBOM) をエクスポートします。

リポジトリへの読み取りアクセス権が少なくともある場合は、 GitHub UI または GitHub REST API を使用して、リポジトリの依存関係グラフを SPDX 互換のソフトウェア部品表 (SBOM) としてエクスポートできます。 詳しくは、「[リポジトリのソフトウェア部品表のエクスポート](/ja/enterprise-server@3.22/code-security/how-tos/secure-your-supply-chain/establish-provenance-and-integrity/export-dependencies-as-sbom)」をご覧ください。

この記事では、REST API エンドポイントの詳細について説明します。

> \[!NOTE]
> GitHub Enterprise Server では、依存関係のライセンス情報は取得されず、あるリポジトリに依存する依存アイテム、リポジトリ、パッケージに関する情報は計算されません。 応答の中では、これらのフィールドは空欄です。

> \[!NOTE]
> 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.

## Export a software bill of materials (SBOM) for a repository.

```
GET /repos/{owner}/{repo}/dependency-graph/sbom
```

Exports the software bill of materials (SBOM) for a repository in SPDX JSON format.

### Parameters

#### Headers

* **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

* **`owner`** (string) (required)
  The account owner of the repository. The name is not case sensitive.

* **`repo`** (string) (required)
  The name of the repository without the .git extension. The name is not case sensitive.

### HTTP response status codes

* **200** - OK

* **403** - Forbidden

* **404** - Resource not found

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X GET \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/dependency-graph/sbom
```

**Response schema (Status: 200):**

* `sbom`: required, object:
  * `SPDXID`: required, string
  * `spdxVersion`: required, string
  * `comment`: string
  * `creationInfo`: required, object:
    * `created`: required, string
    * `creators`: required, array of string
  * `name`: required, string
  * `dataLicense`: required, string
  * `documentNamespace`: required, string
  * `packages`: required, array of objects:
    * `SPDXID`: string
    * `name`: string
    * `versionInfo`: string
    * `downloadLocation`: string
    * `filesAnalyzed`: boolean
    * `licenseConcluded`: string
    * `licenseDeclared`: string
    * `supplier`: string
    * `copyrightText`: string
    * `externalRefs`: array of objects:
      * `referenceCategory`: required, string
      * `referenceLocator`: required, string
      * `referenceType`: required, string
  * `relationships`: array of objects:
    * `relationshipType`: string
    * `spdxElementId`: string
    * `relatedSpdxElement`: string