1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "reviewId": "renewal-2026-10",
10 "asOf": "2026-10-02",
11 "inactivityDays": 30,
12 "assignments": [
13 {
14 "appId": "app-alpha",
15 "seatId": "001",
16 "accountId": "acct-001",
17 "assignedAt": "2026-07-01",
18 },
19 {
20 "appId": "app-alpha",
21 "seatId": "002",
22 "accountId": "acct-002",
23 "assignedAt": "2026-07-01",
24 },
25 {
26 "appId": "app-alpha",
27 "seatId": "003",
28 "accountId": "acct-003",
29 "assignedAt": "2026-07-01",
30 },
31 {
32 "appId": "app-alpha",
33 "seatId": "004",
34 "accountId": "acct-004",
35 "assignedAt": "2026-09-25",
36 },
37 {
38 "appId": "app-alpha",
39 "seatId": "005",
40 "accountId": "acct-005",
41 "assignedAt": "2026-07-01",
42 },
43 {
44 "appId": "app-alpha",
45 "seatId": "006",
46 "accountId": "acct-006",
47 "assignedAt": "2026-07-01",
48 },
49 {
50 "appId": "app-alpha",
51 "seatId": "006",
52 "accountId": "acct-007",
53 "assignedAt": "2026-07-01",
54 },
55 {
56 "appId": "app-beta",
57 "seatId": "001",
58 "accountId": "acct-001",
59 "assignedAt": "2026-07-01",
60 },
61 ],
62 "roster": [
63 {
64 "appId": "app-alpha",
65 "accountId": "acct-001",
66 "status": "active",
67 "offboardedAt": None,
68 },
69 {
70 "appId": "app-alpha",
71 "accountId": "acct-002",
72 "status": "offboarded",
73 "offboardedAt": "2026-09-15",
74 },
75 {
76 "appId": "app-alpha",
77 "accountId": "acct-003",
78 "status": "active",
79 "offboardedAt": None,
80 },
81 {
82 "appId": "app-alpha",
83 "accountId": "acct-004",
84 "status": "active",
85 "offboardedAt": None,
86 },
87 {
88 "appId": "app-alpha",
89 "accountId": "acct-005",
90 "status": "active",
91 "offboardedAt": None,
92 },
93 {
94 "appId": "app-alpha",
95 "accountId": "acct-006",
96 "status": "active",
97 "offboardedAt": None,
98 },
99 {
100 "appId": "app-alpha",
101 "accountId": "acct-007",
102 "status": "active",
103 "offboardedAt": None,
104 },
105 {
106 "appId": "app-beta",
107 "accountId": "acct-001",
108 "status": "active",
109 "offboardedAt": None,
110 },
111 ],
112 "activity": [
113 {
114 "appId": "app-alpha",
115 "accountId": "acct-001",
116 "state": "observed",
117 "lastActivityAt": "2026-08-10",
118 },
119 {
120 "appId": "app-alpha",
121 "accountId": "acct-002",
122 "state": "observed",
123 "lastActivityAt": "2026-09-10",
124 },
125 {
126 "appId": "app-alpha",
127 "accountId": "acct-003",
128 "state": "unknown",
129 "lastActivityAt": None,
130 },
131 {
132 "appId": "app-alpha",
133 "accountId": "acct-004",
134 "state": "none-observed",
135 "lastActivityAt": None,
136 },
137 {
138 "appId": "app-alpha",
139 "accountId": "acct-005",
140 "state": "none-observed",
141 "lastActivityAt": None,
142 },
143 {
144 "appId": "app-alpha",
145 "accountId": "acct-006",
146 "state": "observed",
147 "lastActivityAt": "2026-08-15",
148 },
149 {
150 "appId": "app-alpha",
151 "accountId": "acct-007",
152 "state": "observed",
153 "lastActivityAt": "2026-08-15",
154 },
155 {
156 "appId": "app-beta",
157 "accountId": "acct-001",
158 "state": "observed",
159 "lastActivityAt": "2026-10-01",
160 },
161 ],
162 "coverage": [
163 {
164 "appId": "app-alpha",
165 "from": "2026-08-01",
166 "through": "2026-10-02",
167 "complete": True,
168 },
169 {
170 "appId": "app-beta",
171 "from": "2026-09-01",
172 "through": "2026-10-01",
173 "complete": False,
174 },
175 ],
176}
177
178
179run = client.actor("h_murdock/saas-seat-usage-evidence").call(run_input=run_input)
180
181
182print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
183for item in client.dataset(run.default_dataset_id).iterate_items():
184 print(item)
185
186