CloudHub Docs
Download Documents

RTS


API

API calls follow the HTTP protocol. Domain is bayer-rts-console-api.cloudhub.vip. The data exchange format is JSON and all request/response body content is UTF-8 encoded.

stream

disable

The state of the stream is disabled

Url

https://bayer-rts-console-api.cloudhub.vip/stream/disable

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes
start_timeStart timeInt13NoTimestamp is 13 bits
eg : 1634196966
Note : If not written then the default is the current time
durationDurationIntNoNote :
1. Default is one day(86400), The minimum time cannot be less than one day, the maximum time is unlimited.
2. The length unit(m)

Returns

Return

{
    "code": "200",
    "message": "success"
}

enabled

The state of the stream is enabled

Url

https://bayer-rts-console-api.cloudhub.vip/stream/enabled

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes

Returns

Return

{
    "code": "200",
    "message": "success"
}

status

Gets the status of stream

Url

https://bayer-rts-console-api.cloudhub.vip/stream/status

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes

Returns

Return

{
    "data": {
        "id": "< stream_id > ",
        "stream_url": "< stream_url >",
        "status": "< ACTIVE/INACTIVE/FORBID >"
    }
}

Record

Start recording

Start recording

Url

https://bayer-rts-console-api.cloudhub.vip/record/start

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes

Returns

Return

{
    "code": "200",
    "message": "success"
}

Pause recording

Pause recording

Url

https://bayer-rts-console-api.cloudhub.vip/record/pause

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes

Returns

Return

{
    "code": "200",
    "message": "success"
}

Resume recording

Resume recording

Url

https://bayer-rts-console-api.cloudhub.vip/record/resume

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes

Returns

Return

{
    "code": "200",
    "message": "success"
}

Stop recording

Stop recording

Url

https://bayer-rts-console-api.cloudhub.vip/record/stop

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes

Returns

Return

{
    "code": "200",
    "message": "success"
}

get_record_list

Get a list of recordings

Url

https://bayer-rts-console-api.cloudhub.vip/record/get_record_list

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes
record_idRecord idStringNoGets the specified recording data
statusThe status of recordingStringNoParameter : ONGOING , COMPLETE , NOTRECORDED
pagePageIntNoDefault : 0, value: 1,2,3…
page_sizeThe amount of data per pageIntNoDefault : 15

Returns

Return

{
    "data": [
        {
            "record_id": "record id",
            "record_url": "record url",
            "start_at": "start time",
            "end_at": "end time",
            "pause_total_duration": "total duration of pause",
            "duration": "duration",
            "file_size": "file size",
            "status": "status : ONGOING/COMPLETE/NOTRECORDED"
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": {}
        }
    }
}

delete_record

Delete the record file

Url

https://bayer-rts-console-api.cloudhub.vip/record/delete_record

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes
record_idrecord idStringNoDelete the recording that specifies that the recording has been completed, or If not give a value, delete all recorded completed recordings under stream_url

Returns

Return

{
    "code": "200",
    "message": "success"
}

Mixing

start_mixing

Starts mixing

Url

https://bayer-rts-console-api.cloudhub.vip/stream/start_mixing

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYes

Returns

Return

{
    "code": "200",
    "message": "success"
}

set_mixing

Sets mixing

Url

https://bayer-rts-console-api.cloudhub.vip/stream/set_mixing

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
rts_app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYesStream url
mixing_config_strMixing configuration itemsjson/stringYesMixing configuration items

mixing_config_str eg

{
    "videoWidth": "Width (pixels) of the video, 
                        * If the mixed stream is an audio and video stream, videoWidth >= 64, 
                        * If the mixed stream is an audio stream, Set videoWidth and videoHeight to 0 (int)",
    "videoHeight": "Height (pixels) of the video, 
                        * If the mixed stream is an audio and video stream, videoHeight >= 64, 
                        * If the mixed stream is an audio stream, Set videoWidth and videoHeight to 0 (int)",
    "videoFrameRate": "Video frame rates (int)",
    "videoBandWidth": "Bitrate of video(KBPS), Maximum bandwidth 8M (int)",
    "backgroundColor": "background color of video. Default: 0x000000 , must be in hexadecimal format. 
                            The value ranges [0x000000, 0xffffff] (string)",
    "audioBandWidth": "Audio bitrate(KBPS),Maximum bandwidth 128 kbps (int)",
    "audioChannels": "Count of audio channels. The value ranges between 1 and 2. 1: mono, 2: dual (int)",
    "mixingSources": [{
        "streamUrl": "The url of the mixed source stream (string)",
        "x": "Horizontal position (pixel) of the video frame relative to the top left corner (int)",
        "y": "Vertical position (pixel) of the video frame relative to the top left corner (int)",
        "width": "Width (pixel) of the video frame (int)",
        "height": "Height (pixel) of the video frame (int)",
        "zOrder": "Layer position of the video frame. 
                        The value ranges between 0 and 100. 
                        A minimum value of 0 indicates that the image of the area is at the lowest level, 
                        and a maximum value of 100 indicates that the image of the area is at the topmost level (int)",
        "fit": "Video display mode. 
                    true:Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). 
                    Areas that are not filled due to disparity in the aspect ratio are filled with grey.
                    false:Uniformly scale the video until it fills the visible boundaries (cropped). 
                    One dimension of the video may have clipped contents. (int)"
    }] 
}

Returns

Return

{
    "code": "200",
    "message": "success"
}

stop_mixing

Stops mixing

Url

https://bayer-rts-console-api.cloudhub.vip/stream/stop_mixing

Parameter

ParameterDescriptionTypeLengthRequiredDefaultRemark
app_idAppIDStringYesView the AppID in the management system
stream_urlStream urlStringYesStream url

Returns

Return

{
    "code": "200",
    "message": "success"
}

status

http status Description

statusDescription
“200”Success
401Unauthorized
404The request url does not exist
422Request parameter or format is error
500Internal error

Status

http status 200 ,Get json structure as follows:

{
    "code": "200",
    "message": "success"
}

http status 401 ,Get json structure as follows:

{
    "message": "unauthorized",
    "status_code": 401,
}

http status 404 ,Get json structure as follows:

{
    "message": "404 Not Found",
    "status_code": 404,
}

http status 422 ,Get json structure as follows:

{
    "errors":{

    }
    "message": "The given data was invalid.",
    "status_code": 422,
}

http status 500 status 后,Get json structure as follows:

{
    "code":"500"
    "message": "internal error",
    "status_code": 500,
}