Introduction to REST APIs

The videos below look at: what is an API?

Exercise

List the types of bodies that might want to access hospital data via an API. Think about the types of organisations that interact with a hospital and might need information from the hospitals computer systems.

list_the_types_of_bodies_that_might_want_to_access_hospital_data.pdf

Exercise

What commands would you send to request, create, update and delete this record:

http://ABC-hospital.nhs/patient/JaneBrown

Assume there is no authorisation key needed. For the create and update answers, don't worry about the specific information you'd be creating updating.

(You will have four answers)

The answers are contained in the PDF below.

The videos below look at:

How REST APIs work

Answer - What commands .pdf

Exercise: What commands would you send to request, create, update and delete this record:

http://ABC-hospital.nhs/patient/JaneBrown

Assume there is no authorisation key needed

(You will have four answers)

Exercise:

From the YAML code at the end of the video, can you identify

  • The resource
  • Any methods
  • The description of the resource
  • Any parameters and their type

The answer is at the start of the next video.

Exercise:

From the YAML code, can you create a Help topic describing the Operations resource?


/operations:

get:

summary: Types of operations

description: |

The Operations endpoint returns information about the types of operations offered at a given location. The response includes the display name

and other details about each operation, and lists the operation types in the proper display order.

parameters:

- name: operationname

in: query

description: The medical name of the operation.

required: true

type: string

- name: operationduration

in: query

description: The standard duration for the operation of this type.

required: true

type: number


The PDF below contains the question and a model answer

can_you_create_a_help_topic_describing_the_operations_resource.pdf