Votings (votings)
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new voting
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 about setting a date for the strategic session: 10/12/2019",
"cases": {
"0": "Against",
"1": "For",
"2": "I abstain"
}
}
Getting the list of votings
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 output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
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 about setting a date for the strategic session: 10/12/2019",
"state": "inited"
},
{
"id": "a6247b8e-016d-6263-2fbc-50e54938780c",
"name": "Vote 2",
"subject": "Question about choosing a new system",
"state": "inited"
}
]
Getting voting data
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
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 about setting a date for the strategic session: 10/12/2019",
"state": "closed",
"cases": {
"0": "Against",
"1": "For",
"2": "I abstain"
},
"results": {
"83d41cb6-016d-5d75-6341-50e54938780c": "2",
"83d41cb6-016d-5d75-6341-50e54938780c": "2"
}
}
Modifying 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 about setting a date for the strategic session: 10/12/2019",
"state": "inited",
"cases": {
"0": "Against",
"1": "For",
"2": "I abstain"
},
"results": {}
}
Related composite resources
-
Parent: Selector meetings