Generating a Download URL
Function
This API is used to generate an OBS pre-signed download URL for the skill package of an enterprise-developed skill.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:skillPackage:createDownloadUrl
Write
-
-
-
obs:object:getObject
URI
POST /v3/ai-agents/skills/{skill_id}/packages/{package_id}/download-url
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| skill_id | Yes | String | Skill ID. |
| package_id | Yes | String | Skill package ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Language | No | String | Language, which is used for internationalization. |
| X-Client-Token | No | String | Idempotency key, in UUID format. Creation APIs carry this request header, and the server implements idempotence control based on this header. The response header returns the same value. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| region | Yes | String | Download region. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| download_url | String | OBS pre-signed download URL. |
| obs_bucket | String | OBS bucket name. |
| obs_object_key | String | OBS object key. |
| expires_at | String | Expiration time of the download URL (UTC time in ISO 8601 format). |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Example Requests
/v3/ai-agents/skills/skill-uuid-002/packages/pkg-uuid-010/download-url
{
"region" : "cn-north-7"
} Example Responses
Status code: 200
{
"download_url" : "https://wks-skills-cn-north-7.obs.cn-north-7.myhuaweicloud.com/skills/internal-doc-helper/1.0.0/internal-doc-helper-1.0.0.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20260601T103000Z&X-Amz-Expires=3600&...",
"obs_bucket" : "wks-skills-cn-north-7",
"obs_object_key" : "skills/internal-doc-helper/1.0.0/internal-doc-helper-1.0.0.zip",
"expires_at" : "2026-06-01T11:30:00Z"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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