The following sections answer frequently asked questions about ApsaraVideo VOD server-side API operations and event callback configuration.
How do I configure different callback URLs for different environments (production/test)?
The ApsaraVideo VOD console supports only one global callback URL. To use a different callback URL for a specific environment, include the MessageCallback.CallbackURL field in the UserData parameter when you call an API operation such as SubmitAIMediaAuditJob or SubmitTranscodeJobs. This per-request configuration applies only to the current task and does not affect the global callback URL.
Why does my server not receive callback notifications after I configure the callback?
If the callback endpoint returns a 301 or 302 redirect, the callback fails. Remove the redirect and try again.
The callback URL must return an HTTP 200 status code in response to the request.
The callback domain must be publicly resolvable. A globally resolvable domain is recommended. Your server firewall must allow inbound requests from Alibaba Cloud.
How do I obtain the video file name from a callback?
Callback messages do not include the source file name by default. To obtain the file name, use the VideoId from the callback to call GetMezzanineInfo. The response includes the source file name and URL.
Why does the API return an error indicating that the TemplateGroupID does not exist?
Template group IDs (TemplateGroupID) are bound to specific accounts. If the AccessKey used to call operations such as CreateUploadVideo belongs to a different account, the API returns an error indicating that the template group does not exist. Verify that the AccessKey belongs to the same account that owns the template group.
Why does the traffic returned by GetDailyPlayRegionStatis differ from the billable traffic shown in the console?
The traffic values returned by GetDailyPlayRegionStatis are in bytes and represent application-layer statistics. Billable traffic is calculated by multiplying the application-layer value by 1.1 to account for TCP network overhead. To align the API output with the billable traffic shown in the console, multiply the returned value by 1.1.
How do I batch-delete media assets or obtain all video IDs in bulk?
Batch deletion — Delete videos manually in the ApsaraVideo VOD console, or call the
DeleteVideooperation in a loop. Each request accepts a maximum of 20 video IDs.Bulk retrieval of video IDs — Use the Export Media Assets feature in the console, or call the
SearchMediaoperation to query videos in batches.
How do I migrate media assets across accounts?
Resource plans cannot be shared across accounts, but media assets can be migrated. In the destination account, use the URL-based batch upload operation to pull media asset URLs from the source account. You can specify thumbnails by using the CoverURL parameter and process transcoding by calling the SubmitTranscodeJobs operation.