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:
-
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
isx-www-form-urlencoded
- the
grant-type
isclient_credentials
-
the
scope
isdummy_upload_api
Manually encoding?
Use base64encode.org to encode or decode the string of
<Your_ClientID>:<Your_URL_Encoded_ClientSecret>
.
- the
-
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.
- 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
- If the status is not
completedsuccessfully
, set the value ofdataKey
parameter tofeedback
and submit.- Resolve any error.
- Return to Step 2. Keep the
Name
same and set the value ofOverwrite
field totrue
and resubmit the data.
- If the status is
completedsuccessfully
, set the value ofdataKey
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
|
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.
|
key | Your API Key |
Response payload
See below for an example. See our API reference documentation for more information.
For Upload Roster
For Get Results
Explore the tabs below for example response that you could receive on using different values for dataKey
parameter.