Export agent package

Export the .moiagent package of the specified agent version.

HTTP
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

Shell
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

workspace_id

string

Yes

Current workspace ID.

agent_id

string

Yes

The agent ID whose package file is to be exported.

version

string

Yes

The agent version to be exported.

agent_workspace_id

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

Text
agent-id-version.moiagent(二进制包文件)

Returns 200 and the packet file byte stream on success.

Error response

JSON
{
  "code": 3,
  "message": "agent version not found"
}

Field

Type

Description

code

integer

error code.

message

string

Error description.

Last updated on