> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Release を作成

> ready Build を正式バージョンへ昇格。バージョン番号はこの時点で確定。

**`POST`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/releases`

認証：APIキー必須（`Authorization: Bearer <API Key>`）。App 作者のみ。他者は `404`。

指定の ready Build を正式バージョンへ昇格。**バージョン番号はここで確定**: 既定は現在の最大版の patch を +1。明示的により高い版も可。

前提: Build が存在し ready。スナップショットを検証パイプライン再実行（Build 生存中に仕様が進化していることあり）。`expected_revision` 指定時はワークスペースが一致。対象バージョンが未存在。App が非推奨でないこと。

## リクエスト

### パスパラメータ

<ParamField path="app_id" type="string" required>
  App reference.
</ParamField>

### リクエスト body

<ParamField body="build_id" type="string" required>
  公開する Build id。ready 必須。
</ParamField>

<ParamField body="version" type="string">
  明示的な 3 セグメント版。省略時は patch を +1。
</ParamField>

<ParamField body="expected_revision" type="integer">
  期待する現下書きリビジョン。不一致は `409`。
</ParamField>

### リクエスト例

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"build_id": "bld_a583f440a0ab", "version": "1.2.0"}' \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/releases"
```

## レスポンス

### 200 成功

```json theme={null}
{
  "data": {
    "version": "1.2.0",
    "build_id": "bld_a583f440a0ab",
    "published_at": "2026-09-15T08:00:00+00:00",
    "latest": true
  }
}
```

ペイロードは `data` に包まれます。フィールド:

<ResponseField name="app_name" type="string" required>
  —
</ResponseField>

<ResponseField name="namespace" type="string">
  —
</ResponseField>

<ResponseField name="version" type="string" required>
  公開バージョン番号。
</ResponseField>

<ResponseField name="build_id" type="string" required>
  対応する Build。
</ResponseField>

<ResponseField name="published_at" type="string">
  Publish time.
</ResponseField>

<ResponseField name="missing_secrets" type="string[]">
  —
</ResponseField>

### エラー

| HTTP | `code`              | `category`      | Description                                     |
| ---- | ------------------- | --------------- | ----------------------------------------------- |
| 401  | `unauthorized`      | `forbidden`     | API キー欠落または無効。                                  |
| 404  | `build-not-found`   | `not_found`     | Build スナップショットが存在しない。                           |
| 409  | `build-not-ready`   | `invalid_input` | Build がまだ ready でない（building または failed）ため公開不可。 |
| 422  | `invalid-manifest`  | `invalid_input` | マニフェスト検証失敗。`issues[]` に問題一覧。                    |
| 409  | `revision-conflict` | `invalid_input` | `expected_revision` が現下書きリビジョンと一致しない — 同時編集。    |

エラー応答は `{"error": {code, category, message, retryable}}` です。<a href="/docs/jp/datahub/api/reference/introduction#errors">エラー</a> を参照。

## クライアントライブラリ

Python / JavaScript SDK はまだこのエンドポイントをラップしていません。REST を直接呼び出してください。
