هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

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
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
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Scalable File Service Turbo
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
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

Reporting Livestreaming Events

Function

Reports livestreaming events.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/smart-live-rooms/{room_id}/smart-live-jobs/{job_id}/live-event-report

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.

job_id

Yes

String

Task ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

auth_key

No

String

Authentication key. Authentication key generated using HMACSHA256.

expires_time

No

Long

Expiration time of the authentication key. Number of milliseconds elapsed since January 1, 1970 (midnight in UTC/GMT).

refresh_url

No

Boolean

Whether to refresh the URL.

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.

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

total

Yes

Integer

Number of events.

events

No

Array of LiveEvent objects

Event content.

review_config

No

ReviewConfig object

Content review configuration.

Table 5 LiveEvent

Parameter

Mandatory

Type

Description

timestamp

Yes

Long

Event timestamp. Number of milliseconds since 1970-01-01 00:00:00.

type

No

Integer

Event type.

1: On-screen comment information

2: User joining a room

3: Liking

4: Sending gifts

5: Subscription/Following

6: Number of viewers in a room

content

No

String

Event content. [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br]The content varies according to the event type. The definition is as follows:

  • type=1 On-screen comment information

Definition of content:

  • user: user, json

  • content: on-screen comment. The value is a string.

Definition of user:

  • userId: user ID. The value is a string.

  • name: username. The value is a string.

  • level: user platform level. The value is an integer.

  • badge: user brand name. The value is a string.

  • badgeLevel: brand level. The value is an integer.

Example:

{
  "timestamp": 1694481224245,
  "type": 1,
  "content": "{\"user\":{\"userId\":\"2027271526\",\"name\":\"***\",\"level\":17,\"badge\":\"\",\"badgeLevel\":0},\"content\":\"***\"}"
}
  • type=2 User joining a room

Definition of content:

  • user: user, json

Example:

{
  "timestamp": 1694481227655,
  "type": 2,
  "content": "{\"user\":{\"userId\":\"2978899271\",\"name\":\"***\",\"level\":1,\"badge\":\"\",\"badgeLevel\":0}}"
}
  • type=3 Liking

Definition of content:

  • user: user, json

Example:

{
  "timestamp": 1694481227655,
  "type": 2,
  "content": "{\"user\":{\"userId\":\"2978899271\",\"name\":\"***\",\"level\":1,\"badge\":\"\",\"badgeLevel\":0}}"
}
  • type=4 Sending gifts

Definition of content:

  • user: user, json

  • gift: gift information, json

Definition of gift:

  • giftName: gift name. The value is a string.

  • giftNum: number of gifts. The value is an integer.

  • totalValue: total value of gifts. The value is an integer.

  • giftValue: value of one gift. The value is an integer.

Example:

{
  "timestamp": 1690531652862,
  "type": 4,
  "content": "{\"gift\":{\"giftName\":\"Star\",\"giftNum\":10,\"totalValue\":10,\"giftValue\":3},\"user\":{\"userId\":\"douyin_95882940927\",\"name\":\"Romantic lover\",\"level\":2,\"badge\":\"\",\"badgeLevel\":0}}"
}
  • type=5 Subscription

Not in use.

  • type=6 Number of viewers in a room

Definition of content:

  • numberOfViewers: number of viewers in a room. The value is an integer.

Example:

{
  "timestamp": 1694481236886,
  "type": 6,
  "content": "{\"numberOfViewers\":5466}"
}
Table 6 ReviewConfig

Parameter

Mandatory

Type

Description

no_need_review

No

Boolean

Content review whitelist. This feature is available only for users in the whitelist. The auto review policies apply to other users.

Response Parameters

Status code: 200

Table 7 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 8 Response body parameters

Parameter

Type

Description

live_event_report_url

String

URL for uploading the updated livestreaming event.

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

POST https://{endpoint}/v1/70b76xxxxxx34253880af501cdxxxxxx/smart-live-rooms/24bad716-87b1-45e5-8912-6102f7693265/smart-live-jobs/26f06524-4f75-4b3a-a853-b649a21aaf66/live-event-report

{
  "total" : 1,
  "events" : [ {
    "timestamp" : 1690819199000,
    "type" : 1,
    "content" : "xxxxx"
  } ]
}

Example Responses

Status code: 200

Succeeded.

{
  "live_event_report_url" : "https://{endpoint}/v1/70b76xxxxxx34253880af501cdxxxxxx/smart-live-rooms/24bad716-87b1-45e5-8912-6102f7693265/smart-live-jobs/26f06524-4f75-4b3a-a853-b649a21aaf66/live-event-report"
}

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