Rest API description¶
Report responses¶
Report responses can be saved in csv format.
General¶
Version of TransactionDb Rest Server¶
-
GET
/version
Version of TransactionDb Rest Server
Returns the version of TransactionDb Rest Server.
Status Codes: - 200 OK – Success
- 500 Internal Server Error – Internal error. Please see Error Codes section for detailed information.
200 Response schema:
string
Example response:
HTTP/1.1 200 OK Content-Type: text/plain Aware KnomiTransactionDb Library, version x.x.x.x
500 Response schema:
Name Type Description error object Error object code integer Error code description string Error description Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain { "error": { "code": 1, "description": "string" } }
Transaction report for a specific server¶
-
GET
/serverReport/{server}/{year}/{month}
Transaction report for a specific server
Returns the trancastion report for a sepcific server with optional year and month parameters.
Parameters: - server (string) – Server name
- year (integer) – Optional year filter
- month (integer) – Optional month filter
Status Codes: - 200 OK – Success
- 400 Bad Request – The request is not valid
- 500 Internal Server Error – Internal error. Please see Error Codes section for detailed information.
Example response:
HTTP/1.1 200 OK Content-Type: text/csv server_name,year,month,endpoint,counter aw_nexa_face_rest_server,2021,7,encounterList,2 aw_nexa_face_rest_server,2021,7,maxEncounters,7 aw_nexa_face_rest_server,2021,8,identifyPartial,1 aw_nexa_face_rest_server,2021,8,encounterList,3 aw_nexa_face_rest_server,2022,1,add,20 aw_nexa_face_rest_server,2022,2,update,20
400 Response schema:
Name Type Description error object code integer Error code Values: -1 (Unknown Error), -2 (Invalid Input JSON), -3 (Missing Mandatory Field), -4 (Field Has Wrong Type), -5 (Invalid Base64 String), -6 (Invalid Value) description string Error description Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "error": { "code": -2, "description": "Request was not valid JSON." } }
500 Response schema:
Name Type Description error object Error object code integer Error code description string Error description Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain { "error": { "code": 1, "description": "string" } }
Transaction report for all servers¶
-
GET
/fullReport/{year}/{month}
Transaction report for all servers
Returns the trancastion report for all servers with optional year and month parameters.
Parameters: - year (integer) – Optional year filter
- month (integer) – Optional month filter
Status Codes: - 200 OK – Success
- 400 Bad Request – The request is not valid
- 500 Internal Server Error – Internal error. Please see Error Codes section for detailed information.
Example response:
HTTP/1.1 200 OK Content-Type: text/csv server_name,year,month,endpoint,counter aw_nexa_face_rest_server,2021,7,encounterList,2 aw_nexa_face_rest_server,2021,7,maxEncounters,7 aw_nexa_face_rest_server,2021,8,identifyPartial,1 aw_nexa_face_rest_server,2021,8,encounterList,3 aw_nexa_voice_rest_server,2021,8,identify,9 aw_nexa_face_rest_server,2022,1,add,20 aw_nexa_voice_rest_server,2021,1,update,8 aw_nexa_face_rest_server,2022,2,update,20
400 Response schema:
Name Type Description error object code integer Error code Values: -1 (Unknown Error), -2 (Invalid Input JSON), -3 (Missing Mandatory Field), -4 (Field Has Wrong Type), -5 (Invalid Base64 String), -6 (Invalid Value) description string Error description Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "error": { "code": -2, "description": "Request was not valid JSON." } }
500 Response schema:
Name Type Description error object Error object code integer Error code description string Error description Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain { "error": { "code": 1, "description": "string" } }
Reset trancastion db data for a specific server¶
-
POST
/reset/{server}/{year}/{month}
Reset trancastion db data for a specific server
Resets the trancastion db data for a sepcific server with optional year and month parameters.
Parameters: - server (string) – Server name
- year (integer) – Optional year filter
- month (integer) – Optional month filter
Request schema:
Name Type Description confirm integer Confirmation of reset Example request:
POST /reset/{server}/{year}/{month} HTTP/1.1 Host: example.com Content-Type: text/plain { "confirm": 1 }
Status Codes: - 204 No Content – Success
- 400 Bad Request – The request is not valid
- 500 Internal Server Error – Internal error. Please see Error Codes section for detailed information.
400 Response schema:
Name Type Description error object code integer Error code Values: -1 (Unknown Error), -2 (Invalid Input JSON), -3 (Missing Mandatory Field), -4 (Field Has Wrong Type), -5 (Invalid Base64 String), -6 (Invalid Value) description string Error description Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "error": { "code": -2, "description": "Request was not valid JSON." } }
500 Response schema:
Name Type Description error object Error object code integer Error code description string Error description Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain { "error": { "code": 1, "description": "string" } }
Shut down the TransactionDb Rest Server.¶
-
POST
/shutdown
Shut down the TransactionDb Rest Server.
Shut down the TransactionDb Rest Server.
Request schema:
Name Type Description confirm integer Confirmation of reset Example request:
POST /shutdown HTTP/1.1 Host: example.com Content-Type: text/plain { "confirm": 1 }
Status Codes: - 204 No Content – Success
- 400 Bad Request – The request is not valid
- 500 Internal Server Error – Internal error. Please see Error Codes section for detailed information.
400 Response schema:
Name Type Description error object code integer Error code Values: -1 (Unknown Error), -2 (Invalid Input JSON), -3 (Missing Mandatory Field), -4 (Field Has Wrong Type), -5 (Invalid Base64 String), -6 (Invalid Value) description string Error description Example response:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "error": { "code": -2, "description": "Request was not valid JSON." } }
500 Response schema:
Name Type Description error object Error object code integer Error code description string Error description Example response:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain { "error": { "code": 1, "description": "string" } }