Queries for the Semble API

Information on querying the Semble API

Jessica Magri avatar
Written by Jessica Magri
Updated over a week ago

This article is for software developers and IT admins who want to integrate the Semble Public API into their own systems. Our updated API query list can be found here.

Before you attempt to perform a query, make sure you have signed into the Semble API.

From this article, you can directly go to our updated list of queries, or see below for information about queries:


About Queries

In GraphQL (GQL), a query is a server request that reads and retrieves data.

Every query has a root field, and then anything that follows is called the payload. You can request more data from the query by adding fields to the payload. You can then further customise this data, by specifying arguments within any field or nested object, meaning that you can retrieve the exact data you want in a single request.

Here is an example of a simple query that you could use to retrieve patient data from bookings made within a specified six month period:

You can perform more complex queries with as many fields and arguments as you want. It is also possible to query nested information that can be fully customised with arguments and fields.

To learn more about queries, you can visit the official GQL website here.


Tips for querying

There are two things that you must do to perform a successful GraphQL (GQL) query:

  • Define the arguments: As mentioned above, arguments are what allow you to specify the precise data you want from a query

  • Define the output: The output is the data you want to receive from the query

Some things to remember when coding a query:

  • Always open and close your query, and the payload with {curly brackets}

  • Take note of the required arguments used for certain queries. Required arguments and types are marked by an exclamation mark in the schema
    - For example: DateRange!

Did this answer your question?