Get Workflow Run File URL
curl --request GET \
--url https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"url": "<string>"
}Workflows
Get Workflow Run File URL
Get a temporary download URL for a workflow output file.
GET
/
workspaces
/
{workspaceId}
/
workflows
/
{workflowId}
/
runs
/
{runId}
/
file
Get Workflow Run File URL
curl --request GET \
--url https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raydocs.com/workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"url": "<string>"
}Use the
id of a fileRef returned by the workflow’s final output as the file_id query parameter. The response contains a signed download URL valid for ten minutes. Follow redirects when fetching the URL, and treat the URL as a temporary credential.
Authentication and scope
Requiresworkflow-runs-output-read for files in the final output of a completed run, or workflows-read for general runtime file access. The token owner must be a workspace administrator, and any workspace restriction on the token must match. The permission does not restrict access to runs created by that particular token.
Temporary output ZIPs, PDFs and other fileRef values do not need to be persisted as workspace documents. Persisted documentRef values use the separate workspace document API and its permissions.
Availability
For output-only access, an unfinished run or a file not present in the final output returns404. Files from another run require a validated internal alias; including an arbitrary file reference in JSON does not grant access.
An expired signed link returns 401. Request a new URL through this endpoint while the stored file remains available. The download can return 404 if the file has been removed; issuing a link does not extend file retention.Authorizations
Query Parameters
ID of the temporary fileRef to download.
Response
Temporary download URL. File availability is checked when downloading.
