--- title: "채널 스트림 전환" slug: "channel-stream-switch" updated: 2026-09-17T09:16:48Z published: 2026-09-17T09:16:48Z canonical: "api.ncloud-docs.com/channel-stream-switch" --- > ## 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. # 채널 스트림 전환 Classic/VPC 환경에서 이용 가능합니다. 라이브 채널의 메인 스트림과 백업 스트림 간 활성 송출을 전환합니다. 채널이 `PUBLISHING` 상태일 때만 전환할 수 있습니다. ## 요청 요청 형식을 설명합니다. 요청 형식은 다음과 같습니다. | 메서드 | URI | | --- | --- | | PUT | /api/v2/channels/{channelId}/switch-stream | ### 요청 헤더 Live Station API에서 공통으로 사용하는 헤더에 대한 정보는 [Live Station 요청 헤더](/docs/media-livestation#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)를 참조해 주십시오. ### 요청 경로 파라미터 요청 경로 파라미터에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `channelId` | String | Required | 채널 아이디 - [채널 목록 조회](/docs/media-livestation-channel-channellist) 참조 | ### 요청 예시 요청 예시는 다음과 같습니다. ``` curl --location --request PUT 'https://livestation.apigw.ntruss.com/api/v2/channels/ls-20250814******-zTwK2/switch-stream' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'x-ncp-region_code: KR' \ --header 'Content-Type: application/json' ``` ## 응답 응답 형식을 설명합니다. ### 응답 바디 응답 바디에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `content.channelId` | String | - | 채널 ID | | `content.channelName` | String | - | 채널 이름 | | `content.instanceNo` | Integer | - | 채널 인스턴스 번호 | | `content.qualitySetId` | Integer | - | 화질 설정 ID | | `content.qualitySetName` | String | - | 화질 설정 이름 | | `content.outputProtocol` | String | - | 출력 프로토콜 - `HLS` - `DASH` | | `content.channelStatus` | String | - | 채널 상태 - `PUBLISHING` / `STOPPED` 등 | | `content.isRecording` | Boolean | - | 녹화 여부 - `true`: 녹화 중 - `false`: 녹화 아님 | | `content.useDVR` | Boolean | - | DVR 사용 여부 - `true`: 사용 - `false`: 사용 안 함 | | `content.immediateOnAir` | Boolean | - | 즉시 OnAir 여부 - `true`: 즉시 - `false`: 수동 | | `content.timemachineMin` | Integer | - | 타임머신 허용 분 | | `content.cdn` | Object | - | CDN 정보 | | `content.cdn.instanceNo` | String | - | CDN Instance No | | `content.cdn.serviceName` | String | - | CDN 서비스명 | | `content.cdn.statusName` | String | - | CDN 상태 이름 | | `content.cdn.cdnType` | String | - | CDN 타입 - `GLOBAL_EDGE` | | `content.cdn.cdnDomain` | String | - | CDN 도메인 | | `content.streamKey` | String | - | 메인 스트림 키 | | `content.publishUrl` | String | - | 송출 RTMP URL | | `content.totalPublishSeconds` | Integer | - | 총 송출 시간 (초) | | `content.createdTime` | Long | - | 생성 시각 (epoch ms) | | `content.alertOn` | Boolean | - | 알람 여부 - `true` / `false` | | `content.recentPublishTime` | Long | - | 최근 송출 시각 (epoch ms) | | `content.alertOptions` | Object | - | 알람 옵션 | | `content.alertOptions.alertChangeStatus` | Boolean | - | 상태 변경 알람 | | `content.alertOptions.alertVodUploadFail` | Boolean | - | VOD 업로드 실패 알람 | | `content.alertOptions.alertReStreamFail` | Boolean | - | 재송출 실패 알람 | | `content.alertOptions.alertStreamFailOver` | Boolean | - | 스트림 Failover 알람 | | `content.callbackEndpoint` | String | - | 콜백 URL | | `content.envType` | String | - | 환경 타입 - `STAGE` - `PROD` | | `content.record` | Object | - | 녹화 설정 | | `content.record.type` | String | - | 녹화 타입 - `NO_RECORD` | | `content.record.bucketName` | String | - | 버킷명 | | `content.record.filePath` | String | - | 파일 경로 | | `content.record.format` | String | - | 녹화 파일 포맷 | | `content.record.accessControl` | String | - | 접근 제어 | | `content.origin` | Object | - | Origin 정보 | | `content.origin.originDomain` | String | - | Origin 도메인 | | `content.origin.originPath` | String | - | Origin 경로 | | `content.backupStreamKey` | String | - | 백업 스트림 키 | | `content.isStreamFailOver` | Boolean | - | Failover 여부 - `true` / `false` | | `content.snapshot` | Object | - | 스냅샷 정보 | | `content.snapshot.snapshotId` | Long | - | 스냅샷 ID | | `isPublishingBackUp` | Boolean | - | 백업 송출 소스 활성 여부 - `true` \| `false` - `true`: 백업 송출 활성 - `false`: 백업 송출 비활성 | ### 응답 상태 코드 Live Station API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [Live Station 응답 상태 코드](/docs/media-livestation#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)를 참조해 주십시오. ### 응답 예시 응답 예시는 다음과 같습니다. ``` { "content": { "channelId": "ls-20250904******-DZUmt", "channelName": "stream_switch_test", "instanceNo": 10******9, "qualitySetId": 5, "qualitySetName": "480p-set", "outputProtocol": "HLS,DASH", "channelStatus": "PUBLISHING", "isRecording": false, "useDVR": true, "immediateOnAir": false, "timemachineMin": 360, "cdn": { "instanceNo": "4006", "serviceName": "edge-ls-2023092******-WPYkK", "statusName": "RUNNING", "cdnType": "GLOBAL_EDGE", "cdnDomain": "*************.edge.naverncp.com" }, "streamKey": "ye*****************************7", "publishUrl": "rtmp://***********.video.media.ntruss.com:8080/relay", "globalPublishUrl": "", "totalPublishSeconds": 22936, "createdTime": 1756966010000, "alertOn": false, "recentPublishStartTime": 1764146744000, "alertOptions": { "alertChangeStatus": false, "alertVodUploadFail": false, "alertReStreamFail": false, "alertStreamFailOver": false }, "callbackEndpoint": "https://www.example.com", "envType": "REAL", "record": { "type": "MANUAL_UPLOAD", "accessControl": "PRIVATE" }, "origin": { "originDomain": "*****.video.media.ntruss.com", "originPath": "6*****3" }, "backupStreamKey": "ye*****************************7?backup=true", "isStreamFailOver": true, "isPublishingBackUp": true } } ```