cURL
curl --request POST \
--url https://api.tirdad.ai/v1/workflows/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"entity": "<string>",
"entity_id": "<string>",
"expand": "<string>",
"filters": [
{
"field": "<string>",
"value": {
"array": [
"<string>"
],
"boolean": true,
"date": "<string>",
"number": 123,
"string": "<string>"
}
}
],
"limit": 500,
"offset": 1,
"sort": [
{
"field": "<string>"
}
],
"start_time": "2023-11-07T05:31:56Z",
"task_queue": "<string>",
"workflow_id": "<string>",
"workflow_status": "<string>",
"workflow_type": "<string>"
}
'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.workflows.query_workflow()
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.workflows.queryWorkflow({});
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"github.com/tirdad-billing/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Workflows.QueryWorkflow(ctx, types.WorkflowExecutionFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListWorkflowsResponse != nil {
// handle response
}
}{
"items": [
{
"close_time": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"duration_ms": 123,
"entity": "<string>",
"entity_id": "<string>",
"run_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "<string>",
"task_queue": "<string>",
"total_duration": "<string>",
"workflow_id": "<string>",
"workflow_type": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Workflows
Query workflows
Use when listing or auditing workflow runs (e.g. ops dashboard or debugging). Returns a paginated list; supports filtering by workflow type and status.
POST
/
workflows
/
search
cURL
curl --request POST \
--url https://api.tirdad.ai/v1/workflows/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"entity": "<string>",
"entity_id": "<string>",
"expand": "<string>",
"filters": [
{
"field": "<string>",
"value": {
"array": [
"<string>"
],
"boolean": true,
"date": "<string>",
"number": 123,
"string": "<string>"
}
}
],
"limit": 500,
"offset": 1,
"sort": [
{
"field": "<string>"
}
],
"start_time": "2023-11-07T05:31:56Z",
"task_queue": "<string>",
"workflow_id": "<string>",
"workflow_status": "<string>",
"workflow_type": "<string>"
}
'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.workflows.query_workflow()
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.workflows.queryWorkflow({});
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"github.com/tirdad-billing/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Workflows.QueryWorkflow(ctx, types.WorkflowExecutionFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListWorkflowsResponse != nil {
// handle response
}
}{
"items": [
{
"close_time": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"duration_ms": 123,
"entity": "<string>",
"entity_id": "<string>",
"run_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "<string>",
"task_queue": "<string>",
"total_duration": "<string>",
"workflow_id": "<string>",
"workflow_type": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Body
application/json
Filter