Send Requests

Use these guidelines when sending requests using the Global Pathogen Analysis Service (GPAS) REST API.

URL Structure

Here's the URL structure for the requests:

https://portal.gpas.ox.ac.uk/ords/gpas_pub/gpasapi/<resource-path>

Where:

<resource-path> is the relative path that defines the resource. For example:

/get_sample_detail

Supported Methods

You can perform basic CRUD operations (create, read, update, and delete) on a resource by using standard HTTP method requests, as summarized in the following table.

HTTP Method Description
GET Retrieve information about the GPAS resource.
POST Create the GPAS resource.

Media Types

The following media types are supported by the GPAS REST API:

  • text/plain

  • application/json

  • application/zip

Supported Headers

The GPAS REST API supports the following headers that may be passed in the header section of the HTTP request or response.

Header Description Example
Accept-Encoding List of acceptable encodings to support compression. Accept-Encoding: gzip
Content-Encoding List of acceptable encodings to support compression. Content-Encoding: deflate
Content-Type Media type of the body of the request. Required for POST and PUT requests. Content-Type: application/json
X-ID-TENANT-NAME Identity domain name of the <product name>, used for authentication. X-ID-TENANT-NAME:ExampleIdentityDomain

Compression

Use compression on the GPAS REST resource request and response for improved performance. To use compression, include one of the following HTTP headers in the request: Accept-Encoding or Content-Encoding.