Updated on 2026-09-11 GMT+08:00

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

skill_id

Yes

String

Skill ID.

package_id

Yes

String

Skill package ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Language

No

String

Language, which is used for internationalization.

  • en-us: English.

  • zh-cn: Chinese.

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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

region

Yes

String

Download region.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

-

Table 5 Response body parameters

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

Table 6 Response header parameters

Parameter

Type

Description

X-Request-Id

String

-

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 401

Table 8 Response header parameters

Parameter

Type

Description

X-Request-Id

String

-

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 403

Table 10 Response header parameters

Parameter

Type

Description

X-Request-Id

String

-

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 404

Table 12 Response header parameters

Parameter

Type

Description

X-Request-Id

String

-

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 500

Table 14 Response header parameters

Parameter

Type

Description

X-Request-Id

String

-

Table 15 Response body parameters

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.