Skip to content

Access and Connectivity Testing Example

In order to test access and connectivity to the SMS, GLHs are encouraged to use an API client - the guidance below utilises an application called Postman.

Getting started with Postman

Download Postman

Find the link to download Postman here.

Create an Account and Sign in

Selecting the Free Account option covers the necessary. Remember to use an account you have easy access to as it will send a verification email).

Set to Debugging and Manual Testing

Theme and Panel can be a free choice and skip the next step about team emails.

Disable the SSL Certification Validation

In the headings, go to Postman > Settings > disable SSL Certificates Validation. Following these steps will only disable it only for testing.

Import the collection
  • Import the following Post Man Configuration into your Postman application
  • Within Postman, go to Import > Find downloaded Configuration File > confirm
How should it look?

image Four entries will appear in the sidebar, which cover how to:

  • Get an authentication token
  • Submit a VCF for a sample
  • Check the VCF currently submitted for a referral
  • Delete the submitted VCF for a submitted sample

Testing Access and Connectivity to the SMS

Once Postman is installed and configuration files download, the testing of access and connectivity can begin.

In order to make programmatic calls to the SMS, a GLH will require an authentication token that must be gathered from Active Directory. Each GLH will have a nhs.net account within Active Directory that will enable them to gather the token – these are provided individually to the GLH representatives. Gathering a token must be done via a POST request to active directory.

Select the endpoint

The first step is to select the POST Get Token endpoint in the side bar

Authentication

Next, click on the “Auth” Configuration Tab * Ensure the “Basic Authentication” menu option is chosen * Enter specific GLH username and password as provided

Body of the request

Click on the “Body” Configuration Tab. Make sure “client_id” has the value of username as provided Click “Send”.

Response

The call should work and provide a response which will include a value for “access_token”. You will need to copy the very long alphanumeric string for the next stages – do not copy the speech marks.

Before starting this section, you will need the VCF file you intend to submit. Once you have that:

Select the endpoint

The first step is to select the PUT Sample in the side bar.

Authentication

Go to the “Auth” config tab and make sure the “Bearer Token” option is chosen. Then, paste into the box the value of “access_token” as copied in Gathering the Access Token.section.

Body of the request

From to the “Body” config tab, make sure the “raw” radio button is selected. After, paste in content from the VCF file you intend to submit.

URL of the request

Before sending the request, you should update the URL with the desired information which will be “[BaseURL]/sample_vcf/referral_id/patient_id/dispatched_sample_lsid”. Note that during test dummy values can be used without issue.

Base URLs
  • Base URLs in the configuration files provided are correct for GMS only. You will need to update the base URLs as per the Environment Access Guide if you want to use the configuration files.

  • The body of the PUT config file provided is a VCF that is expected to submit successfully. In order to do a proper test of your systems, please substitute the provided VCF content for some generated from your processes.

Response

A successful call will return a response which confirms that success and shows the referral_id, patient_id, and dispatched_sample_lsid.

This call will enable you to confirm the VCF stored for a particular referral:

Select the endpoint

Click on the “GET Sample” endpoint config in the side bar.

Authentication

FROM the “Auth” config tab, Make sure the “Bearer Token” option is chosen. Then, paste into the box the value of “access_token” as copied in Gathering the Access Token section.

URL of the request

Before sending the request, you should update the URL with the desired information which will be “[….]/sample_vcf/referral_id/patient_id/dispatched_sample_lsid”. Note that during test dummy values can be used without issue.

Response

A successful call will return a response which confirms that success and shows the referral_id, patient_id, and dispatched_sample_lsid

Example SMS API specification

You can download the SMS API specification here


Last update: 2023-01-04
Back to top