Wiki source code of REST API

Last modified by gabrielc on 2026/07/02 12:56

Show last authors
1 REST endpoints for managing tours, tasks, steps, and user status.
2
3 All endpoints are under the ##/rest/guidedTour/## base path and require authentication.
4
5
6 == Tours ==
7
8 === List all tours ===
9
10 {{prism}}
11 GET /rest/guidedTour/tours
12 {{/prism}}
13
14 Response: Array of ##TourDTO## objects.
15
16
17 === Create a tour ===
18
19 {{prism}}
20 POST /rest/guidedTour/tours
21 {{/prism}}
22
23 Request body: ##TourDTO## JSON.
24
25
26 === Update a tour ===
27
28 {{prism}}
29 PUT /rest/guidedTour/tours/{tourId}
30 {{/prism}}
31
32 Request body: ##TourDTO## JSON.
33
34
35 === Delete a tour ===
36
37 {{prism}}
38 DELETE /rest/guidedTour/tours/{tourId}
39 {{/prism}}
40
41 Deletes the tour and all its tasks and steps.
42
43
44 == Tasks ==
45
46 === List tasks ===
47
48 {{prism}}
49 GET /rest/guidedTour/tours/{tourId}/tasks
50 {{/prism}}
51
52 Response: Array of ##TaskDTO## objects.
53
54
55 === Get a task ===
56
57 {{prism}}
58 GET /rest/guidedTour/tours/{tourId}/tasks/{taskId}
59 {{/prism}}
60
61 Response: Single ##TaskDTO##.
62
63
64 === Create a task ===
65
66 {{prism}}
67 POST /rest/guidedTour/tours/{tourId}/tasks
68 {{/prism}}
69
70 Request body: ##TaskDTO## JSON.
71
72
73 === Update a task ===
74
75 {{prism}}
76 PUT /rest/guidedTour/tours/{tourId}/tasks/{taskId}
77 {{/prism}}
78
79 Request body: ##TaskDTO## JSON.
80
81
82 === Delete a task ===
83
84 {{prism}}
85 DELETE /rest/guidedTour/tours/{tourId}/tasks/{taskId}
86 {{/prism}}
87
88
89 == Steps ==
90
91 === List steps ===
92
93 {{prism}}
94 GET /rest/guidedTour/tours/{tourId}/tasks/{taskId}/steps
95 {{/prism}}
96
97 Response: Array of ##StepDTO## objects.
98
99
100 === Create a step ===
101
102 {{prism}}
103 POST /rest/guidedTour/tours/{tourId}/tasks/{taskId}/steps
104 {{/prism}}
105
106 Request body: ##StepDTO## JSON.
107
108
109 === Update a step ===
110
111 {{prism}}
112 PUT /rest/guidedTour/tours/{tourId}/tasks/{taskId}/steps/{stepId}
113 {{/prism}}
114
115 Request body: ##StepDTO## JSON.
116
117
118 === Delete a step ===
119
120 {{prism}}
121 DELETE /rest/guidedTour/tours/{tourId}/tasks/{taskId}/steps/{stepId}
122 {{/prism}}
123
124
125 == User status ==
126
127 === Get user status ===
128
129 {{prism}}
130 GET /rest/guidedTour/user
131 {{/prism}}
132
133 Response: ##UserTourStatusDTO## containing widget state and task completion map.
134
135
136 === Create user status ===
137
138 {{prism}}
139 POST /rest/guidedTour/user
140 {{/prism}}
141
142 Initializes a user tour status record.
143
144
145 === Update user status ===
146
147 {{prism}}
148 PUT /rest/guidedTour/user
149 {{/prism}}
150
151 Request body: ##UserTourStatusDTO## JSON.
152
153
154 == DTOs ==
155
156 === TourDTO ===
157
158 {{prism language="json"}}
159 {
160 "id": "getting-started",
161 "title": "Getting Started",
162 "isActive": true,
163 "tasks": [
164 {
165 "id": "task1",
166 "title": "Create a Page",
167 "order": 1,
168 "isActive": true,
169 "dependsOn": [],
170 "status": "TODO"
171 }
172 ]
173 }
174 {{/prism}}
175
176
177 === TaskDTO ===
178
179 |=Field|=Type|=Description
180 |id|String|Task identifier
181 |title|String|Display name
182 |order|int|Sort order
183 |isActive|boolean|Whether the task is available
184 |dependsOn|Array of String|Prerequisite task IDs
185 |status|String|Current user status: TODO, SKIPPED, DONE
186
187
188
189 === StepDTO ===
190
191 {{prism language="json"}}
192 {
193 "order": 1,
194 "element": "#mainContent",
195 "content": "This is the main content area",
196 "placement": "BOTTOM_CENTER",
197 "backdrop": true,
198 "reflex": false,
199 "targetPage": "Main.WebHome",
200 "targetAction": "VIEW",
201 "queryParameters": "param1=value1"
202 }
203 {{/prism}}
204
205 |=Field|=Type|=Description
206 |order|int|Position within the task
207 |element|String|CSS selector for the highlighted element
208 |content|String|Tooltip content
209 |placement|String|Tooltip position
210 |backdrop|boolean|Enable backdrop overlay
211 |reflex|boolean|Click element to advance
212 |targetPage|String|Page reference for multi-page navigation
213 |targetAction|String|Action on target page
214 |queryParameters|String|URL query parameters for target page
215
216
217
218 === UserTourStatusDTO ===
219
220 {{prism language="json"}}
221 {
222 "widgetState": "OPEN",
223 "callToAction": false,
224 "tasksStatus": {
225 "task1": "DONE",
226 "task2": "TODO",
227 "task3": "SKIPPED"
228 }
229 }
230 {{/prism}}
231
232
233 == Error codes ==
234
235 |=Code|=Description
236 |401|Authentication required
237 |404|Entity not found (invalid tour, task, or step ID)
238 |409|Duplicate entity (ID or order conflict)
239 |500|Internal server error
240
241

Get Connected