> ## 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.

# Data App を公開

> api 型 App のワンショット公開糖衣。契約インポート導線が後継。

<Warning>
  **非推奨。** 提出はポータルの契約インポートウィザード（assemble-contract エンドポイント基盤）へ。新規はそちらを。
</Warning>

**`POST`** `https://api-datahub.octoparse.com/v1/data-apps`

認証：APIキー必須（`Authorization: Bearer <API Key>`）。

api 型（宣言的）App 向けワンショット公開糖衣: 内部は識別子作成 → ワークスペース保存 → Build 作成 → Release 作成の原子チェーン。

**バージョンは公開アクションが決める**: 既定では現在の最大版の patch が +1（初回は `0.1.0`）。提出物にバージョン番号は不要・不可（テンプレや手付けの stale 値を避ける）。

名前空間は認証から推定: マニフェストの `identity.app_name` は App 名のみ。App は発行者自身の（user, app name）配下に載る。`app_id` は一度発行され、ユーザー名や App 名の変更後も生き残る。

## リクエスト

### リクエスト body

<ParamField body="manifest" type="string" required>
  生マニフェストテキスト。
</ParamField>

<ParamField body="files" type="object">
  Attached files.
</ParamField>

<ParamField body="secrets" type="object">
  シークレット名→平文のマップ。
</ParamField>

### リクエスト例

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"manifest": "spec_version: \"0.2\"\n…", "secrets": {"EXAMPLE_API_KEY": "sk-example"}}' \
  "https://api-datahub.octoparse.com/v1/data-apps"
```

## レスポンス

### 200 成功

```json theme={null}
{
  "data": {
    "app_id": "app_6dfe4e839ccf",
    "namespace": "carol",
    "app_name": "reviews-query",
    "version": "0.1.0",
    "build_id": "bld_a583f440a0ab",
    "published_at": "2026-09-15T08:00:00+00:00"
  }
}
```

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

<ResponseField name="app_name" type="string" required>
  App 名。
</ResponseField>

<ResponseField name="namespace" type="string">
  発行者ユーザー名。
</ResponseField>

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

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

<ResponseField name="card" type="object" required>
  —
</ResponseField>

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

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

### エラー

| HTTP | `code`              | `category`      | Description                                       |
| ---- | ------------------- | --------------- | ------------------------------------------------- |
| 401  | `unauthorized`      | `forbidden`     | API キー欠落または無効。                                    |
| 422  | `invalid-manifest`  | `invalid_input` | マニフェスト検証失敗。`issues[]` に問題一覧。                      |
| 400  | `username-required` | `invalid_input` | アカウントにまだユーザー名がなく `<username>/<app_name>` を構成できない。 |
| 409  | `app-name-reserved` | `forbidden`     | 他者の履歴バインドが名前を保持（ユーザー名移管後 30 日凍結）。                 |
| 400  | `invalid-app-name`  | `invalid_input` | Name fails naming rules or is a reserved word.    |

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

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

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