Our web API is implemented using REST (an architectural style of interaction between components of a distributed application on the network) and the JSON-RPC protocol.
URL: https://fptest.ru/rest
Request Method: POST
To call a remote procedure, the client needs to make a “REST request” to our server and transfer the data in the JSON format of the object with three required properties:
• method - a string with the name of the called method;
• params - an array of data that should be passed to the method as parameters;
• id - value of any type to establish correspondence between request and response.
In response, the server will send the result of the remote procedure in the JSON format of the object with three required properties:
• result - data that the method returned or null if an error occurred;
• error - error code if an error occurred during the execution of the method, otherwise null;
• id - the same value as in the request to which this response belongs.
methodmethod: "fibrosis_1.0" - determination of the probability of a patient having stage 3-4 liver fibrosis according to the Metavir scale.
method: "activity_1.0" - determination of the probability of a patient having moderate or severe chronic hepatitis activity according to the Knodell scale.
paramsAll methods take an array of 8 parameters: patient’s age (years), patient’s gender (1 - male, 2 - female), patient’s height (cm), patient’s weight (kg), platelet count (10⁹ / l), level ALT (U / L), AST level (U / L), GGT level (U / L).
Example: params: [35, 1, 185, 85, 240, 24, 20, 15]
resultThe result object contains two properties:
• output - a number from 0 to 1, the probability of a patient being diagnosed;
• cutOffValue - cut-off value.