Updated on 2025-12-08 GMT+08:00

Querying Tenant-Level Live Streaming Configurations

Function

Queries tenant-level live streaming configurations.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v1/{project_id}/smart-live-configs/user-config

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.

Request Parameters

Table 2 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.

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 4 Response body parameters

Parameter

Type

Description

live_exit_config

LiveExitConfig object

Livestreaming task exit configuration

live_event_callback_config

LiveEventCallBackConfig object

Live event HTTPS callback notification configuration

live_notify_config

LiveNotifyConfig object

Livestream notification configuration. Users are notified of livestream interruptions via SMS messages, email, or internal messages. You can specify recipient information in the Huawei Cloud message center.

Table 5 LiveExitConfig

Parameter

Type

Description

max_live_duration

Integer

Definition:

Maximum livestreaming duration, in hours.

If this parameter is set to n, the livestream stops n hours after the livestream starts.

The maximum value is 168 (one week). The value 0 indicates no limitation.

Constraints:

If the condition for stopping a livestream is set to stopping immediately, the livestream will continue running for a maximum of five minutes after an error occurs. For other conditions, the processing duration needs to be included.

Default value:

If this parameter is not specified, the duration is not limited.

Value range:

0~168

auto_stop_mode

String

Definition:

How a livestream automatically stops.

  • FORCE_EXIT: force stops the livestream immediately

  • SEGMENT_END: stops the livestream when the segment ends

  • SCENE_END: stops the livestream when the scene ends

  • SCRIPT_END: stops the livestream when the script ends

Constraints:

N/A

Default value:

If this parameter is not specified, the value FORCE_EXIT is used.

max_exception_waiting_duration

Integer

Definition:

The maximum duration the livestream will continue running after an error is detected. Unit: minute.

If this parameter is set to n, the livestream stops n minutes after an exception is detected.

The maximum value is 60 (one hour). The value 0 indicates no limitation.

Constraints:

N/A

Default value:

If this parameter is not specified, the default value (3 minutes) is used. The default value may be slightly adjusted according to the service running status.

Value range:

0~60

Table 6 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.

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

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

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

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

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

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 7 LiveNotifyConfig

Parameter

Type

Description

notify_events

Array of strings

Definition:

Enabled notification events.

Constraints:

N/A

Default value:

None

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://metastudio.xxxx.myhuaweicloud.com/v1/26f065244f754b3aa853b649a21aaf66/smart-live-configs/user-config

Example Responses

Status code: 200

Succeeded.

{
  "live_exit_config" : {
    "max_live_duration" : 8,
    "auto_stop_mode" : "SEGMENT_END",
    "max_exception_waiting_duration" : 30
  }
}

Status code: 400

Parameters error, including the error code and its description.

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

Status code: 401

Authentication is not performed or fails.

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

Status code: 500

Internal service error.

{
  "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.