DownloadCodeArtifact
Downloads the response body for one retained Claude Code Artifact version. The VersionId is obtained from the CodeArtifactVersions view.
Stored Procedure-Specific Information
Required inputs: ArtifactId and VersionId. If neither FileName nor FileStream is specified, the driver returns the selected version content in Base64-encoded FileData. Set FileName to save it locally, or supply FileStream from your application to receive it through an output stream. FileName takes precedence over FileStream.
To execute this procedure, enter:
EXEC DownloadCodeArtifact ArtifactId = 'cart_123', VersionId = 'version_123';
EXEC DownloadCodeArtifact ArtifactId = 'cart_123', VersionId = 'version_123', FileName = 'C:\\Downloads\\artifact-version.txt';
Input
| Name | Type | Required | Accepts Output Streams | Description |
| ArtifactId | String | True | False | The tagged Code Artifact Id. Required: Obtain it from CodeArtifacts.Id (for example, cart_abc123). |
| VersionId | String | True | False | The opaque retained version Id. Required: Obtain it from CodeArtifactVersions.VersionId for the same ArtifactId. |
| FileName | String | False | False | Optional absolute local path where the Code Artifact version content is saved. Takes precedence over FileStream. |
| FileStream | String | False | True | Optional output stream that receives the Code Artifact version bytes when FileName is not set. |
Result Set Columns
| Name | Type | Description |
| FileData | String | The Code Artifact version content encoded as Base64 when FileName and FileStream are not set. |
| Success | Boolean | Indicates whether the download completed successfully. |