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

인증: API 키 필요(`Authorization: Bearer <API Key>`). App 작성자만. 그 외 `404`.

App 단위의 되돌릴 수 있는 운영 상태로, 수명 주기와 독립적이며 언제든 조정할 수 있습니다:

* `scope`: `public`은 마켓에 표시, `private`은 작성자만, `shared`는 grant 목록(목록은 grant 엔드포인트로 관리).
* `accepting_runs`: 유지보수 스위치. `false`는 유지보수 중을 뜻하며, 다른 사용자의 새 실행은 거부됩니다(`403 app-not-accepting-runs`, `message`에 `pause_message`가 들어감). 기존 실행, 구매한 데이터, 마켓 노출에는 영향이 없으며 작성자의 자체 테스트도 제한되지 않습니다. 업스트림이 복구되면 `true`로 되돌리면 되고 수명 주기 변경은 필요 없습니다.
* `source_locale`: 매니페스트 텍스트의 언어(예: `zh-CN` / `en-US`). 설정하지 않으면 배포 기본값을 사용합니다. 다른 언어의 번역은 이 원본 위에 덧씌워집니다. 새 원본 로캘에 이미 번역이 있으면 응답에 `translation-shadowed-by-source` 경고가 포함되며 번역은 자동으로 삭제되지 않습니다.

Release가 0개인 App도 업데이트할 수 있습니다.

## 요청

### 경로 파라미터

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

### 요청 body

<ParamField body="scope" type="enum">
  공개 범위: `public` / `private` / `shared`.

  허용 값: `public` / `private` / `shared`.
</ParamField>

<ParamField body="accepting_runs" type="boolean">
  다른 사용자의 새 실행을 받을지 여부.
</ParamField>

<ParamField body="pause_message" type="string">
  유지보수 중 호출자에게 표시할 메시지.
</ParamField>

<ParamField body="source_locale" type="string">
  매니페스트의 원본 로캘 코드.
</ParamField>

### 요청 예시

```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"
```

## 응답

### 200 성공

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

페이로드는 `data`로 감쌉니다. 필드:

<ResponseField name="scope" type="string" required>
  현재 공개 범위.
</ResponseField>

<ResponseField name="accepting_runs" type="boolean" required>
  현재 유지보수 스위치.
</ResponseField>

<ResponseField name="pause_message" type="string">
  현재 유지보수 메시지.
</ResponseField>

<ResponseField name="source_locale" type="string" required>
  현재 원본 로캘.
</ResponseField>

<ResponseField name="warnings" type="object[]">
  구조화된 경고.

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

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

### 오류

| HTTP | `code`         | `category`  | 설명              |
| ---- | -------------- | ----------- | --------------- |
| 401  | `unauthorized` | `forbidden` | API 키 누락 또는 무효. |

오류 응답은 `{"error": {code, category, message, retryable}}`입니다. <a href="/docs/ko/datahub/api/reference/introduction#errors">오류</a> 참고.

## 클라이언트 라이브러리

Python / JavaScript SDK는 아직 이 엔드포인트를 감싸지 않습니다. REST를 직접 호출하세요.
