Download skill file

Download a static file imported with the skill pack. The success response is the binary content of the file and does not use a JSON success envelope.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/skills/{skill_id}/files/content?path={path}

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First query the skill file to obtain file_path.

Set the operation-specific values used in the request:

  • $SKILL_ID: Skill ID.

Request

Shell
curl -OJ "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/skills/$SKILL_ID/files/content?path=references%2Fguide.md" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameters

Type

Is it required

Description

workspace_id

string

Yes

The current workspace ID.

skill_id

string

Yes

Skill ID.

Query parameters

Parameters

Type

Is it required

Description

path

string

Yes

The relative path of the file in the skill package. Cannot be a directory, an absolute path, a path containing .., or a backslash.

Successful response

Returns 200 and the file contents on success. The response is not a JSON envelope. The response sets the following headers:

Response header

Description

Content-Type

The actual media type of the file.

Content-Disposition

attachment and provide a UTF-8 encoded file name.

X-Content-Type-Options

Fixed to nosniff.

Error response

Returns JSON on error:

JSON
{
  "code": 3,
  "message": "<错误信息>",
  "details": {
    "reason": "SKILL_PACKAGE_FILE_NOT_FOUND"
  }
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

2(INVALID_ARGUMENT)

path Missing or unsafe skill pack relative path.

Use the file_path returned as-is by Query Skill File.

401

6(UNAUTHENTICATED)

Lack of valid identity credentials.

Check API Key.

403

5(PERMISSION_DENIED)

The current identity does not have permission to read the skill file.

Check workspace authorization.

404

3(NOT_FOUND)

The skill or specified file does not exist.

Check skill ID and path.

503

15(UNAVAILABLE)

Skill pack storage is unavailable.

Try again later.

Follow-up operations

If you need to continue management after the download is completed, return to Query skill details.

Last updated on