List workflow runs
curl --request GET \
--url https://api-dev.narrative.io/workflows/{workflow_id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/workflows/{workflow_id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/workflows/{workflow_id}/runs', 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-dev.narrative.io/workflows/{workflow_id}/runs",
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-dev.narrative.io/workflows/{workflow_id}/runs"
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-dev.narrative.io/workflows/{workflow_id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/workflows/{workflow_id}/runs")
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{
"runs": [
{
"run_id": "b7e3f1a2-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
"status": "completed",
"start_time": "2025-01-15T10:30:00Z",
"close_time": "2025-01-15T10:35:00Z"
}
],
"next_page_token": "eyJsYXN0UnVuSWQiOiJhYmMxMjMifQ=="
}{
"type": null,
"title": "Failed to Parse Query",
"status": 400,
"detail": "Invalid query format.",
"instance": "/nql/validate",
"log_id": "c06fea02-0950-45c6-aaff-07ab07c0d04c",
"debug": null
}Workflows
List workflow runs
List execution runs for a workflow. Returns a paginated list of runs with their status, start time, and close time.
Results are ordered by start time descending (most recent first).
GET
/
workflows
/
{workflow_id}
/
runs
List workflow runs
curl --request GET \
--url https://api-dev.narrative.io/workflows/{workflow_id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/workflows/{workflow_id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/workflows/{workflow_id}/runs', 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-dev.narrative.io/workflows/{workflow_id}/runs",
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-dev.narrative.io/workflows/{workflow_id}/runs"
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-dev.narrative.io/workflows/{workflow_id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/workflows/{workflow_id}/runs")
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{
"runs": [
{
"run_id": "b7e3f1a2-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
"status": "completed",
"start_time": "2025-01-15T10:30:00Z",
"close_time": "2025-01-15T10:35:00Z"
}
],
"next_page_token": "eyJsYXN0UnVuSWQiOiJhYmMxMjMifQ=="
}{
"type": null,
"title": "Failed to Parse Query",
"status": 400,
"detail": "Invalid query format.",
"instance": "/nql/validate",
"log_id": "c06fea02-0950-45c6-aaff-07ab07c0d04c",
"debug": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier for a workflow.
Query Parameters
The maximum number of runs to return per page. Defaults to 10.
Opaque token from a previous response to retrieve the next page of results.
Response
A paginated list of workflow runs.
Was this page helpful?

