1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "jiraExport": {
12 "sprint": {
13 "id": 37,
14 "name": "Synthetic November sprint",
15 "state": "closed",
16 "startDate": "2026-11-01T10:00:00Z",
17 "endDate": "2026-11-08T10:00:00Z",
18 "completeDate": "2026-11-08T11:00:00Z"
19 },
20 "sprintField": {
21 "id": "customfield_10020",
22 "name": "Sprint",
23 "schema": {
24 "custom": "com.pyxis.greenhopper.jira:gh-sprint"
25 }
26 },
27 "issues": [
28 {
29 "issue": {
30 "id": "10001",
31 "key": "DEMO-1",
32 "fields": {
33 "created": "2026-10-20T10:00:00Z",
34 "sprint": null,
35 "closedSprints": [
36 {
37 "id": 37,
38 "name": "Synthetic November sprint"
39 }
40 ]
41 }
42 },
43 "changelog": {
44 "startAt": 0,
45 "maxResults": 3,
46 "total": 3,
47 "values": [
48 {
49 "id": "501",
50 "created": "2026-10-31T15:00:00Z",
51 "items": [
52 {
53 "field": "Sprint",
54 "fieldId": "customfield_10020",
55 "from": "",
56 "to": "37",
57 "fromString": "",
58 "toString": "Synthetic November sprint"
59 }
60 ]
61 },
62 {
63 "id": "502",
64 "created": "2026-11-03T12:00:00Z",
65 "items": [
66 {
67 "field": "Sprint",
68 "fieldId": "customfield_10020",
69 "from": "37",
70 "to": "",
71 "fromString": "Synthetic November sprint",
72 "toString": ""
73 }
74 ]
75 },
76 {
77 "id": "503",
78 "created": "2026-11-04T12:00:00Z",
79 "items": [
80 {
81 "field": "Sprint",
82 "fieldId": "customfield_10020",
83 "from": "",
84 "to": "37",
85 "fromString": "",
86 "toString": "Synthetic November sprint"
87 }
88 ]
89 }
90 ]
91 }
92 },
93 {
94 "issue": {
95 "id": "10002",
96 "key": "DEMO-2",
97 "fields": {
98 "created": "2026-11-02T11:00:00Z",
99 "sprint": null,
100 "closedSprints": [
101 {
102 "id": 37,
103 "name": "Synthetic November sprint"
104 }
105 ]
106 }
107 },
108 "changelog": {
109 "startAt": 0,
110 "maxResults": 1,
111 "total": 1,
112 "values": [
113 {
114 "id": "504",
115 "created": "2026-11-02T12:00:00Z",
116 "items": [
117 {
118 "field": "Sprint",
119 "fieldId": "customfield_10020",
120 "from": "",
121 "to": "37",
122 "fromString": "",
123 "toString": "Synthetic November sprint"
124 }
125 ]
126 }
127 ]
128 }
129 },
130 {
131 "issue": {
132 "id": "10003",
133 "key": "DEMO-3",
134 "fields": {
135 "created": "2026-10-20T10:00:00Z",
136 "sprint": null,
137 "closedSprints": [
138 {
139 "id": 37,
140 "name": "Synthetic November sprint"
141 }
142 ]
143 }
144 },
145 "changelog": {
146 "startAt": 0,
147 "maxResults": 0,
148 "total": 0,
149 "values": []
150 }
151 }
152 ]
153 },
154 "maxRunSeconds": 120
155};
156
157
158const run = await client.actor("natstandridge/jira-sprint-scope-churn-audit").call(input);
159
160
161console.log('Results from dataset');
162console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
163const { items } = await client.dataset(run.defaultDatasetId).listItems();
164items.forEach((item) => {
165 console.dir(item);
166});
167
168