Workflow run activity histogram by status
curl --request POST \
--url https://app.apigene.ai/api/workflows/runs/activity-timeline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hours": 168,
"bucket_minutes": 60
}
'import requests
url = "https://app.apigene.ai/api/workflows/runs/activity-timeline"
payload = {
"hours": 168,
"bucket_minutes": 60
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hours: 168, bucket_minutes: 60})
};
fetch('https://app.apigene.ai/api/workflows/runs/activity-timeline', 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://app.apigene.ai/api/workflows/runs/activity-timeline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hours' => 168,
'bucket_minutes' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.apigene.ai/api/workflows/runs/activity-timeline"
payload := strings.NewReader("{\n \"hours\": 168,\n \"bucket_minutes\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.apigene.ai/api/workflows/runs/activity-timeline")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": 168,\n \"bucket_minutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.apigene.ai/api/workflows/runs/activity-timeline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": 168,\n \"bucket_minutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"bucket_minutes": 123,
"series": [
{
"t": "2023-11-07T05:31:56Z",
"succeeded": 0,
"failed": 0,
"waiting_human": 0,
"waiting_auth": 0,
"rejected": 0,
"other": 0
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Workflows
Workflow run activity histogram by status
Dense histogram over a rolling window (default 7 days), bucketed by time and run status. Admins see org-wide counts; members see only their own runs. Empty buckets are filled with zeros.
POST
/
api
/
workflows
/
runs
/
activity-timeline
Workflow run activity histogram by status
curl --request POST \
--url https://app.apigene.ai/api/workflows/runs/activity-timeline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hours": 168,
"bucket_minutes": 60
}
'import requests
url = "https://app.apigene.ai/api/workflows/runs/activity-timeline"
payload = {
"hours": 168,
"bucket_minutes": 60
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hours: 168, bucket_minutes: 60})
};
fetch('https://app.apigene.ai/api/workflows/runs/activity-timeline', 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://app.apigene.ai/api/workflows/runs/activity-timeline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hours' => 168,
'bucket_minutes' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.apigene.ai/api/workflows/runs/activity-timeline"
payload := strings.NewReader("{\n \"hours\": 168,\n \"bucket_minutes\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.apigene.ai/api/workflows/runs/activity-timeline")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": 168,\n \"bucket_minutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.apigene.ai/api/workflows/runs/activity-timeline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": 168,\n \"bucket_minutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"bucket_minutes": 123,
"series": [
{
"t": "2023-11-07T05:31:56Z",
"succeeded": 0,
"failed": 0,
"waiting_human": 0,
"waiting_auth": 0,
"rejected": 0,
"other": 0
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'
Body
application/json
⌘I
