Skip to content

StreamPackage API Reference โ€‹

Updated

The API service code for StreamPackage is mdp, and the API version is 2020-05-27. The basic order is: create a channel โ†’ verify the input โ†’ create an endpoint โ†’ verify playback โ†’ attach CDN.

Call Specification โ€‹

ItemValue
EndpointPOST https://mdp.tencentcloudapi.com
ActionSee the API list below
Request signingUse Tencent Cloud API 3.0 signing from the official SDK / TCCLI

Basic Information โ€‹

ItemValue
API service codemdp
API version2020-05-27
AuthenticationTencent Cloud API 3.0 / TC3-HMAC-SHA256
Call toolsTencent Cloud SDK / TCCLI

Before You Run โ€‹

Configure TCCLI authentication and permissions. The example region is ap-seoul, and values beginning with REPLACE_ should be replaced with real values. Use true and false for booleans inside JSON files.

API List and Request Parameters โ€‹

ActionOperation
CreateStreamPackageChannelCreate
DescribeStreamPackageChannelQuery
CreateStreamPackageChannelEndpointCreate
BindNewLVBDomainWithChannelChange settings

Responses and Execution Flow โ€‹

Keep the resource ID returned in the create response and check the status with the query API. Distinguish between a successful create request and successful actual input ingest and output delivery. Verify the status of the resource before running the next step.

Errors and Call Limits โ€‹

Connection Checks โ€‹

SymptomWhat to check first
Unknown optionWhether the field exists on that Action, and the TCCLI version
JSONString quoting, array / object structure, lowercase booleans
Endpoint 403IP allowlist, AuthKey header, CDN origin requests
Results only need verifying on CDNDNS, TLS, the CDN certificate, and the origin access policy
Playlist opens but does not advanceWhether the input persists, cached responses, segment updates

Record the Action, region, RequestId, response code, and the time of occurrence. Remove URL signatures, passwords, and authentication keys from shared logs.

Request Examples โ€‹

1. Create / Query a Channel โ€‹

bash
tccli mdp CreateStreamPackageChannel --region ap-seoul --Name demo_package --Protocol HLS

Check the channel ID in the create response.

bash
tccli mdp DescribeStreamPackageChannel --region ap-seoul --Id REPLACE_CHANNEL_ID

Check the input address and endpoint in the query response. A basic create request only needs the required fields.

2. Create a HLS Endpoint โ€‹

Save the following JSON as package-endpoint.json. The IP is a documentation address, so replace it with the request origin you actually want to allow. If access goes through CDN, you must first review the origin request source of CDN and your access control design.

json
{
  "Id": "REPLACE_CHANNEL_ID",
  "Name": "demo_hls",
  "Protocol": "HLS",
  "Manifest": "main",
  "AuthInfo": {
    "WhiteIpList": [
      "203.0.113.10/32"
    ],
    "BlackIpList": ,
    "AuthKey": ""
  },
  "TimeShiftEnable": false
}
bash
tccli mdp CreateStreamPackageChannelEndpoint --region ap-seoul --cli-input-json file://package-endpoint.json

This example uses allowlist-based access control. The AuthKey method is applied to the X-TENCENT-PACKAGE header of the request, while input HTTP authentication is configured separately.

Retrieve the generated URL from the API response or from the channel details query. Add time shifting / CMAF / DRM only after checking the support requirements in Endpoint configuration.

3. Playback Verification โ€‹

After sending a signal to the channel from StreamLive or your publishing system, confirm that the endpoint playlist is being updated. The basic integration is complete only once you have also verified the child playlists, segment requests, and video / audio playback.

4. Attach CDN โ€‹

Run this after CSS is enabled, cross-service permissions are granted, and the playback domain is ready. Replace play.example.com with a domain you actually own and have configured.

bash
tccli mdp BindNewLVBDomainWithChannel --region ap-seoul \
  --ChannelId REPLACE_CHANNEL_ID --LVBDomain play.example.com

Even after the binding succeeds, verify CNAME, the HTTPS certificate, origin access control, and playlist / segment playback. For the detailed order, see CSS CDN integration.

Results and Resource Management โ€‹

Modify / Delete API โ€‹

PurposeActionNotes
Modify a channelModifyStreamPackageChannelQuery the current settings first
Modify an endpointModifyStreamPackageChannelEndpointSpecify the exact channel ID and endpoint URL, and preserve the existing authentication settings
Change input authenticationModifyStreamPackageChannelInputAuthInfoChange it together with the credentials on the publishing side
Unbind CDNUnbindCdnDomainWithChannelCheck the impact on playback over production domains
Delete an endpointDeleteStreamPackageChannelEndpointsCheck whether the playback URL is in use
Delete a channelDeleteStreamPackageChannelsClean up the attached endpoints first

Query the current authentication settings, then apply the items you want to change. Carry out creation, authentication changes, and deletion while verifying the result of each step.

Distinguishing SSAI from Harvest โ€‹

SSAI is a separate configuration that covers the ADS, ad markers, sessions, and the delivery path for ad assets. Verify plain HLS playback first, then choose the API that matches your SSAI configuration approach.

A Harvest Job is a task that stores a retained past segment as COS. Verify the target, time range, and COS permissions first, then follow the procedure in Harvest Job.

Reference Documents โ€‹

Built with VitePress ยท Deployed on Tencent EdgeOne Pages