Querying Recording Templates

Function

This API is an out-of-date version and may not be maintained in the future. Live will provide you with new APIs. You can use the new recording function on the Live console. For details, see Recording Live Video to OBS.

This API is used to query recording templates.

URI

GET /v1/{project_id}/record/config

Request Parameters

Parameter

Type

Description

Mandatory

domain

String

Streaming domain name

Yes

app_name

String

Application name

No

stream_name

String

Stream name

No

page

Integer

Page number

Default value: 0

No

size

Integer

Number of records on each page

Value range: 1–100

Default value: 10

No

Example Request

  GET /v1/{project_id}/record/config?domain=play.example.com

Response Parameters

  • If the request succeeds,
    Table 1 Response parameters

    Parameter

    Type

    Description

    total

    Integer

    Total number of queried templates

    record_config

    Array of RecordConfigInfo objects

    Recording configuration array

    Table 2 RecordConfigInfo parameter description

    Parameter

    Type

    Description

    domain

    String

    Streaming domain name

    push_domain

    String

    Ingest domain name

    app_name

    String

    Application name

    record_duration

    Integer

    Recording length. The minimum value is 15 minutes, and the maximum value is 6 hours. The default value is 1 hour. The unit is second.

    record_format

    String

    Recording format. The default value is flv.

    record_location

    String

    Recording storage location. The default value is vod.

    record_prefix

    String

    Prefix of a recording file. The default value is Record_{DomainName}_{AppName}_{StreamName}_{StartTime}_{EndTime}, in which, DomainName, AppName, and StreamName are mandatory.

    create_time

    String

    Creation time

    start_time

    String

    Start time

    end_time

    String

    End time

    stream_name

    String

    Stream name

  • If the request succeeds,
    Table 3 Response parameters

    Parameter

    Type

    Description

    error_code

    String

    Error code

    error_msg

    String

    Error description

Example Response

  • Successful response example:
    {
      "total": 1,
      "record_config": [
        {
          "domain": "cxf-live.huawei.com",
          "app_name": "live",
          "record_type": "configer_record",
          "record_duration": 1200,
          "record_format": "mp4",
          "record_location": "vod",
          "record_prefix": "Record_{DomainName}_{AppName}_{StreamName}_{StartTime}_{EndTime}",
          "obs_addr": {
            "bucket": "",
            "location": "",
            "object": ""
          },
          "create_time": "2019-03-20T15:42:04.706+08:00"
          "stream_name":"",
          "start_time":"",
          "end_time":""
        }
      ]
    }
    
  • Failed response example:
    {
      "error_code": "LIVE.100011001",
      "error_msg": "Request Illegal"
    }
    

Status Code

See Status Codes.

Error Code

See Error Codes.