Generate a presigned HTTPS download URL for any workflow file identified by its resource URI.
Quick Example
{
"resource_uri": "workflow://550e8400-e29b-41d4-a716-446655440000/uploads/customers.csv"
}Input Parameters
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| resource_uri | string | Yes | - | workflow://{workflowId}/{type}/{filename} where {type} is uploads or artifacts | Resource URI to generate download URL for |
Request Schema:
interface GenerateDownloadUrlParams {
resource_uri: string;
}Output Format
{
download_url: string,
download_expires_at: string,
resource_uri: string,
filename: string,
tool_trace_id: string,
workflow_id: string
}Response Fields:
| Field | Type | Description |
|---|---|---|
| download_url | string | Presigned HTTPS URL for downloading (expires in 1 hour) |
| download_expires_at | string | ISO 8601 expiration timestamp |
| resource_uri | string | The original workflow:// resource URI |
| filename | string | Filename from the resource URI |
| tool_trace_id | string | OpenTelemetry trace ID |
| workflow_id | string | Workflow session identifier |
Example Response:
{
"download_url": "https://s3.amazonaws.com/bucket/uploads/550e.../customers.csv?X-Amz-Signature=...",
"download_expires_at": "2025-01-16T13:00:00Z",
"resource_uri": "workflow://550e8400-e29b-41d4-a716-446655440000/uploads/customers.csv",
"filename": "customers.csv",
"tool_trace_id": "a1b2c3d4e5f6",
"workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}Error Handling
Common Errors:
- Resource not found or expired:
"No resource at <resource_uri>. The artifact does not exist or has expired. Retrying with the same URI will not succeed."— surfaced when the underlying S3 object is missing for anuploadsURI, or when both the S3 artifact path and the workflow-state fallback come up empty for anartifactsURI. - Access denied:
"Access denied to <resource_uri>. Check that the workflow_id matches the requesting session." - Invalid URI scheme:
"Invalid URI protocol. Expected 'workflow://', got: ..." - Invalid URI shape:
"Invalid URI path. Expected format: workflow://{workflowId}/{type}/{filename}, got: ..." - Transient S3 / state-service failure:
"Failed to generate download URL. Please try again." - Invalid resource type:
"Invalid resource type '<type>'. Expected 'uploads' or 'artifacts'"
Usage Examples
Example 1: Download an uploaded file
{
"resource_uri": "workflow://550e8400-e29b-41d4-a716-446655440000/uploads/customers.csv"
}Example 2: Download an artifact
{
"resource_uri": "workflow://550e8400-e29b-41d4-a716-446655440000/artifacts/resolved_identities.csv"
}Example 3: Download a Parquet artifact
{
"resource_uri": "workflow://550e8400-e29b-41d4-a716-446655440000/artifacts/trait_frequencies.parquet"
}