Endpoints
Lists available endpoints for the client
Session
Create a session
POST
http://localhost:8080/session/new
This endpoint allows you to create a session
Query Parameters
Name | Type | Description |
---|---|---|
voters | number | Planed number of voters |
name | string | The name of the session. |
Change a session
PUT
http://localhost:8080/session/update
This endpoint allows you to change the name of the session.
Query Parameters
Name | Type | Description |
---|---|---|
name | string | The new name of the session |
id | string | Id of the session to change |
Start a session
POST
http://localhost:8080/session/start
This endpoint allows you to start a session
Query Parameters
Name | Type | Description |
---|---|---|
id | string | The id of the session to start |
Close a session
POST
http://localhost:8080/session/close
This endpoint allows you to close an open session
Query Parameters
Name | Type | Description |
---|---|---|
id | string | The id of the session to close |
Get all sessions
GET
http://localhost:8080/session
This endpoint allows you to get all sessions
Get a session
GET
http://localhost:8080/session/:id
This endpoint allows you to get a specific session
Path Parameters
Name | Type | Description |
---|---|---|
id | string | The id of the session |
Question
Create a question
POST
http://localhost:8080/question/new
This endpoint allows you to create a new question
Query Parameters
Name | Type | Description |
---|---|---|
session | string | id of session, where this question belongs to |
sentense | string | The question to ask |
Change a question
PUT
http://localhost:8080/question/update
This endpoint allows you to update a question
Query Parameters
Name | Type | Description |
---|---|---|
sentense | string | The new question |
id | string | The id of the question |
Start a vote
POST
http://localhost:8080/question/startVote
This endpoint allows to open the vote for a question
Query Parameters
Name | Type | Description |
---|---|---|
id | string | The id of the question |
Close a vote
POST
http://localhost:8080/question/closeVote
This endpoint allows you to close an open vote
Query Parameters
Name | Type | Description |
---|---|---|
id | string | id of the question |
Vote a question
POST
http://localhost:8080/question/vote
This endpoint allows you to vote a question
Query Parameters
Name | Type | Description |
---|---|---|
user | string | user id of the voter |
decision | string | Yes or No or NoIdea |
question | string | The id of the to voted question |
Get a question
GET
http://localhost:8080/question/:question
This method allows you to request a question by its id
Path Parameters
Name | Type | Description |
---|---|---|
question | string | id of the question |
Get all questions of a session
GET
http://localhost:8080/question/:session
This endpoint allows you to request all questions of a specific session
Path Parameters
Name | Type | Description |
---|---|---|
session | string | id of the session containing the questions |
Last updated