Creating an Interaction Rule Library for Live Rooms
Function
Creates an interaction rule library for live rooms.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/smart-live-interaction-rule-groups
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request 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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group_name |
Yes |
String |
Interaction rule library name. |
interaction_rules |
No |
Array of InteractionRuleInfo objects |
Interaction rules. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
rule_index |
No |
String |
Rule index. |
rule_name |
No |
String |
Rule name. |
enabled |
No |
Boolean |
Whether to enable. |
event_type |
No |
Integer |
Event type. - 1: on-screen comment - 2: users joining a live room - 3: giving likes - 4: sending gifts - 10: preset wording |
hit_condition |
No |
HitCondition object |
Hit condition. |
trigger |
No |
TriggerProcess object |
Trigger |
review_config |
No |
ReviewConfig object |
Content review configuration. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
relation |
No |
String |
Condition relationship. The value And or Or RESERVED indicates that the general reply does not check other matching conditions. |
priority |
No |
Integer |
Priority. A smaller value indicates a higher priority. The value ranges from 0 to 999. The default value is 500. This parameter is optional. |
tags |
No |
Array of HitConditionTag objects |
Matching relationship configuration |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tag |
No |
String |
Key fields in the event content. |
operation |
No |
String |
Field processing.
|
match |
No |
String |
Match type.
|
value |
No |
String |
Match value |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
time_window |
No |
Integer |
Processing suppression duration, in second. –1 indicates the entire livestreaming. 0 indicates no suppression. It is triggered each time. |
reply_mode |
No |
String |
Reply type.
|
layer_config |
No |
SmartLayerConfig object |
Intelligent layer configuration. |
extra_layer_config |
No |
SmartLayerConfig object |
Additional layer, which is used together with the second layer when dynamic text needs to be displayed for products. |
reply_texts |
No |
Array of strings |
Reply scripts. |
reply_audios |
No |
Array of ReplyAudioInfo objects |
Reply audio set. Set audio_url. |
reply_order |
No |
String |
Reply sequence.
|
reply_role |
No |
String |
Reply role. The default value is STREAMER.
|
robot_id |
No |
String |
Bot ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
layer_type |
Yes |
String |
Layer type.
|
asset_id |
No |
String |
ID of the asset overlaid on a video. You do not need to set this parameter for external assets. |
position |
No |
LayerPositionConfig object |
Layer position configuration. |
size |
No |
LayerSizeConfig object |
Layer size configuration. |
image_config |
No |
SmartImageLayerConfig object |
Image layer configuration. |
video_config |
No |
SmartVideoLayerConfig object |
Video layer configuration. |
text_config |
No |
SmartTextLayerConfig object |
Video layer configuration. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
dx |
Yes |
Integer |
X axis position of the pixel in the upper left corner of the image. The coordinate of the upper left corner of the canvas is 0x0.
NOTE:
|
dy |
Yes |
Integer |
Y axis position of the pixel in the upper left corner of the image. The coordinate of the upper left corner of the canvas is 0x0.
NOTE:
The canvas resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). |
layer_index |
Yes |
Integer |
Layer sequence of an image, video, or person image.
NOTE:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
width |
No |
Integer |
Width (in pixel) of the layer image (relative to the canvas size).
NOTE:
The canvas resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). |
height |
No |
Integer |
Height (in pixel) of the layer image (relative to the canvas size).
NOTE:
The canvas resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
image_url |
Yes |
String |
Image file URL. |
display_duration |
No |
Integer |
Image display duration, in second.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
video_url |
Yes |
String |
Video file URL. |
video_cover_url |
No |
String |
Video thumbnail file URL. |
display_duration |
No |
Integer |
Video display duration, in second.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
text_type |
No |
String |
Text type.
|
text_context |
No |
String |
Text. |
font_name |
No |
String |
Font. The following fonts are supported:
|
font_size |
No |
Integer |
Font size (pixel). The value ranges from 4 to 120. |
font_color |
No |
String |
Font color. RGB color value. |
display_duration |
No |
Integer |
Text display duration, in second.
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
X-Request-Id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
group_id |
String |
Interaction rule library ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
POST https://{endpoint}/v1/70b76xxxxxx34253880af501cdxxxxxx/smart-live-interaction-rule-groups { "group_name" : "Welcome Message" }
Example Responses
Status code: 200
Succeeded.
{ "group_id" : "26f06524-4f75-4b3a-a853-b649a21aaf66" }
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot