Voting (votings)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new vote
Request
Field Description: selector’s voting entity
POST /rest/v1/uc/selectors/2c51f8a2-016d-5d72-d44a-50e54938780c/votings HTTP/1.1
Content-Type: application/json; charset=utf-8
selector’s voting entity
Response
Field Description: selector’s voting entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "7f50172f-016d-6263-9795-50e54938780c",
"name": "Vote 1",
"subject": "Question on setting a date for the strategy session: 12.10.2019",
"cases": {
"0": "Opposed",
"1": "To",
"2": "Abstaining"
}
}
Getting the list of votes
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, name, result, state,. |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/selectors/2c51f8a2-016d-5d72-d44a-50e54938780c/votings?mask=id,state HTTP/1.1
Response
Field Description: selector’s voting entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "7f50172f-016d-6263-9795-50e54938780c",
"name": "Vote 1",
"subject": "Question on setting a date for the strategy session: 12.10.2019",
"state": "inited"
},
{
"id": "a6247b8e-016d-6263-2fbc-50e54938780c",
"name": "Vote 2",
"subject": "The question of choosing a new system",
"state": "inited"
}
]
Obtaining voting data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/selectors/2c51f8a2-016d-5d72-d44a-50e54938780c/votings/a6247b8e-016d-6263-2fbc-50e54938780c HTTP/1.1
Response
Field Description: selector’s voting entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "7f50172f-016d-6263-9795-50e54938780c",
"name": "Vote 1",
"subject": "Question on setting a date for the strategy session: 12.10.2019",
"state": "closed",
"cases": {
"0": "Opposed",
"1": "To",
"2": "Abstaining"
},
"results": {
"83d41cb6-016d-5d75-6341-50e54938780c": "2"
}
}
Changing voting data
Fields prohibited for modification: id
Request
Field Description: selector’s voting entity
PATCH rest/v1/uc/selectors/2c51f8a2-016d-5d72-d44a-50e54938780c/votings/a6247b8e-016d-6263-2fbc-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
selector’s voting entity
Response
Field Description: selector’s voting entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "7f50172f-016d-6263-9795-50e54938780c",
"name": "Vote 1",
"subject": "Question on setting a date for the strategy session: 12.10.2019",
"state": "inited",
"cases": {
"0": "Opposed",
"1": "To",
"2": "Abstaining"
},
"results": {}
}
Related Composite Resources
-
Parent: selectors meetings