Get device passings by datetime
Gets the list of passings from the timing device from a given datetime to another.
With this method you can navigate trough the passings of a device without the need to know the timing session (token_session) they belong to. So you can reach passings from different timing session all in one call.
Gets the list of passings from the timing device from a given datetime to another.
GET https://api.runonrufus.com/v0/passings/device/{deviceid}
Path Parameters
deviceid*
String
Id of the device.
Query Parameters
from
Date
Date object containing the timestamp information of the first passing of the device to retrieve. Format: YYYY-MM-DDTHH:mm:ss.sssZ
to
Date
Date object containing the timestamp information of the last passing of the device to retrieve. Format: YYYY-MM-DDTHH:mm:ss.sssZ
page
Int
Page number of the list of passing to retrieve. Each page can contain up to 5000 passings.
Headers
api_key*
String
Account api key with READ or READ_WRITE access type.
{
"description": "Success",
"result": [
{
"token_session": "2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25",
"timestamp": "2023-02-03T16:08:18.263Z",
"num_passing": 1,
"latitude": "0.0",
"longitude": "0.0",
"status": "Sent",
"participant_id": null,
"chip": null,
"bib": "1",
"timezone": "CET",
"gender": null,
"deviceid": "65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
},
{
"token_session": "2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25",
"timestamp": "2023-02-03T16:08:21.448Z",
"num_passing": 2,
"latitude": "0.0",
"longitude": "0.0",
"status": "Sent",
"participant_id": null,
"chip": null,
"bib": "2",
"timezone": null,
"gender": null,
"deviceid": "65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
},
{
"token_session": "2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25",
"timestamp": "2023-02-03T16:08:21.932Z",
"num_passing": 3,
"latitude": "0.0",
"longitude": "0.0",
"status": "Sent",
"participant_id": null,
"chip": null,
"bib": "3",
"timezone": "CET",
"gender": null,
"deviceid": "65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
}
]
}{
description: "Device not found",
deviceid: "65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
}
{
description: "Passings not found",
deviceid: "65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
}curl -X GET \
-H "Content-Type: application/json" \
-H "api_key: ror-ae4fc6c19681a20fad30" \
https://api.runonrufus.com/v0/passings/session/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25
<?php
$url = "https://api.runonrufus.com/v0/passings/session/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25";
$options = array(
'http' => array(
'method' => 'GET',
'header'=> "Content-Type: application/json\r\n" .
"api_key: ror-ae4fc6c19681a20fad30\r\n" .
"Accept: application/json\r\n"
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result);
var_dump($response);
?>fetch("https://api.runonrufus.com/v0/passings/session/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25", {
method: "GET",
headers: {
"Content-Type": "application/json",
"api_key": "ror-ae4fc6c19681a20fad30",
},
})
.then((response) => console.log(response))
.catch((error) => console.error(error));using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace HttpClientExample
{
class Program
{
static async Task Main(string[] args)
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("api_key", "ror-ae4fc6c19681a20fad30");
var response = await client.GetAsync(
"https://api.runonrufus.com/v0/passings/session/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25",
);
if (response.IsSuccessStatusCode)
{
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
else
{
Console.WriteLine("Error: " + response.StatusCode);
}
}
}
}
Last updated