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 the JSON success response format.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/skills/{skill_id}/files/content?path={path}
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
First query the skill file to obtain file_path. Prepare the personal access token, target workspace ID, and skill ID that can access the target workspace.
Request parameters¶
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
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Current workspace ID. |
|
string |
Yes |
Skill ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The relative path of the file in the skill package. Maximum 1024 UTF-8 bytes. Absolute paths, backslashes, repeated slashes, trailing slashes, or independent |
Successful response¶
Field |
Type |
Description |
|---|---|---|
|
response header |
The actual media type of the file. |
|
response header |
|
|
response header |
Fixed to |
Error response¶
{
"code": 3,
"message": "<错误信息>"
}
Returns JSON on error:
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
Common reasons: |
|
|
Common Cause: Valid identity credentials are missing. Recommended Action: Check the API Key. |
|
|
Common reasons: The current identity does not have permission to read the skill file. Recommended Action: Check the workspace authorization. |
|
|
Common reasons: The skill or specified file does not exist. Recommended Action: Check the skill ID and |
|
|
Common reasons: Skill pack storage is not available. Recommended Action: Try again later. |