Test API here ⬇️

API/SaveCoords.ashx

text/plain

Send latitude, longitude to DB by current user for the current date and time

SAMPLE
https://track.sau.app/API/SaveCoords.ashx?userid=1&runid=1&timestamp=2024-08-19T20:46:13.4567&longitude=103.85116527785958&latitude=1.2793893917676686
PARAMS
useridIntUser Id as it was saved to DB
runidBigintUnique Id of current run launch
timestampDateTimeCurrent date and time in format yyyy-MM-ddTHH:mm:ss.fff
longitudeDecimalLongitude of current coordination with 14 decimal places
latitudeDecimalLatitude of current coordination with 14 decimal places
TEST
REQUEST:


CODE:
using (var httpClient = new HttpClient())
{
    var res = httpClient.GetAsync(RequestCoordURL.Text).Result;
}
                        
RESPONSE:

API/GetAllRuns.ashx

application/json

Return all runs by current user

SAMPLE
https://track.sau.app/API/GetAllRuns.ashx?userid=1
PARAMS
useridIntUser Id as it was saved to DB
RESPONSE
runidBigintUnique Id of current run launch
startDateTimeThe earliest date in saved coords by current RunId
finishDateTimeThe latest date in saved coords by current RunId
{
    Runs: [
        { RunId: 1, Start: '2024-08-19T22:00:00.149', Finish: '2024-08-19T22:17:55.419' },
        { RunId: 1, Start: '2024-08-20T08:00:05.111', Finish: '2024-08-20T08:30:57.011' }
    ]
}

                        
TEST
REQUEST:


CODE:
using (var httpClient = new HttpClient())
{
    var res = httpClient.PostAsync(RequestRunsURL.Text, null).Result;
    string resJSON = res.Content.ReadAsStringAsync().Result;
}
                        
RESPONSE:

API/GetRunById.ashx

application/json

Return main data and all the coords about current run

SAMPLE
https://track.sau.app/API/GetRunById.ashx?userid=1&runid=1
PARAMS
useridIntUser Id as it was saved to DB
runidBigintId of current run
RESPONSE
runidBigintUnique Id of current run launch
startDateTimeThe earliest date in saved coords by current RunId
finishDateTimeThe latest date in saved coords by current RunId
timestampDateTimeSaved date and time of the point in format yyyy-MM-ddTHH:mm:ss.fff
longitudeDecimalSaved point's longitude
latitudeDecimalSaved point's latitude
[
    {
        "RunId":1,
        "Start":"2024-08-19T21:44:22.497",
        "Finish":"2024-08-19T21:44:32.497",
        "Coordinates":[
            {"TimeStamp":"2024-08-19T21:44:22.497", "Longitude":0.00, "Latitude":0.00},
            {"TimeStamp":"2024-08-19T21:44:27.497", "Longitude":0.00, "Latitude":0.00},
            {"TimeStamp":"2024-08-19T21:44:32.497", "Longitude":0.00, "Latitude":0.00}
        ]
    }
]

                        
TEST
REQUEST:


CODE:
using (var httpClient = new HttpClient())
{
    var res = httpClient.PostAsync(RequestOneRunURL.Text, null).Result;
    string resJSON = res.Content.ReadAsStringAsync().Result;
}
                        
RESPONSE: