Skip to content

Commit

Permalink
docs: update api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximeZmt authored and PascalinDe committed Oct 15, 2024
1 parent be39b3e commit a85dc7a
Showing 1 changed file with 179 additions and 4 deletions.
183 changes: 179 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# API documentation

_Documentation Last Review: 11.04.2022_
_Documentation Last Review: 27.06.2024_

## Regular workflow:

Expand Down Expand Up @@ -274,7 +274,7 @@ Return:
```

# SC?: Form cancel 🔐
# SC7: Form cancel 🔐

| | |
| ------ | ------------------------- |
Expand All @@ -291,14 +291,15 @@ Return:
Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# SC?: Form delete
# SC8: Form delete

| | |
| ------- | -------------------------- |
Expand All @@ -317,14 +318,15 @@ formID:
Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# SC?: Form infos from all forms
# SC9: Form infos from all forms

| | |
| ------ | ---------------- |
Expand All @@ -349,6 +351,106 @@ Return:
}
```

# SC10: Add an owner to a form 🔐

| | |
| ------ |-----------------------------------|
| URL | `/evoting/form/{formID}/addowner` |
| Method | `POST` |
| Input | `application/json` |
```json
{
"TargetUserID": "<SCIPER>",
"PerformingUserID": "<SCIPER>"
}
```

Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# SC11: Remove an owner from the form 🔐

| | |
|--------|--------------------------------------|
| URL | `/evoting/form/{formID}/removeowner` |
| Method | `POST` |
| Input | `application/json` |
```json
{
"TargetUserID": "<SCIPER>",
"PerformingUserID": "<SCIPER>"
}
```

Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# SC12: Add a voter to the Form 🔐

| | |
| ------ |-----------------------------------|
| URL | `/evoting/form/{formID}/addvoter` |
| Method | `POST` |
| Input | `application/json` |
```json
{
"TargetUserID": "<SCIPER>",
"PerformingUserID": "<SCIPER>"
}
```

Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# SC13: Remove a voter from the Form 🔐

| | |
|--------|--------------------------------------|
| URL | `/evoting/form/{formID}/removevoter` |
| Method | `POST` |
| Input | `application/json` |
```json
{
"TargetUserID": "<SCIPER>",
"PerformingUserID": "<SCIPER>"
}
```

Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# DK1: DKG init 🔐

| | |
Expand Down Expand Up @@ -467,3 +569,76 @@ Status can be:
- 2: transaction not included

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.

# A1: Add an admin to the AdminList 🔐

| | |
| ------ |---------------------|
| URL | `/evoting/addadmin` |
| Method | `POST` |
| Input | `application/json` |
```json
{
"TargetUserID": "<SCIPER>",
"PerformingUserID": "<SCIPER>"
}
```

Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# A2: Remove an admin from the AdminList 🔐

| | |
| ------ |------------------------|
| URL | `/evoting/removeadmin` |
| Method | `POST` |
| Input | `application/json` |

```json
{
"TargetUserID": "<SCIPER>",
"PerformingUserID": "<SCIPER>"
}
```

Return:

`200 OK`

```json
{
"Status": 0,
"Token": "<URL encoded>"
}
```

# A3: Get the AdminList



| | |
| ------ |----------------------|
| URL | `/evoting/adminlist` |
| Method | `GET` |
| Input | |

Return:

`200 OK`

```json
{
SCIPERs List
}
```


0 comments on commit a85dc7a

Please sign in to comment.