1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "auditId": "weekly-2026-10-03",
12 "windowStart": "2026-10-01T00:00:00Z",
13 "windowEnd": "2026-10-03T00:00:00Z",
14 "asOf": "2026-10-03T06:00:00Z",
15 "observationCoverage": "complete",
16 "observations": [
17 {
18 "recordId": "001",
19 "project": "web",
20 "testId": "checkout-total",
21 "revision": "commit-001",
22 "environment": "chromium-ci",
23 "logicalExecutionId": "execution-a",
24 "attemptIndex": 0,
25 "status": "fail",
26 "observedAt": "2026-10-02T10:00:00Z",
27 "chainCoverage": "complete",
28 "sourceReference": "archive/001"
29 },
30 {
31 "recordId": "002",
32 "project": "web",
33 "testId": "checkout-total",
34 "revision": "commit-001",
35 "environment": "chromium-ci",
36 "logicalExecutionId": "execution-a",
37 "attemptIndex": 1,
38 "status": "pass",
39 "observedAt": "2026-10-02T10:01:00Z",
40 "chainCoverage": "complete",
41 "sourceReference": "archive/002"
42 },
43 {
44 "recordId": "003",
45 "project": "web",
46 "testId": "checkout-total",
47 "revision": "commit-001",
48 "environment": "chromium-ci",
49 "logicalExecutionId": "execution-b",
50 "attemptIndex": 0,
51 "status": "error",
52 "observedAt": "2026-10-02T10:02:00Z",
53 "chainCoverage": "complete",
54 "sourceReference": "archive/003"
55 },
56 {
57 "recordId": "004",
58 "project": "web",
59 "testId": "checkout-total",
60 "revision": "commit-001",
61 "environment": "chromium-ci",
62 "logicalExecutionId": "execution-c",
63 "attemptIndex": 0,
64 "status": "pass",
65 "observedAt": "2026-10-02T10:03:00Z",
66 "chainCoverage": "complete",
67 "sourceReference": "archive/004"
68 },
69 {
70 "recordId": "005",
71 "project": "web",
72 "testId": "checkout-total",
73 "revision": "commit-001",
74 "environment": "chromium-ci",
75 "logicalExecutionId": "execution-d",
76 "attemptIndex": 0,
77 "status": "fail",
78 "observedAt": "2026-10-02T10:04:00Z",
79 "chainCoverage": "complete",
80 "sourceReference": "archive/005"
81 },
82 {
83 "recordId": "006",
84 "project": "web",
85 "testId": "checkout-total",
86 "revision": "commit-001",
87 "environment": "chromium-ci",
88 "logicalExecutionId": "execution-d",
89 "attemptIndex": 2,
90 "status": "pass",
91 "observedAt": "2026-10-02T10:06:00Z",
92 "chainCoverage": "complete",
93 "sourceReference": "archive/006"
94 },
95 {
96 "recordId": "007",
97 "project": "web",
98 "testId": "checkout-total",
99 "revision": "commit-001",
100 "environment": "chromium-ci",
101 "logicalExecutionId": "execution-e",
102 "attemptIndex": 0,
103 "status": "skipped",
104 "observedAt": "2026-10-02T10:07:00Z",
105 "chainCoverage": "complete",
106 "sourceReference": "archive/007"
107 },
108 {
109 "recordId": "008",
110 "project": "web",
111 "testId": "checkout-total",
112 "revision": "commit-002",
113 "environment": "chromium-ci",
114 "logicalExecutionId": "execution-f",
115 "attemptIndex": 0,
116 "status": "pass",
117 "observedAt": "2026-10-02T10:08:00Z",
118 "chainCoverage": "complete",
119 "sourceReference": "archive/008"
120 },
121 {
122 "recordId": "009",
123 "project": "web",
124 "testId": "checkout-total",
125 "revision": "commit-001",
126 "environment": "chromium-ci",
127 "logicalExecutionId": "execution-g",
128 "attemptIndex": 0,
129 "status": "pass",
130 "observedAt": "2026-09-30T10:09:00Z",
131 "chainCoverage": "complete",
132 "sourceReference": "archive/009"
133 }
134 ],
135 "observationsCsv": "",
136 "observationColumns": {
137 "recordId": "recordId",
138 "project": "project",
139 "testId": "testId",
140 "revision": "revision",
141 "environment": "environment",
142 "logicalExecutionId": "logicalExecutionId",
143 "attemptIndex": "attemptIndex",
144 "status": "status",
145 "observedAt": "observedAt",
146 "chainCoverage": "chainCoverage",
147 "sourceReference": "sourceReference"
148 },
149 "csvDelimiter": ","
150};
151
152
153const run = await client.actor("h_murdock/test-retry-cohort-evidence").call(input);
154
155
156console.log('Results from dataset');
157console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
158const { items } = await client.dataset(run.defaultDatasetId).listItems();
159items.forEach((item) => {
160 console.dir(item);
161});
162
163