チャンネルの作成
    • PDF

    チャンネルの作成

    • PDF

    Article Summary

    Live Stationの Re-Streamチャンネルを作成する APIです。作成した Re-Streamチャンネルを照会するためのチャンネルリスト照会の APIチャンネル情報照会の APIを提供します。

    リクエスト

    POST https://livestation.apigw.ntruss.com/api/v2/re-stream/channels
    

    リクエストヘッダ

    ヘッダ名必須有無説明
    x-ncp-apigw-timestampYES1970年1月1日00:00:00協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表し、API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとみなす
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyYESNAVERクラウドプラットフォームポータルから発行された Access Key ID値
    x-ncp-iam-access-key:{Sub Account Access Key}
    x-ncp-apigw-signature-v2YESAccess Key ID値と Secret Keyで暗号化した署名
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeYESRequest body content typeを application/jsonに指定
    Content-Type: application/json
    x-ncp-region_codeYESリージョンコード(KR)

    リクエストボディ

    フィールド名必須有無タイプ制限事項説明
    channelNameYesString最低3文字以上、最大20文字まで入力可能。記号の「_」を許可作成するチャンネル名
    envTypeOptionalStringDEV, STAGE, REAL作成するチャンネルの使用区分のための設定です。入力しない場合は REALに設定
    planTypeYesStringSTANDARD, PROFESSIONAL
    restreamYesObject[]
    restream[].targetNameYesStringYOUTUBE, CHZZK, STEAM, YOUNOW, USTREAM, AFREECATV, PRISM, CUSTOMre-streamするプラットフォーム名
    restream[].rtmpUrlYesString
    restream[].streamKeyYesString
    restream[].idNoStringRTMP認証 ID
    restream[].passwordNoStringRTMP認証 Password

    レスポンス

    フィールド名タイプ説明備考
    channelIdString
    channelNameString
    envTypeStringDEV, STAGE, REAL
    instanceNoInteger
    channelStatusStringCREATING, READY, PUBLISH, DELETED, BLOCK, FORCE_BLOCK, FORCE_DELETED
    createdTimeInteger
    streamKeyString
    publishUrlString
    globalPublishUrlString海外配信対応のための URL
    planTypeStringSTANDARD, PROFESSIONAL
    restreamObject[]
    restream[].targetNameString
    restream[].rtmpUrlString
    restream[].streamKeyString
    restream[].idString
    restream[].passwordString
    platformCountInteger
    totalPublishSecondsInteger
    alertOnBoolean
    isPublishingBoolean

    リクエスト例

    POST /api/v2/re-stream/channels
    HOST: livestation.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp:1521787414578
    x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
    x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
    x-ncp-region_code:KR
    
    {
       "channelName":"myrestream",
       "planType":"STANDARD",
       "restream":[
          {
             "targetName":"YOUTUBE",
             "rtmpUrl":"rtmp://notworking-just-testcase.only"
          },
          {
             "targetName":"TWITCH",
             "rtmpUrl":"rtmp://notworking-just-testcase.only",
             "streamKey":"12345",
             "id":"itisid",
             "password":"itispassword"
          }
       ]
    }
    

    レスポンス例

    HTTP/1.1 200 OK
    Server: nginx
    Date: Mon, 2 Mar 2021 09:53:32 GMT
    Content-Type: application/json;charset=utf-8
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
    
    {
       "content":{     
          "channelId":"ls-20200327014626-Nh91v",
          "channelName":"myrestream",
          "instanceNo":1168812,
          "channelStatus":"READY",
          "createdTime":1585241186000,
          "streamKey":"7hdxzm1d1234du3qs",
          "publishUrl":"rtmp://live-station-rtmp-url",
          "globalPublishUrl": "rtmp://live-station-global-rtmp-url",
          "planType":"STANDARD",
          "restream":[        
             {
                "targetName":"YOUTUBE",
                "rtmpUrl":"rtmp://notworking-just-testcase.only"
             },
             {
                "targetName":"TWITCH",
                "rtmpUrl":"rtmp://notworking-just-testcase.only",
                "streamKey":"12345",
                "id":"itisid",
                "password":"itispassword"
             }
          ],
          "platformCount":2,
          "totalPublishSeconds":0,
          "alertOn":false,
          "isPublishing":false,
          "envType": "REAL"
       }
    }
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.