#
State vector
Služba zodpovedná za udržiavanie aktuálneho stavu gateway-u.
Udržuje tieto stavy:
state_election
- stav voliebstate_write
- stav zapisovačkystate_register_terminals
- stav registrácie terminálovoffice_id
- ID volebnej miestnostipin
- PIN kód k GUI aplikácii na gataway-iserver_key
- verejný kľúč serveraserver_address
- adresa servera
#
Konfiguračný súbor
Konfiguračný súbor obsahuje celú konfiguráciu volieb pre konkrétnu volebnú miestnosť. Je dostupný ako statický súbor na adrese /statevector/config/config.json
pomocou Nginx.
#
Popis API
#
hello__get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/', headers = headers)
print(r.json())
GET /
Hello
Sample testing endpoint
Example responses
200 Response
{
"message": "string"
}
Responses
Response Schema
#
get_state_election_state_election_get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/state_election', headers = headers)
print(r.json())
GET /state_election
Get State Election
Get election state string 0 or 1
Example responses
200 Response
null
Responses
Response Schema
#
set_state_election_state_election_post
Code samples
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('/gateway/statevector/state_election', headers = headers)
print(r.json())
POST /state_election
Set State Election
Set election state string 0 or 1
Body parameter
"string"
Parameters
Example responses
200 Response
null
Responses
Response Schema
#
get_state_write_state_write_get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/state_write', headers = headers)
print(r.json())
GET /state_write
Get State Write
Get write state string 0 or 1
Example responses
200 Response
null
Responses
Response Schema
#
set_state_write_state_write_post
Code samples
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('/gateway/statevector/state_write', headers = headers)
print(r.json())
POST /state_write
Set State Write
Set write state string 0 or 1
Body parameter
"string"
Parameters
Example responses
200 Response
null
Responses
Response Schema
#
state_register_terminals_state_register_terminals_get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/state_register_terminals', headers = headers)
print(r.json())
GET /state_register_terminals
State Register Terminals
Get terminals registration state string 0 or 1
Example responses
200 Response
null
Responses
Response Schema
#
set_state_register_terminals_state_register_terminals_post
Code samples
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('/gateway/statevector/state_register_terminals', headers = headers)
print(r.json())
POST /state_register_terminals
Set State Register Terminals
Set register terminals state string 0 or 1
Body parameter
"string"
Parameters
Example responses
200 Response
null
Responses
Response Schema
#
get_office_id_office_id_get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/office_id', headers = headers)
print(r.json())
GET /office_id
Get Office Id
Get office id
Example responses
200 Response
null
Responses
Response Schema
#
get_pin_pin_get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/pin', headers = headers)
print(r.json())
GET /pin
Get Pin
Get pin
Example responses
200 Response
null
Responses
Response Schema
#
get_server_key_server_key_get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/server_key', headers = headers)
print(r.json())
GET /server_key
Get Server Key
Get server key
Example responses
200 Response
null
Responses
Response Schema
#
get_server_address_server_address_get
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/gateway/statevector/server_address', headers = headers)
print(r.json())
GET /server_address
Get Server Address
Get server address
Example responses
200 Response
null
Responses
Response Schema
#
Schemas
#
HTTPValidationError
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
HTTPValidationError
#
Properties
#
ValidationError
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
ValidationError