-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathapi-specification-confluence.txt
More file actions
609 lines (550 loc) · 12.3 KB
/
Copy pathapi-specification-confluence.txt
File metadata and controls
609 lines (550 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
h1. Healenium API Specification
h2. Overview
Healenium is a self-healing testing tool that helps to maintain web tests by automatically healing broken locators. This document describes the REST API endpoints provided by the Healenium backend service.
h2. Base URL
All API endpoints are relative to the base URL: {{/healenium}}
h2. Endpoints
h3. Selector Management
h4. Save Selector
* *URL*: {{/healenium}}
* *Method*: {{POST}}
* *Description*: Save information about a successfully found element
* *Request Body*: {{SelectorRequestDto}}
{code:json}
{
"locator": "//div[@id='example']",
"className": "com.example.TestClass",
"methodName": "testMethod",
"command": "findElement",
"url": "https://example.com",
"type": "xpath",
"enableHealing": true
}
{code}
* *Response*: {{204 No Content}}
h4. Get Reference Elements
* *URL*: {{/healenium}}
* *Method*: {{GET}}
* *Description*: Get last valid path for provided request
* *Request Parameters*:
** {{locator}}: The locator string
** {{className}}: The class name
** {{methodName}}: The method name
** {{command}}: The command (findElement or findElements)
** {{url}}: The URL
* *Response*: {{ReferenceElementsDto}}
{code:json}
{
"elements": [
{
"nodePathes": [...],
"elementIds": ["id1", "id2"]
}
]
}
{code}
h4. Get All Elements and Config
* *URL*: {{/healenium/elements}}
* *Method*: {{GET}}
* *Description*: Get all saved selectors and configuration
* *Response*: {{ConfigSelectorDto}}
{code:json}
{
"config": {...},
"selectors": [...]
}
{code}
h4. Get Selectors Page
* *URL*: {{/healenium/selectors}}
* *Method*: {{GET}}
* *Description*: Get all selectors for the selector.html view
* *Response*: {{ModelAndView}} with selector data
h4. Get All Selectors
* *URL*: {{/healenium/selector/all}}
* *Method*: {{GET}}
* *Description*: Get all selectors as a list
* *Response*: List of {{SelectorRequestDto}}
{code:json}
[
{
"id": "selector-id",
"locator": "//div[@id='example']",
"className": "com.example.TestClass",
"methodName": "testMethod",
"command": "findElement",
"url": "https://example.com",
"type": "xpath",
"enableHealing": true
}
]
{code}
h4. Set Selector Status
* *URL*: {{/healenium/selector/status}}
* *Method*: {{POST}}
* *Description*: Set status (enable/disable) for healing
* *Request Body*: {{SelectorDto}}
{code:json}
{
"id": "selector-id",
"enable": true
}
{code}
* *Response*: {{204 No Content}}
h4. Save Selector File Path
* *URL*: {{/healenium/selector/save/path}}
* *Method*: {{POST}}
* *Description*: Save selector file path
* *Request Body*: {{RecordDto}}
* *Response*: {{204 No Content}}
h4. Migrate Selectors
* *URL*: {{/healenium/migrate}}
* *Method*: {{GET}}
* *Description*: Migrate selectors
* *Response*: {{ModelAndView}} with migration status message
h3. Healing Management
h4. Save Healing
* *URL*: {{/healenium/healing}}
* *Method*: {{POST}}
* *Description*: Save healing result for specific selector
* *Headers*:
** {{sessionKey}}: Session key for report association
* *Request Body*: List of {{HealingRequestDto}}
{code:json}
[
{
"locator": "//div[@id='example']",
"className": "com.example.TestClass",
"methodName": "testMethod",
"command": "findElement",
"url": "https://example.com",
"type": "xpath",
"results": [
{
"locator": "//div[@id='new-example']",
"score": 0.95
}
],
"usedResult": {
"locator": "//div[@id='new-example']",
"score": 0.95
}
}
]
{code}
* *Response*: {{204 No Content}}
h4. Get Healings
* *URL*: {{/healenium/healing}}
* *Method*: {{GET}}
* *Description*: Get healing with their results for provided request
* *Request Parameters*:
** {{locator}}: The locator string
** {{className}}: The class name
** {{methodName}}: The method name
** {{command}}: The command
** {{url}}: The URL
* *Response*: Set of {{HealingDto}}
{code:json}
[
{
"id": "healing-id",
"locator": "//div[@id='example']",
"results": [
{
"id": "result-id",
"locator": "//div[@id='new-example']",
"score": 0.95,
"successHealing": true
}
]
}
]
{code}
h4. Get Healing Results
* *URL*: {{/healenium/healing/results}}
* *Method*: {{GET}}
* *Description*: Get healing results for selector
* *Request Parameters*:
** {{locator}}: The locator string
** {{className}}: The class name
** {{methodName}}: The method name
** {{command}}: The command
** {{url}}: The URL
* *Response*: Set of {{HealingResultDto}}
{code:json}
[
{
"id": "result-id",
"locator": "//div[@id='new-example']",
"score": 0.95,
"successHealing": true
}
]
{code}
h4. Set Healing Success
* *URL*: {{/healenium/healing/success}}
* *Method*: {{POST}}
* *Description*: Set status of healing
* *Request Body*: {{RecordDto.ReportRecord}}
{code:json}
{
"healingResultId": 123,
"successHealing": true
}
{code}
* *Response*: {{204 No Content}}
h3. Session Management
h4. Restore Session
* *URL*: {{/healenium/session}}
* *Method*: {{POST}}
* *Description*: Restore session to parse DOM for proxy type
* *Request Body*: {{SessionDto}}
* *Response*: {{204 No Content}}
h3. Report Management
h4. Get Report by ID
* *URL*: {{/healenium/report/{uid}}}
* *Method*: {{GET}}
* *Description*: Get report by ID
* *Path Parameters*:
** {{uid}}: Report unique ID
* *Response*: {{ModelAndView}} with report data
h4. Get Latest Report
* *URL*: {{/healenium/report}}
* *Method*: {{GET}}
* *Description*: Get latest report
* *Response*: {{ModelAndView}} with report data
h4. Initialize Report
* *URL*: {{/healenium/report/init}}
* *Method*: {{POST}}
* *Description*: Initialize a new report
* *Response*: Report key as string
h4. Initialize Report by ID
* *URL*: {{/healenium/report/init/{uid}}}
* *Method*: {{POST}}
* *Description*: Initialize a report with specific ID
* *Path Parameters*:
** {{uid}}: Report unique ID
* *Response*: Report URL as string
h4. Build Report
* *URL*: {{/healenium/report/build}}
* *Method*: {{POST}}
* *Description*: Build report
* *Headers*:
** {{sessionKey}}: Session key for report association
* *Response*: Report URL as string
h4. Get All Reports
* *URL*: {{/healenium/report/all}}
* *Method*: {{GET}}
* *Description*: Get all reports
* *Response*: List of {{ReportDto}}
{code:json}
[
{
"id": "report-id",
"name": "Report Name",
"time": "2025-09-08T12:00:00"
}
]
{code}
h4. Get Report Data
* *URL*: {{/healenium/report/data/{uid}}}
* *Method*: {{GET}}
* *Description*: Get report data by ID
* *Path Parameters*:
** {{uid}}: Report unique ID
* *Response*: {{RecordDto}}
{code:json}
{
"id": "report-id",
"name": "Report Name",
"time": "2025-09-08T12:00:00",
"data": [
{
"declaringClass": "com.example.TestClass",
"screenShotPath": "/path/to/screenshot.png",
"failedLocatorValue": "//div[@id='example']",
"failedLocatorType": "xpath",
"healedLocatorValue": "//div[@id='new-example']",
"healedLocatorType": "xpath",
"score": "0.95",
"successHealing": true,
"healingResultId": 123
}
]
}
{code}
h4. Edit Report
* *URL*: {{/healenium/report/data/{uid}}}
* *Method*: {{PATCH}}
* *Description*: Edit report data
* *Path Parameters*:
** {{uid}}: Report unique ID
* *Request Body*: {{ReportDto}}
* *Response*: {{RecordDto}} with updated data
h3. Settings Management
h4. Get Dedicated Info
* *URL*: {{/healenium/settings/dedicated-info/{reportId}}}
* *Method*: {{GET}}
* *Description*: Get dedicated info for report
* *Path Parameters*:
** {{reportId}}: Report ID
* *Response*: {{DedicatedInfo}}
{code:json}
{
"availableForSd": true,
"availableForMr": true
}
{code}
h4. Save Locator Paths
* *URL*: {{/healenium/settings/paths/save/{reportId}}}
* *Method*: {{PATCH}}
* *Description*: Save locator paths for report
* *Path Parameters*:
** {{reportId}}: Report ID
* *Request Body*: List of {{LocatorPathsDto}}
{code:json}
[
{
"selectedPath": "/path/to/locator"
}
]
{code}
* *Response*: {{DedicatedInfo}}
{code:json}
{
"availableForMr": true
}
{code}
h4. Save VCS Credentials
* *URL*: {{/healenium/settings/vcs/save}}
* *Method*: {{POST}}
* *Description*: Save VCS credentials
* *Request Body*: {{VcsDto}}
{code:json}
{
"name": "github",
"accessToken": "token",
"repository": "user/repo",
"branch": "main"
}
{code}
* *Response*: {{204 No Content}}
h4. Get VCS Configuration
* *URL*: {{/healenium/settings/vcs/{platform}}}
* *Method*: {{GET}}
* *Description*: Get VCS configuration for platform
* *Path Parameters*:
** {{platform}}: VCS platform name
* *Response*: {{VcsDto}}
{code:json}
{
"name": "github",
"accessToken": "token",
"repository": "user/repo",
"branch": "main"
}
{code}
h4. Save LLM Credentials
* *URL*: {{/healenium/settings/llm/save}}
* *Method*: {{POST}}
* *Description*: Save LLM credentials
* *Request Body*: {{LlmDto}}
{code:json}
{
"name": "model-name",
"accessToken": "token"
}
{code}
* *Response*: List of {{LlmDto}}
{code:json}
[
{
"id": "llm-id",
"name": "model-name",
"accessToken": "token",
"isActive": true,
"createdDate": "2025-09-08T12:00:00"
}
]
{code}
h4. Get LLM Configuration
* *URL*: {{/healenium/settings/llm/{platform}}}
* *Method*: {{GET}}
* *Description*: Get LLM configuration for platform
* *Path Parameters*:
** {{platform}}: LLM platform name
* *Response*: {{LlmDto}}
{code:json}
{
"id": "llm-id",
"name": "model-name",
"accessToken": "token",
"isActive": true,
"createdDate": "2025-09-08T12:00:00"
}
{code}
h4. Get All LLMs
* *URL*: {{/healenium/settings/llm/all}}
* *Method*: {{GET}}
* *Description*: Get all LLM configurations
* *Response*: List of {{LlmDto}}
{code:json}
[
{
"id": "llm-id",
"name": "model-name",
"accessToken": "token",
"isActive": true,
"createdDate": "2025-09-08T12:00:00"
}
]
{code}
h4. Activate LLM
* *URL*: {{/healenium/settings/llm/activate/{id}}}
* *Method*: {{POST}}
* *Description*: Activate LLM by ID
* *Path Parameters*:
** {{id}}: LLM ID
* *Response*: List of {{LlmDto}}
{code:json}
[
{
"id": "llm-id",
"name": "model-name",
"accessToken": "token",
"isActive": true,
"createdDate": "2025-09-08T12:00:00"
}
]
{code}
h4. Get Active LLM
* *URL*: {{/healenium/settings/llm/active}}
* *Method*: {{GET}}
* *Description*: Get active LLM configuration
* *Response*: {{LlmDto}}
{code:json}
{
"id": "llm-id",
"name": "model-name",
"accessToken": "token",
"isActive": true,
"createdDate": "2025-09-08T12:00:00"
}
{code}
h4. Delete LLM
* *URL*: {{/healenium/settings/llm/delete/{id}}}
* *Method*: {{DELETE}}
* *Description*: Delete LLM by ID
* *Path Parameters*:
** {{id}}: LLM ID
* *Response*: {{204 No Content}}
h2. Data Models
h3. SelectorRequestDto
{code:json}
{
"id": "string",
"type": "string",
"locator": "string",
"className": "string",
"methodName": "string",
"command": "string",
"url": "string",
"enableHealing": "boolean",
"urlKey": "boolean",
"sessionId": "string",
"elementIds": ["string"]
}
{code}
h3. RequestDto
{code:json}
{
"locator": "string",
"className": "string",
"methodName": "string",
"command": "string",
"url": "string"
}
{code}
h3. HealingRequestDto
{code:json}
{
"locator": "string",
"className": "string",
"methodName": "string",
"command": "string",
"url": "string",
"type": "string",
"pageContent": "string",
"results": [
{
"locator": "string",
"score": "number",
"successHealing": "boolean"
}
],
"usedResult": {
"locator": "string",
"score": "number",
"successHealing": "boolean"
},
"elementIds": ["string"]
}
{code}
h3. RecordDto
{code:json}
{
"id": "string",
"name": "string",
"time": "string",
"data": [
{
"declaringClass": "string",
"screenShotPath": "string",
"failedLocatorValue": "string",
"failedLocatorType": "string",
"healedLocatorValue": "string",
"healedLocatorType": "string",
"score": "string",
"successHealing": "boolean",
"healingResultId": "number"
}
],
"reportLinks": [
{
"name": "string",
"url": "string"
}
]
}
{code}
h3. LlmDto
{code:json}
{
"id": "string",
"name": "string",
"accessToken": "string",
"isActive": "boolean",
"createdDate": "string"
}
{code}
h3. VcsDto
{code:json}
{
"name": "string",
"accessToken": "string",
"repository": "string",
"branch": "string"
}
{code}
h3. DedicatedInfo
{code:json}
{
"availableForSd": "boolean",
"availableForMr": "boolean"
}
{code}
h3. LocatorPathsDto
{code:json}
{
"selectedPath": "string"
}
{code}