Export agent package¶
Export the .moiagent package of the specified agent version.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-packages/{agent_id}/versions/{version}/export
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. Prepare the personal access token that can access the target workspace, the target workspace ID, the agent ID, and the version to be exported.
Request parameters¶
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-packages/$AGENT_ID/versions/$VERSION/export" -H "X-API-Key: $CLOUDSIGMA_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID" -o agent.moiagent
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Current workspace ID. |
|
string |
Yes |
The agent ID whose package file is to be exported. |
|
string |
Yes |
The agent version to be exported. |
|
string |
No |
Query parameters. Only current workspace_id or system is allowed. When omitted, the current workspace is used, and an explicit null value has no effect. |
The source query parameter only accepts the current workspace or system. A null value does not indicate the default source.
Successful response¶
agent-id-version.moiagent(二进制包文件)
Returns 200 and the packet file byte stream on success.
Error response¶
{
"code": 3,
"message": "agent version not found"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error description. |