Skip to content

Commit a85dc7a

Browse files
MaximeZmtPascalinDe
authored andcommitted
docs: update api.md
1 parent be39b3e commit a85dc7a

File tree

1 file changed

+179
-4
lines changed

1 file changed

+179
-4
lines changed

Diff for: docs/api.md

+179-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API documentation
22

3-
_Documentation Last Review: 11.04.2022_
3+
_Documentation Last Review: 27.06.2024_
44

55
## Regular workflow:
66

@@ -274,7 +274,7 @@ Return:
274274
275275
```
276276

277-
# SC?: Form cancel 🔐
277+
# SC7: Form cancel 🔐
278278

279279
| | |
280280
| ------ | ------------------------- |
@@ -291,14 +291,15 @@ Return:
291291
Return:
292292

293293
`200 OK`
294+
294295
```json
295296
{
296297
"Status": 0,
297298
"Token": "<URL encoded>"
298299
}
299300
```
300301

301-
# SC?: Form delete
302+
# SC8: Form delete
302303

303304
| | |
304305
| ------- | -------------------------- |
@@ -317,14 +318,15 @@ formID:
317318
Return:
318319

319320
`200 OK`
321+
320322
```json
321323
{
322324
"Status": 0,
323325
"Token": "<URL encoded>"
324326
}
325327
```
326328

327-
# SC?: Form infos from all forms
329+
# SC9: Form infos from all forms
328330

329331
| | |
330332
| ------ | ---------------- |
@@ -349,6 +351,106 @@ Return:
349351
}
350352
```
351353

354+
# SC10: Add an owner to a form 🔐
355+
356+
| | |
357+
| ------ |-----------------------------------|
358+
| URL | `/evoting/form/{formID}/addowner` |
359+
| Method | `POST` |
360+
| Input | `application/json` |
361+
```json
362+
{
363+
"TargetUserID": "<SCIPER>",
364+
"PerformingUserID": "<SCIPER>"
365+
}
366+
```
367+
368+
Return:
369+
370+
`200 OK`
371+
372+
```json
373+
{
374+
"Status": 0,
375+
"Token": "<URL encoded>"
376+
}
377+
```
378+
379+
# SC11: Remove an owner from the form 🔐
380+
381+
| | |
382+
|--------|--------------------------------------|
383+
| URL | `/evoting/form/{formID}/removeowner` |
384+
| Method | `POST` |
385+
| Input | `application/json` |
386+
```json
387+
{
388+
"TargetUserID": "<SCIPER>",
389+
"PerformingUserID": "<SCIPER>"
390+
}
391+
```
392+
393+
Return:
394+
395+
`200 OK`
396+
397+
```json
398+
{
399+
"Status": 0,
400+
"Token": "<URL encoded>"
401+
}
402+
```
403+
404+
# SC12: Add a voter to the Form 🔐
405+
406+
| | |
407+
| ------ |-----------------------------------|
408+
| URL | `/evoting/form/{formID}/addvoter` |
409+
| Method | `POST` |
410+
| Input | `application/json` |
411+
```json
412+
{
413+
"TargetUserID": "<SCIPER>",
414+
"PerformingUserID": "<SCIPER>"
415+
}
416+
```
417+
418+
Return:
419+
420+
`200 OK`
421+
422+
```json
423+
{
424+
"Status": 0,
425+
"Token": "<URL encoded>"
426+
}
427+
```
428+
429+
# SC13: Remove a voter from the Form 🔐
430+
431+
| | |
432+
|--------|--------------------------------------|
433+
| URL | `/evoting/form/{formID}/removevoter` |
434+
| Method | `POST` |
435+
| Input | `application/json` |
436+
```json
437+
{
438+
"TargetUserID": "<SCIPER>",
439+
"PerformingUserID": "<SCIPER>"
440+
}
441+
```
442+
443+
Return:
444+
445+
`200 OK`
446+
447+
```json
448+
{
449+
"Status": 0,
450+
"Token": "<URL encoded>"
451+
}
452+
```
453+
352454
# DK1: DKG init 🔐
353455

354456
| | |
@@ -467,3 +569,76 @@ Status can be:
467569
- 2: transaction not included
468570

469571
The token is an updated version of the token in the URL that can be used to check again the status of the transaction if it is not yet included.
572+
573+
# A1: Add an admin to the AdminList 🔐
574+
575+
| | |
576+
| ------ |---------------------|
577+
| URL | `/evoting/addadmin` |
578+
| Method | `POST` |
579+
| Input | `application/json` |
580+
```json
581+
{
582+
"TargetUserID": "<SCIPER>",
583+
"PerformingUserID": "<SCIPER>"
584+
}
585+
```
586+
587+
Return:
588+
589+
`200 OK`
590+
591+
```json
592+
{
593+
"Status": 0,
594+
"Token": "<URL encoded>"
595+
}
596+
```
597+
598+
# A2: Remove an admin from the AdminList 🔐
599+
600+
| | |
601+
| ------ |------------------------|
602+
| URL | `/evoting/removeadmin` |
603+
| Method | `POST` |
604+
| Input | `application/json` |
605+
606+
```json
607+
{
608+
"TargetUserID": "<SCIPER>",
609+
"PerformingUserID": "<SCIPER>"
610+
}
611+
```
612+
613+
Return:
614+
615+
`200 OK`
616+
617+
```json
618+
{
619+
"Status": 0,
620+
"Token": "<URL encoded>"
621+
}
622+
```
623+
624+
# A3: Get the AdminList
625+
626+
627+
628+
| | |
629+
| ------ |----------------------|
630+
| URL | `/evoting/adminlist` |
631+
| Method | `GET` |
632+
| Input | |
633+
634+
Return:
635+
636+
`200 OK`
637+
638+
```json
639+
{
640+
SCIPERs List
641+
}
642+
```
643+
644+

0 commit comments

Comments
 (0)