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

# 設定を更新

> 可視性・メンテナンス・ソースロケールを切替。いつでも完全に可逆。

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

Authentication: API key required (`Authorization: Bearer <API Key>`). App author only; others get `404`.

App-level, reversible ops state orthogonal to lifecycle — adjustable any time:

* `scope`: `public` market-visible / `private` author only / `shared` grant list (maintain the list via the grant endpoints).
* `accepting_runs`: maintenance switch. `false` means under maintenance; new runs from others are rejected (`403 app-not-accepting-runs`, `message` carries `pause_message`). Existing runs, purchased data, and market visibility are unaffected; author self-tests are unrestricted. Flip back to `true` after upstream recovery — no lifecycle change required.
* `source_locale`: language of the manifest text (for example `zh-CN` / `en-US`). Unset uses the deployment default. Translations for other languages layer on top of this source. If the new source locale already has a translation, the response includes a `translation-shadowed-by-source` warning and does not auto-delete it.

Apps with zero Releases can also be updated.

## Request

### Path parameters

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

### Request body

<ParamField body="scope" type="enum">
  Visibility scope: `public` / `private` / `shared`.

  Allowed values: `public` / `private` / `shared`.
</ParamField>

<ParamField body="accepting_runs" type="boolean">
  Whether to accept new runs from others.
</ParamField>

<ParamField body="pause_message" type="string">
  Message shown to callers while under maintenance.
</ParamField>

<ParamField body="source_locale" type="string">
  Source locale code of the manifest.
</ParamField>

### Example request

```bash theme={null}
curl -X PATCH \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"accepting_runs": false, "pause_message": "Upstream API under maintenance; expected back at 18:00"}' \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/settings"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "scope": "private",
    "accepting_runs": true,
    "pause_message": null,
    "source_locale": "zh-CN",
    "warnings": []
  }
}
```

The payload is wrapped in `data`. Fields:

<ResponseField name="scope" type="string" required>
  Current visibility scope.
</ResponseField>

<ResponseField name="accepting_runs" type="boolean" required>
  Current maintenance switch.
</ResponseField>

<ResponseField name="pause_message" type="string">
  Current maintenance message.
</ResponseField>

<ResponseField name="source_locale" type="string" required>
  Current source locale.
</ResponseField>

<ResponseField name="warnings" type="object[]">
  Structured warnings.

  <Expandable title="fields">
    <ResponseField name="code" type="string" required>
      —
    </ResponseField>

    <ResponseField name="params" type="object">
      —
    </ResponseField>
  </Expandable>
</ResponseField>

### Errors

| HTTP | `code`         | `category`  | Description                 |
| ---- | -------------- | ----------- | --------------------------- |
| 401  | `unauthorized` | `forbidden` | Missing or invalid API key. |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/jp/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

The Python and JavaScript SDKs do not wrap this endpoint yet. Call REST directly.
