KO Service Clients

There are several ways to interact with RESTFul KO Services. We have outlined a few tools and methods below. We also have included examples using the Ten-year Fatal Cardiovascular Risk Calculation KO Service KO Service.

Curl

Curl is a command line tool and library for transferring data with URLs. The following are examples of using curl to access the Knowledge Object Implementation and executing the Knowledge Object service.

Get the Ten-year Fatal Cardiovascular Risk Calculation KO Implementation metadata using curl

curl -X GET \
  http://activator.kgrid.org/kos/score/calc/v0.3.0 \
  -H 'Content-Type: application/json'

Executing the Ten-year Fatal Cardiovascular Risk Calculation KO Service using curl

curl -X POST \
  http://activator.kgrid.org/score/calc/v0.3.0/score \
  -H 'Content-Type: application/json' \
  -d '{"age": 48,"gender": "female","risk": "low","sbp": 120,"cholesterol": 8,"smoker": false}'

HTTPie

HTTPie is a command line HTTP client with an intuitive UI, JSON support, syntax highlighting, wget-like downloads, plugins, and more. HTTPie runs on windows, mac, linux, etc. The following are examples of using HTTPie to access the Knowledge Object Implementation and executing the Knowledge Object service.

Get the Ten-year Fatal Cardiovascular Risk Calculation KO Implementation metadata using HTTPie

 http GET http://activator.kgrid.org/kos/score/calc/v0.3.0

Executing the Ten-year Fatal Cardiovascular Risk Calculation KO service using HTTPie

 http POST http://activator.kgrid.org/score/calc/v0.3.0/score age:=48 gender=Female risk=low spb:=120 cholesterol:=8 smoker:=false

Postman

Postman is a powerful tool for performing integration testing with your API. It allows for repeatable, reliable tests that can be automated and used in a variety of environments.

Import Postman Cardiovascular Risk Calculation Collection into Postman. You will see two requests. KO implementation request and KO service. Each request has a set of tests.

MORE TO COME!!!!

Swagger Editor

The Swagger Editor is an open source editor to design, define and document RESTful APIs in the OpenAPI Specification.

MORE TO COME!!!!

Simple web app

MORE TO COME!!!!

Simple batch client

MORE TO COME!!!!

Last Updated: 8/15/2019, 4:26:33 PM