Difference between revisions of "API Documentation"

From TMS Support Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
This documentation explains the various methods that can be called on the Application Programming Interface (API) that is exposed by the Prescription Tracking Application (PTS5).  
PTS 5 includes a self-documenting application programming interface (API).


The PTS5 API is an HTTP REST API. Examples using JSON format will be provided throughout the documentation.
The PTS 5 API is an HTTP REST API and implements the open source Swagger UI API self-documenting tool. The documentation can be accessed by simply appending /swagger to the end of your PTS URL, e.g.: <strong><nowiki>http://YourPTSServer/PTSWeb/swagger</nowiki></strong>. This will not only reflect the exact version of PTS you have installed but will allow you to test the API with your own data.
=Accessing the API=
The API can be accessed at the following endpoints:


{| class="wikitable"
The Swagger implementation for our live PTS 5 demo, which is constantly updated to the latest version, can be found here: http://prescriptiontracking.co.uk/swagger
|-
|Methods relating to Prescriptions
|<nowiki>http://ptsservername/PTSWeb/api/Prescriptions</nowiki>
|-
|Methods relating to Events (activities recorded against prescriptions)
|<nowiki>http://ptsservername/PTSWeb/api/Events</nowiki>
|-
|Methods relating to Notes
|<nowiki>http://ptsservername/PTSWeb/api/Notes</nowiki>
|-
|Methods relating to Users
|<nowiki>http://ptsservername/PTSWeb/api/Users</nowiki>
|-}


“ptsservername” will need to be replaced by the name of the server that is hosting PTS5.
An evolving list of example API calls in JQuery can be found here: http://prescriptiontracking.co.uk/apiexamples.aspx
<br/><br/>
“PTSWeb” is the default path for installations. This may be different for your installation.
<br/><br/>
By default, only API calls that return patient identifiable data will expect any credentials to be passed. These credentials form a username and password that are sent in the GET request query string. To secure these credentials it is recommended that the PTS application is accessed via HTTPS.

Latest revision as of 10:49, 26 September 2022

PTS 5 includes a self-documenting application programming interface (API).

The PTS 5 API is an HTTP REST API and implements the open source Swagger UI API self-documenting tool. The documentation can be accessed by simply appending /swagger to the end of your PTS URL, e.g.: http://YourPTSServer/PTSWeb/swagger. This will not only reflect the exact version of PTS you have installed but will allow you to test the API with your own data.

The Swagger implementation for our live PTS 5 demo, which is constantly updated to the latest version, can be found here: http://prescriptiontracking.co.uk/swagger

An evolving list of example API calls in JQuery can be found here: http://prescriptiontracking.co.uk/apiexamples.aspx