Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying Livestreaming Tasks of a Live Room

Function

Queries livestreaming tasks of a live room.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/smart-live-rooms/{room_id}/smart-live-jobs

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

room_id

Yes

String

Script ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Offset where the query starts.

Value range:

0-2147483647

Default value:

0

limit

No

Integer

Number of items displayed on each page.

Value range:

1-100

Default value:

10

state

No

String

Task status. By default, all statuses are selected.

Multiple statuses can be queried. Use commas (,) to separate them,

for example, state=CREATING,PUBLISHED.

sort_key

No

String

Sorting field. Options:

  • create_time: sorting by creation time
  • update_time: sorting by update time
  • asset_order: sorting by asset

sort_dir

No

String

Sorting mode.

  • asc: ascending order
  • desc: descending order

asc is used by default.

create_since

No

String

Filter the records whose creation time is not earlier than the entered time.

create_until

No

String

Filter the records whose creation time is not later than the entered time.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used.

You can obtain the token by calling the IAM API used to obtain a user token.

Value of X-Subject-Token in the response header.

Authorization

No

String

Authentication information. This parameter is mandatory for AK/SK authentication.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory for AK/SK authentication.

The format is YYYYMMDD'T'HHMMSS'Z'.

X-Project-Id

No

String

Project ID. This parameter is mandatory for AK/SK authentication.

X-App-UserId

No

String

Third-party user ID, which does not allow Chinese characters.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 5 Response body parameters

Parameter

Type

Description

count

Integer

Details:

Total number of virtual avatar livestreaming tasks.

Value range:

0-2147483647

smart_live_jobs

Array of SmartLiveJob objects

Virtual human livestreaming task list.

Table 6 SmartLiveJob

Parameter

Type

Description

job_id

String

Virtual human livestreaming task ID.

room_id

String

Live room ID.

room_name

String

Live room name.

state

String

Virtual human livestreaming task status.

  • WAITING: The task is waiting for execution.
  • PROCESSING: The task is being processed.
  • SUCCEED: The task has been completed.
  • FAILED: The task failed.
  • BLOCKED: The live room was blocked.

duration

Float

Details:

Virtual avatar livestreaming duration, in second.

Value range:

0-2147483647

start_time

String

Start time of a virtual avatar livestreaming task. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

end_time

String

End time of a virtual avatar livestreaming task. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

error_info

ErrorResponse object

Virtual human livestreaming task error information.

create_time

String

Time when a virtual avatar livestreaming task is created. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

lastupdate_time

String

Last update time of a virtual avatar livestreaming task. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

rtc_room_info

RTCRoomInfoList object

RTC room information.

live_event_report_url

String

URL for reporting livestreaming events. Users report their own livestreaming events to this URL to trigger intelligent interaction and automatic reply.

live_event_callback_config

LiveEventCallBackConfig object

Live event HTTPS callback notification configuration

rtc_callback_config

RTCLiveEventCallBackConfig object

RTC callback event configuration. Compatible processing. If the configuration is not carried, LIVE_PROGRESS is subscribed by default.

stream_duration

Float

Details:

Virtual avatar livestream push duration, in second.

Value range:

0-2147483647

block_reason

String

Information about live room blocking.

cover_url

String

Live room thumbnail URL

co_streamer_config

CoStreamerConfig object

Co-streamer configuration

live_job_log

LiveJobLog object

Livestreaming task records

relation_live_platform_info

PlatformLiveDetailInfo object

Platform live broadcast information.

Table 7 ErrorResponse

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Table 8 RTCRoomInfoList

Parameter

Type

Description

app_id

String

RTC application ID.

room_id

String

RTC room ID.

users

Array of RTCUserInfo objects

Information about users joining an RTC room.

Table 9 RTCUserInfo

Parameter

Type

Description

user_type

String

User type.

  • CAPTURE: Live assistant, which pushes video streams captured by cameras to RTC rooms.
  • ANIMATION: Visual control service, which pulls video streams from RTC rooms to generate motion data.
  • RENDER: Rendering service, which renders motion data into virtual human animations.
  • PLAYER: Common viewer, who can watch the original video stream or virtual human animation video stream.
  • INFERENCE_USER: Virtual human inference user, who receives audio streams from and pushes video streams to an RTC room.
  • END_USER: Device user, who receives video streams from and pushes audio streams to an RTC room.

user_id

String

RTC user ID.

signature

String

RTC authentication token.

ctime

Long

Validity period. Timestamp, in seconds.

Value range:

0-4294967295

Table 10 LiveEventCallBackConfig

Parameter

Type

Description

live_event_type_callback_url

String

Details:

Live event callback address, which is an HTTPS address.

Constraints:

N/A

Options:

The value contains 0 to 2,048 characters.

Default value:

N/A

auth_type

String

Details:

Authentication type.

Constraints:

N/A

Options:

  • NONE: The URL contains authentication.
  • MSS_A: In HMACSHA256 signature mode, the hwSecret and hwTime parameters are added to the URL.

    Value format: hwSecret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)&hwTime=hex(timestamp)

  • MSS_A_HEAD: In HMACSHA256 signature mode, the hwSecret and hwTime parameters are placed in Head.

    Value format: x-hw-mss-secret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)

    x-hw-mss-time=hex(timestamp)

  • MEITUAN_DEFAULT: This parameter is used only for Meituan's API callback.

