--- title: "updateSchemaRegistry" slug: "pub-data-stream-v1-schema-updateschemaregistry" updated: 2026-11-24T09:24:19Z published: 2026-11-24T09:24:19Z canonical: "api.ncloud-docs.com/pub-data-stream-v1-schema-updateschemaregistry" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # updateSchemaRegistry 이 가이드는 API 명세를 기반으로 자동 생성했습니다. VPC 환경에서 이용 가능합니다. Ncloud API 표준 규격을 적용한 API입니다. 토픽의 스키마 레지스트리 설정을 변경합니다. **유의사항** - 토픽이 삭제 진행 중(status DELETING)이면 400(InvalidState)을 반환합니다. - 등록된 스키마가 없는 토픽(schemaExists=false)에서 compatibilityEnabled를 현재와 다른 값으로 변경하면 409(ResourceNotReady)를 반환합니다. 스키마를 먼저 생성한 뒤 다시 요청해 주십시오. ## 요청 요청 형식을 설명합니다. 요청 형식은 다음과 같습니다. | 메서드 | URI | | --- | --- | | PATCH | /api/v1/topics/{topicId}/schema-registry | ### 요청 헤더 Data Stream API에서 공통으로 사용하는 헤더에 대한 정보는 [Data Stream 요청 헤더](/docs/pub-data-stream-v1-overview#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)를 참조해 주십시오. ### 요청 경로 파라미터 요청 경로 파라미터에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `topicId` | String | Required | 대상 토픽을 식별하는 고유 아이디 (형식에 맞지 않는 값은 없는 아이디와 같이 404(ResourceNotFound)로 처리) - 패턴: `^[0-9A-Za-z-]+$` - 길이: 10 ~ 10 - <예시> 52qLjAb1x9 | ### 요청 바디 요청 바디에 대한 설명은 다음과 같습니다. 요청 바디는 `application/merge-patch+json`, `application/json` 형식을 지원하며, `Content-Type` 헤더로 형식을 지정합니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `compatibilityEnabled` | Boolean | Optional | 스키마 호환성 검사 활성화 여부 (키를 생략하면 변경하지 않으며 null은 400(InvalidParameter)으로 거절) - `true` \| `false` - `true`: 새 스키마 등록 시 최신 스키마와의 하위 호환성(BACKWARD) 검사 - `false`: 검사하지 않음(NONE) - <예시> true | ### 요청 예시 요청 예시는 다음과 같습니다. ``` curl --location --request PATCH 'https://datastream.apigw.ntruss.com/api/v1/topics/52qLjAb1x9/schema-registry' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Content-Type: application/json' ``` ## 응답 응답 형식을 설명합니다. ### 응답 헤더 응답 헤더에 대한 설명은 다음과 같습니다. | 필드 | 필수 여부 | 설명 | | --- | --- | --- | | `accept-patch` | - | 서버가 지원하는 patch media type 목록 (415 응답) | Data Stream API에서 공통으로 사용하는 헤더에 대한 정보는 [Data Stream 응답 헤더](/docs/pub-data-stream-v1-overview#%EC%9D%91%EB%8B%B5%ED%97%A4%EB%8D%94)를 참조해 주십시오. ### 응답 바디 응답 바디에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `endpoint` | String | Required | 스키마 레지스트리 엔드포인트 URL (Confluent Schema Registry 호환 API, 환경에 따라 다름) - <예시> https://schema-registry.datastream.naverncp.com | | `compatibilityEnabled` | Boolean | Required | 스키마 호환성 검사 활성화 여부 - `true` \| `false` - `true`: 새 스키마 등록 시 최신 스키마와의 하위 호환성(BACKWARD) 검사 - `false`: 검사하지 않음(NONE) - <예시> true | | `schemaExists` | Boolean | Required | 토픽에 등록된 스키마 존재 여부 (true인 경우에만 호환성 설정을 변경할 수 있음) - `true` \| `false` - <예시> true | ### 응답 상태 코드 호출에 실패하면 [기본 오류 응답](/docs/type-error-response) 형식의 응답 바디를 반환하며, 오류 코드는 `error.errorCode` 값입니다. 응답 상태 코드에 대한 설명은 다음과 같습니다. | HTTP 상태 코드 | 코드 | 메시지 | 설명 | | --- | --- | --- | --- | | 200 | - | - | Ok | | 400 | `InvalidParameter` | `The specified parameter is invalid.` | 요청 파라미터나 본문의 값이 형식·범위 제약에 맞지 않는 경우. detail과 fieldErrors로 대상 필드를 확인해 수정 후 다시 요청 | | 400 | `InvalidState` | `The request cannot be processed in the current state.` | 대상 토픽이 삭제 진행 중(status DELETING)이거나 토픽이 속한 클러스터가 정상 상태가 아닌 경우. 삭제 진행 중인 토픽은 변경할 수 없음 | | 404 | `ResourceNotFound` | `The specified resource could not be found.` | 요청 경로의 토픽·스키마·커넥터가 없거나 삭제된 경우(삭제 처리 중(status DELETING)인 토픽의 스키마·스키마 레지스트리·커넥터 조회 포함). 목록을 조회해 아이디를 확인한 뒤 다시 요청 | | 409 | `ResourceNotReady` | `The resource is not ready.` | 등록된 스키마가 없는 토픽(schemaExists=false)에서 compatibilityEnabled를 현재와 다른 값으로 변경하려는 경우. 스키마를 먼저 생성한 뒤 다시 요청 | | 415 | `UnsupportedMediaType` | `The content type of the request body is not supported.` | 요청 본문의 Content-Type이 지원하는 patch media type이 아닌 경우. Accept-Patch 헤더에 안내된 media type으로 다시 요청 | 참고 Data Stream API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [Data Stream 응답 상태 코드](/docs/pub-data-stream-v1-overview#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)를 참조해 주십시오. ### 응답 예시 응답 예시는 다음과 같습니다. ``` { "endpoint": "https://schema-registry.datastream.naverncp.com", "compatibilityEnabled": true, "schemaExists": true } ```