Testing
It is important to test your data and environment before importing data to the live database.
Environments
There are two environments currently in use, the sandbox/dev environment and the live environment.
Sandbox/Dev https://dev.iwdr.org/sandbox/api/v1.php
The sandbox environment is a place to test your data and ensure you are getting the correct responses. The data in this environment is periodically refreshed and updated to reflect the data in the live environment. Any data that is imported in to the sandbox environment and not in the live environment will be deleted when this refresh happens.
The data in this environment will periodically be refreshed and any data not in the live environment will be lost.
Live https://iwdr.org/iwdr/api/v1.php
The live environment contains the real data that has already been tested in the sandbox.
How to Test
Testing requests can be done using any program that can make http requests, Postman, Insomnia, Advanced, etc..., and providing it with your API key.
Examples
<?php
// This example is done using PHP-cURL
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://dev.iwdr.org/sandbox/api/v1.php?table=Elbow&action=insert',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>
'local_dog_id=1234&pt_DogID=1234&pt_DBImportKey=1234&pt_Date=2023-06-20&pt_TraitCodeID=1234&pt_DetailsOfProblem=Test%20data',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
'X-Auth-Token: abcdefg1234567',
'Cookie: runnerSession=abc1234; abcdefg1234567'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;