Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 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 | |||
| |
1.2 | 16 | |
| |
1.1 | 17 | === Create a tour === |
| 18 | |||
| 19 | {{prism}} | ||
| 20 | POST /rest/guidedTour/tours | ||
| 21 | {{/prism}} | ||
| 22 | |||
| 23 | Request body: ##TourDTO## JSON. | ||
| 24 | |||
| |
1.2 | 25 | |
| |
1.1 | 26 | === Update a tour === |
| 27 | |||
| 28 | {{prism}} | ||
| 29 | PUT /rest/guidedTour/tours/{tourId} | ||
| 30 | {{/prism}} | ||
| 31 | |||
| 32 | Request body: ##TourDTO## JSON. | ||
| 33 | |||
| |
1.2 | 34 | |
| |
1.1 | 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 | |||
| |
1.2 | 43 | |
| |
1.1 | 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 | |||
| |
1.2 | 54 | |
| |
1.1 | 55 | === Get a task === |
| 56 | |||
| 57 | {{prism}} | ||
| 58 | GET /rest/guidedTour/tours/{tourId}/tasks/{taskId} | ||
| 59 | {{/prism}} | ||
| 60 | |||
| 61 | Response: Single ##TaskDTO##. | ||
| 62 | |||
| |
1.2 | 63 | |
| |
1.1 | 64 | === Create a task === |
| 65 | |||
| 66 | {{prism}} | ||
| 67 | POST /rest/guidedTour/tours/{tourId}/tasks | ||
| 68 | {{/prism}} | ||
| 69 | |||
| 70 | Request body: ##TaskDTO## JSON. | ||
| 71 | |||
| |
1.2 | 72 | |
| |
1.1 | 73 | === Update a task === |
| 74 | |||
| 75 | {{prism}} | ||
| 76 | PUT /rest/guidedTour/tours/{tourId}/tasks/{taskId} | ||
| 77 | {{/prism}} | ||
| 78 | |||
| 79 | Request body: ##TaskDTO## JSON. | ||
| 80 | |||
| |
1.2 | 81 | |
| |
1.1 | 82 | === Delete a task === |
| 83 | |||
| 84 | {{prism}} | ||
| 85 | DELETE /rest/guidedTour/tours/{tourId}/tasks/{taskId} | ||
| 86 | {{/prism}} | ||
| 87 | |||
| |
1.2 | 88 | |
| |
1.1 | 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 | |||
| |
1.2 | 99 | |
| |
1.1 | 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 | |||
| |
1.2 | 108 | |
| |
1.1 | 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 | |||
| |
1.2 | 117 | |
| |
1.1 | 118 | === Delete a step === |
| 119 | |||
| 120 | {{prism}} | ||
| 121 | DELETE /rest/guidedTour/tours/{tourId}/tasks/{taskId}/steps/{stepId} | ||
| 122 | {{/prism}} | ||
| 123 | |||
| |
1.2 | 124 | |
| |
1.1 | 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 | |||
| |
1.2 | 135 | |
| |
1.1 | 136 | === Create user status === |
| 137 | |||
| 138 | {{prism}} | ||
| 139 | POST /rest/guidedTour/user | ||
| 140 | {{/prism}} | ||
| 141 | |||
| 142 | Initializes a user tour status record. | ||
| 143 | |||
| |
1.2 | 144 | |
| |
1.1 | 145 | === Update user status === |
| 146 | |||
| 147 | {{prism}} | ||
| 148 | PUT /rest/guidedTour/user | ||
| 149 | {{/prism}} | ||
| 150 | |||
| 151 | Request body: ##UserTourStatusDTO## JSON. | ||
| 152 | |||
| |
1.2 | 153 | |
| |
1.1 | 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 | |||
| |
1.2 | 176 | |
| |
1.1 | 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 | |||
| |
1.2 | 187 | |
| 188 | |||
| |
1.1 | 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 | |||
| |
1.2 | 216 | |
| 217 | |||
| |
1.1 | 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 | |||
| |
1.2 | 232 | |
| |
1.1 | 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 |