Ignora e passa al contenuto principale

Questo browser non è più supportato.

Esegui l'aggiornamento a Microsoft Edge per sfruttare i vantaggi di funzionalità più recenti, aggiornamenti della sicurezza e supporto tecnico.

Scarica Microsoft Edge Scopri di più su Internet Explorer e Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Agents

Download agent code

GET /agents/{agent_name}/code:download

Downloads the code zip for a code-based hosted agent. Returns the previously-uploaded zip (application/zip).

If agent_version is supplied, returns that version's code zip; otherwise returns the latest version's code zip.

The SHA-256 digest of the returned bytes matches the content_hash on the resolved version's code_configuration.

Parametri del percorso

agent_name string necessario

The name of the agent.

Parametri di query

agent_version string

The version of the agent whose code zip should be downloaded. If omitted, the latest version's code zip is returned.

api-version string necessario

The API version to use for this operation.

Risposte

Response body for downloading a hosted agent's code zip. Body is the raw zip bytes; Content-Type declares application/zip so clients can route to a zip-aware handler. Streaming is preserved (bytes body) regardless of the content-type label.

Intestazioni

x-ms-agent-version string necessario

The version of the agent whose code zip is returned in the response body.

Corpo

Content-Type: application/zip

Client error

Corpo

Content-Type: application/json
error OpenAI.Error necessario
code string | null necessario
message string necessario
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Uno qualsiasi dei seguenti:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string necessario

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Corpo

Content-Type: application/json
error OpenAI.Error necessario
code string | null necessario
message string necessario
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Uno qualsiasi dei seguenti:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string necessario

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Richiedi

GET /agents/{agent_name}/code:download HTTP/1.1

Response

Status: 200
Content-Type: application/zip
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json
it-it
Scelte sulla privacy
  • Dichiarazione di non responsabilità relativa all'intelligenza artificiale
  • Versioni precedenti
  • Blog
  • Collabora
  • Riservatezza
  • Privacy dei dati sanitari dei consumatori
  • Condizioni per l'utilizzo
  • Accessibilità
  • Marchi
  • © Microsoft 2026