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.
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¶
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 |
|---|---|---|---|
|
string |
Yes |
The current workspace ID. |
|
string |
Yes |
Skill ID. |
Query parameters
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The relative path of the file in the skill package. Cannot be a directory, an absolute path, a path containing |
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 |
|---|---|
|
The actual media type of the file. |
|
|
|
Fixed to |
Error response¶
Returns JSON on error:
{
"code": 3,
"message": "<错误信息>",
"details": {
"reason": "SKILL_PACKAGE_FILE_NOT_FOUND"
}
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Use the |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read the skill file. |
Check workspace authorization. |
|
|
The skill or specified file does not exist. |
Check skill ID and |
|
|
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.