DownloadArtifact
Downloads the text content of an artifact by its version Id.
Stored Procedure-Specific Information
Required input: ArtifactVersionId. With no output destination, the add-in returns the API's UTF-8 artifact text in Content. Set FileName to save the content locally, or supply FileStream from your application to receive its UTF-8 bytes through an output stream. FileName takes precedence over FileStream.
To execute this procedure, enter:
EXEC DownloadArtifact ArtifactVersionId = 'claude_artifact_version_123';
EXEC DownloadArtifact ArtifactVersionId = 'claude_artifact_version_123', FileName = 'C:\\Downloads\\artifact.md';
Input
| Name | Type | Required | Description |
| ArtifactVersionId | String | True | The artifact version Id to download. Required: Obtain it from GetChatMessageArtifacts.VersionId or ChatMessages.Artifacts (for example, claude_artifact_version_xyz789). |
| FileName | String | False | Optional absolute local path where the artifact content is saved. Takes precedence over FileStream. |
Result Set Columns
| Name | Type | Description |
| Content | String | The UTF-8 artifact text when FileName and FileStream are not set. |
| Success | Boolean | Indicates whether the download completed successfully. |