Skip to content

Dummy Upload API

This article is designed to show you the workflow for Dummy Application API. Below the diagram you will find the high-level steps to work with API.

Refer to our Dummy API reference documentation for more details.

Workflow in steps

Our APIs use the OAuth2.0 Client Credentials workflow. See the steps below:

  1. Generate Bearer Token. Ensure:

    • the <your_client_secret> is URL encoded. You can use urlencoder.org to URL encode the client secret.
    • the <your_client_id>:<your_url_encoded_client_secret> string is base64 encoded
    • the content-type is x-www-form-urlencoded
    • the grant-type is client_credentials
    • the scope is dummy_upload_api

      Manually encoding?

      Use base64encode.org to encode or decode the string of <Your_ClientID>:<Your_URL_Encoded_ClientSecret>.

      5471E010-DDEE-4C98-FF8F-08DB2245E373:7rg6Gt+hUiobtXI9Jb37z2vtrhw1CEgDkwFZcMbN5Yc=
      
      NTQ3MUUwMTAtRERFRS00Qzk4LUZGOEYtMDhEQjIyNDVFMzczOjdyZzZHdCtoVWlvYnRYSTlKYjM3ejJ2dHJodzFDRWdEa3dGWmNNYk41WWM9
      
      Basic NTQ3MUUwMTAtRERFRS00Qzk4LUZGOEYtMDhEQjIyNDVFMzczOjdyZzZHdCtoVWlvYnRYSTlKYjM3ejJ2dHJodzFDRWdEa3dGWmNNYk41WWM9
      
  2. Use the generated token for Bearer authorization in /UploadData endpoint. Generate dummy token to get results. Ensure:

    • the mandatory fields are filled.
    • the Data field is populated in the correct order.

  3. Use the dummy token with /GetResults endpoint to fetch the status of upload. Ensure:
    • correct bearer token is being used for authorization.
    • roster token is correct

  4. If the status is not completedsuccessfully, set the value of dataKey parameter to feedback and submit.
    • Resolve any error.
    • Return to Step 2. Keep the Name same and set the value of Overwrite field to true and resubmit the data.

  5. If the status is completedsuccessfully, set the value of dataKey parameter to the type of result you want to receive and submit.

Payload

Request payload

The request payloads differ for UploadData and GetResults endpoint.

For Upload Roster

Download files

Download example files for Data csv and ActivitiyData csv here.

See our API reference documentation for more information.

Schema
Namestring Required

A name for the data.

Datastring Required

See the table below for the format of the data. Note:

  • This property takes comma separated values (csv).
  • The data must be in the same order as shown below.
  • You can omit the column titles. In such a case, the order in which the column titles are listed below will be assumed.
  • You can send multiple rows at a time.
  • You can fill in the required columns and delete the others.
  • If you are sending the data to a column that is not required, you must send all columns. The columns without data can be left blank.


ColumnName
(+ required)
Format Description
Reference+ Text A free-text field usually used to indicate a pilot. Use pilot's name or ID.
DummyDutyDate+ Date (DD/MM/YYYY) The Dummy start date.
DummyDutyTime+ Time (hh:mm) The Dummy start time.
DummyDutyDate+ Date (DD/MM/YYYY) The Dummy end date.
DummyDutyTime+ Time (hh:mm) The Dummy end time.

ActivityDatastring

See the table below for the format of the data. Note:

  • This property takes comma separated values (csv).
  • The activity data must be in the same order as shown below.
  • You can omit the column titles. In such a case, the order in which the column titles are listed below will be assumed.
  • You can send multiple rows at a time.


ColumnName
(+ required)
Format Description
Reference+ Text A free-text field usually used to indicate a Activity. Use Doctors's name or ID.
DummyStartDate+ Date (DD/MM/YYYY) The dummy activity start date.
DummyStartTime+ Time (hh:mm) The activity start time.
DummyEndDate+ Date (DD/MM/YYYY) The activity end date.
DummyEndTime+ Time (hh:mm) The activity end time.
Description+ Text A free text field to explain the activity.
TimeReference+ Number (0-2) Send
  • 0 for UTC
  • 1 for Base
  • 2 for Local

Usernamestring

Your Client ID key. You can get the Client ID key from the app.

Keystring Required

Your API key. You can get the API key from the app.

Overwriteboolean string

Send true if existing schedule with the same name should be overwritten by this upload

Example
{
  "Name": "Sample 1",
  "Data": "Reference,DummyDutyDate,DummyDutyTime,DummyDutyDate,DummyDutyTime\r\nDoctor1,12/05/2010,19:45,13/05/2010,04:07",
  "ActivityData": "Reference,DummyStartDate,DummyStartTime,DummyEndDate,DummyEndTime,Description,TimeReference\r\nDoctor1,12/05/2010,19:46,12/05/2010,19:50,Free text,0",
  "Username": "5471E010-DDEE-4C98-FF8F-08DB2245E372",
  "Key": "90CBF21C-33D4-4C32-944A-22A0C416DF89",
  "Overwrite": "false"
}

For Get Results

The GetResults endpoint doesn't require a request payload. However, you must send values to the following parameters.

Schema
Parameter Description
token The token you received after successfully uploading a data
dataKey The type of results you want to retrieve. The following values are supported for the dataKey parameter. Send only one value at a time.
  • status
  • feedback
  • tableofdataids
To check the algorithmic results, first set the value of the dataKey parameter to status and check for the response. After the response is completedsuccessfully, start querying for the algorithmic results.
key Your API Key

Response payload

See below for an example. See our API reference documentation for more information.

For Upload Roster

9e529abf-6b2f-4a17-92de-d1cfc85976db

For Get Results

Explore the tabs below for example response that you could receive on using different values for dataKey parameter.

completedsuccessfully
Data import and process was successful timezone 59
137267,137268