Default value:

NONE

key

String

Details:

Key.

Constraints:

N/A

Options:

The value contains 0 to 32 characters.

Default value:

N/A

callback_event_type

Array of strings

Details:

Live event types in callbacks.

Constraints:

N/A

Options:

Currently, only the following options are supported:

  • SHOOT_SCRIPT_SWITCH: script paragraph switching event
  • RTMP_STREAM_STATE_CHANGE: RTMP link change callback event
  • REPLY_COMMAND_FINISH: Playback is complete.

The callback event structure is defined as follows:

  • event_type: event type
  • message: event description
    • The SHOOT_SCRIPT_SWITCH event callback is defined as follows:
      {
        "event_type":  "SHOOT_SCRIPT_SWITCH",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"scene_script_name\":\"Product 1\",\"shoot_script_sequence_no\":\"2\",\"shoot_script_title\":\"Paragraph 2\"}"
      }
    • The RTMP_STREAM_STATE_CHANGE callback is defined as follows:
      {
        "event_type":  "RTMP_STREAM_STATE_CHANGE",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"output_url\":\"rtmp://xxx/xx/xx\",\"stream_key\":\"xxxxx\",\"state\":\"CONNECTED\"}"
      }

      The value of state can be CONNECTING, CONNECTED, DISCONNECTED, RECONNECTING, or END.

    • The REPLY_COMMAND_FINISH callback is defined as follows:
      {
        "event_type":  "REPLY_COMMAND_FINISH",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"reply_id\":\"e87104f76d7546ce8a46ac6b04c49c3c"}"
      }
Table 11 RTCLiveEventCallBackConfig

Parameter

Type

Description

rtc_callback_event_type

Array of strings

Live event types in RTC callbacks.

Currently, only the following options are supported:

  • LIVE_PROGRESS: live script progress notification
  • REPLY_COMMAND_FINISH: Playback is complete.

The callback event structure is defined as follows:

  • message_type: message type
  • data: message description
    • The LIVE_PROGRESS event callback is defined as follows:
      {
          "message_type": "live_progress_notify",
          "data": {
              "script_name": "Scene 1",
              "shoot_script_sequence_no": 2,
              "shoot_script_title": "Greeting",
              "offset": "247",
              "reply_id": "e87104f76d7546ce8a46ac6b04c49c3c"
          }
      }
    • The REPLY_COMMAND_FINISH callback is defined as follows:
      {
        "message_type": "reply_command_finish_notify",
        "data":"{
          "reply_id":"e87104f76d7546ce8a46ac6b04c49c3c"
        }"
      }
Table 12 CoStreamerConfig

Parameter

Type

Description

voice_config

VoiceConfig object

Voice configuration parameter.

streamer_action

String

Details:

Behavior of the streamer when the co-streamer speaks.

Constraints:

N/A

Options:

  • SILENCE: silent
  • VOLUME_DOWN: decreased volume

Default value:

N/A

Table 13 VoiceConfig

Parameter

Type

Description

voice_asset_id

String

Details:

Timbre asset ID, which can be queried from the asset library.

Constraints:

N/A

Options:

The value contains 1 to 256 characters.

Default value:

N/A

speed

Integer

Details:

Speaking speed. 50 indicates 0.5x speaking speed, 100 indicates normal speaking speed, and 200 indicates 2x speaking speed.

The value 100 indicates the normal speaking speed of an adult, which is about 150 words per minute.

Constraints:

N/A

Value range:

50-200

Default value:

100

pitch

Integer

Details:

Pitch.

Constraints:

N/A

Value range:

50-200

Default value:

100

volume

Integer

Details:

Volume.

Constraints:

N/A

Value range:

90-240

Default value:

140

Table 14 LiveJobLog

Parameter

Type

Description

interaction_records_url

String

Live interaction record file address

Table 15 PlatformLiveDetailInfo

Parameter

Type

Description

platform_id

String

Live TV platform ID.

platform

String

Live broadcast platform. Meituan fills in meituan

account

String

Authorization account information.

Meituan platform: opBizCode

live_id

String

Live TV channel ID. If this parameter is set, the live TV channel ID is carried in the segment switchback callback.

LiveId corresponding to the Meituan.

Status code: 400

Table 16 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 17 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 18 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://{endpoint}/v1/70b76xxxxxx34253880af501cdxxxxxx/smart-live-rooms/24bad716-87b1-45e5-8912-6102f7693265/smart-live-jobs

Example Responses

Status code: 200

Succeeded.

{
  "count" : 1,
  "smart_live_jobs" : [ {
    "job_id" : "26f06524-4f75-4b3a-a853-b649a21aaf66",
    "state" : "WAITING",
    "start_time" : "2022-01-18T16:29:36Z",
    "end_time" : "2022-01-18T16:30:36Z",
    "duration" : 60
  } ]
}

Status code: 400

{
  "error_code" : "MSS.00000003",
  "error_msg" : "Invalid parameter"
}

Status code: 401

{
  "error_code" : "MSS.00000001",
  "error_msg" : "Unauthorized"
}

Status code: 500

{
  "error_code" : "MSS.00000004",
  "error_msg" : "Internal Error"
}

Status Codes

Status Code

Description

200

Succeeded.

400

Parameters error, including the error code and its description.

401

Authentication is not performed or fails.

500

Internal service error.

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback