1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "vendors": [
10 {
11 "name": "GitHub",
12 "status_json_url": "https://www.githubstatus.com/api/v2/incidents.json",
13 "sla_threshold_pct": 99.9,
14 "excluded_components": [],
15 },
16 {
17 "name": "Cloudflare",
18 "status_json_url": "https://www.cloudflarestatus.com/api/v2/incidents.json",
19 "sla_threshold_pct": 99.99,
20 "excluded_components": [],
21 },
22 {
23 "name": "OpenAI",
24 "status_json_url": "https://status.openai.com/api/v2/incidents.json",
25 "sla_threshold_pct": 99.9,
26 "excluded_components": [],
27 },
28 ],
29 "periodStart": "",
30 "periodEnd": "",
31 "downtimeImpacts": [
32 "critical",
33 "major",
34 ],
35 "maxHistoryPages": 3,
36 "maxIncidentsPerReport": 200,
37 "requestTimeoutSeconds": 30,
38 "concurrency": 5,
39 "maxRedirects": 5,
40 "maxResponseBytes": 5000000,
41}
42
43
44run = client.actor("kingii98/vendor-sla-attainment-and-credit-claim-report").call(run_input=run_input)
45
46
47print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
48for item in client.dataset(run.default_dataset_id).iterate_items():
49 print(item)
50
51