Managing Channels

리모트몬스터는 채널 관리를 위한 서버용 API를 제공합니다. 이 API는 채널 검색, 채널 강제 종료 기능을 제공합니다. 서버용 API는 앱용(클라이언트용) API와 달리 비디오/오디오를 전송할 수 없습니다.

※ 주의 사항

타인의 Service ID, Secret Key를 무단으로 이용하면 처벌을 받을 수 있습니다. (정보통신망 이용 촉진 및 정보보호에 관한 법률, 통신비밀보호법, 형법 등에 의거)

타인의 Service ID, Secret Key를 무단으로 이용하면 업무 방해에 대한 피해를 보상해야합니다. (민법 등에 의거)

Service ID, Secret Key 확인

리모트몬스터 웹 콘솔의 Project Information 메뉴에서 Service ID, Secret Key를 확인할 수 있습니다. Secret Key는 ************** 이 아닙니다. 우측 눈 아이콘을 누르면 표시됩니다.

채널 검색

https://consoleapi.remotemonster.com/v1/search

POST https://signal.remotemonster.com/lambda/broadcast-channel-list

기간과 채널 이름 조건에 따라 채널을 검색합니다. 새로 생성된 채널이 검색되려면 다소 시간이 걸릴 수 있습니다. 새로 생성된 채널을 확인하려면 앱으로부터 채널 정보를 받는 것이 좋습니다. 앱은 SDK의 onCreate, onComplete 콜백 함수를 이용하여 채널 ID를 확인할 수 있습니다.

Headers

NameTypeDescription

Content-type

string

application/json

Request Body

NameTypeDescription

serviceId

string

Service ID

secret

string

Secret Key

keyword

string

채널 ID가 포함할 문자열

starttime

integer

조회할 기간, Unix time, 초단위

endtime

integer

조회할 기간, Unix time, 초단위

{
  "startTime": 1577862148,
  "currentTime": 1580454148,
  "totalCount": 1,
  "items": [
    {
      "chid": "20200110",
      "createTime": 1580281515,
      "endTime": 1580281577,
      "peerCount": 2
    }
  ]
}

예시

curl -X POST https://consoleapi.remotemonster.com/v1/search \
-H 'Content-type: application/json' \
-d '
{
  "serviceId": "my-service-id",
  "secret":"my-secret",
  "keyword" : "",
  "starttime": 1581315000,
  "endtime": 1581315900
}
'

방송 중인 채널 조회

https://signal.remotemonster.com/lambda/broadcast-channel-list

POST https://signal.remotemonster.com/lambda/broadcast-channel-list

방송 중인 채널을 조회합니다. 종료된 방송 채널은 조회되지 않습니다.

Headers

NameTypeDescription

Content-type

string

application/json

Request Body

NameTypeDescription

serviceId

string

Service ID

secret

string

Secret Key

[
  {
    "id": "1581324488053_Dc5aQ",
    "serviceId": "my-service-id",
    "createTime": "2020-02-10T08:48:09.828Z",
    "numOfWatchers": 0
  },
  {
    "id": "1581324445005_s1c9g",
    "serviceId": "my-service-id",
    "createTime": "2020-02-10T08:47:27.011Z",
    "numOfWatchers": 0
  }
]

예시

curl -X POST 'https://signal.remotemonster.com/lambda/broadcast-channel-list' \
-H 'Content-type: application/json' \
-d '{"serviceId":"my-service-id","secret":"my-secret-key"}'

채널 강제 종료

https://signal.remotemonster.com/lambda/channel-force-termination

POST https://signal.remotemonster.com/lambda/channel-force-termination

채널을 강제로 종료합니다.

Headers

NameTypeDescription

Content-type

string

application/json

Request Body

NameTypeDescription

serviceId

string

Service ID

secret

string

Secret Key

channelId

string

종료할 채널 ID

{
  "send": true
}

예시

curl -X POST https://signal.remotemonster.com/lambda/channel-force-termination \
-H 'Content-type: application/json' \
-d '{"serviceId":"my-service-id", "secret":"my-secret-key", "channelId":"the-channel-id"}'

Last updated