The response message for Agents.ExportAgent.

JSON representation

  // Union field agent can be only one of the following:
  "agentUri": string,
  "agentContent": string
  // End of list of possible types for union field agent.
Union field agent. Required. The exported agent. agent can be only one of the following:


The URI to a file containing the exported agent. This field is populated only if agentUri is specified in ExportAgentRequest.


string (bytes format)

The exported agent.

Example for how to export an agent to a zip file via a command line:

curl \
  -X POST \
  -H 'Authorization: Bearer '$(gcloud auth application-default
  print-access-token) \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --compressed \
  --data-binary '{}' \
| grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
| base64 --decode > <agent zip file>

A base64-encoded string.