Platform API Fundamentals

This section provides the essential information required to integrate Platform APIs.

Prerequisites

To make requests to the Platform APIs, you need to have the following information:

  • Base URL: The root address for all your API requests.

  • Source: A user identifier for your API requests.

  • Token: Required for API authentication.

To obtain these, contact support@qure.ai.

Making API Requests

Let’s learn how to make requests to the Platform APIs with the help of an example. Here is an example API request using cURL:

curl -X POST \\
-L 'Base_URL/studies/' \\
-H 'Content-Type: multipart/form-data' \\
-H 'Authorization: Token <PASTE_YOUR_TOKEN>' \\
-H 'Source: <PASTE_YOUR_SOURCE>' \\
-H 'User-Agent: <YOUR_USER_AGENT>' \\
-F 'file_0=@"</path/to/your/dicom_file.dcm>"'

This example can be used for understanding how to structure requests, specifically focusing on authentication, necessary headers, and DICOM specifications.

Authentication

Authentication with the Platform APIs are token-based. Ensure that all requests carry the token in the Authorization header as shown below:

'Authorization: Token <PASTE_YOUR_TOKEN>'

To acquire a token, please contact support@qure.ai.

Headers

Requests to the platform APIs must contain the following additional headers:

  1. Source header: User identification is done through the Source header. Ensure that all requests carry the Source header as shown below:

    'Source: <PASTE_YOUR_SOURCE>'
  2. Content-type header: All requests with a payload in the request body (such as POST, PUT, and PATCH calls) must include a Content-Type header.

    Commonly supported values are:

    application/dicom

    multipart/form-data

    multipart/related etc.

    The appropriate Content-Type value should be selected based on the specific requirements of the API you are interacting with.

    The example API request demonstrates the use of multipart/form-data for uploading files:

    -H 'Content-Type: multipart/form-data'

    Note: If a specific Content-Type value is needed for an API, its value will be shown in the example API requests provided.

  3. User-Agent header: The User-Agent header is necessary to identify the client software making the request. Ensure that all requests include an appropriate User-Agent header to avoid potential errors. An example is shown below:

    'User-Agent: <YOUR_USER_AGENT>'

DICOM specifications

Files uploaded to the Platform APIs need to be in the valid DICOM format to ensure compatibility and proper processing. It's important that these files match the specific requirements outlined for each use case, as detailed in the corresponding Platform API Guides. Additionally, the Modality field within the DICOM file's metadata must be populated by your system before the upload. This field, indicating the type of imaging equipment used, plays a key role in how the API processes and interpreting the imaging data.

Understanding API Responses

When you make a request to the Platform APIs, the response includes two key components

  • HTTP Status Code: The HTTP status codes for all responses follow the RFC 9110 standard.

  • JSON Body: The JSON body contains detailed information about the response.

The HTTP status code and structure of the JSON body can differ significantly based on the specific API endpoint you're interacting with. For specific information about the response format for each API, refer to the examples in the Platform API Guides or the API Reference.

Next Steps

For your next steps, consider these resources:

  • Platform API Guides: If you're looking for detailed, integration-specific guidance, the Platform API Guides are an excellent starting point. They offer step-by-step instructions that simplify the integration process.

  • API Reference: If you are eager to get hands-on with the code immediately, the API Reference is an excellent starting point. It provides exhaustive details on API endpoints, including request and response formats, status codes etc.

  • Migrating from Qure Legacy APIs to Qure Platform APIs? Check out our Migrate to Platform API Guide. This guide provides step-by-step instructions and valuable resources to facilitate a smooth migration from the Legacy APIs.

Last updated