Close a session
Closes or finalize a timing session.
A closed timing session cannot receive anymore passings, but it can be read and retrieved at anytime.
Closes the timing session.
PATCH https://api.runonrufus.com/v0/sessions/close/{token_session}
Path Parameters
Name
Type
Description
token_session*
String
Session token identifier.
Headers
Name
Type
Description
api_key*
String
Account api key with WRITE or READ_WRITE access type.
{
"description":"Session closed succesfully"
"token_session":"2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25"
}{
"description":"Session not found"
"token_session":"2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25"
}curl -X PATCH \
-H "Content-Type: application/json" \
-H "api_key: ror-ae4fc6c19681a20fad30" \
https://api.runonrufus.com/v0/sessions/close/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25
<?php
$url = "https://api.runonrufus.com/v0/sessions/close/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25";
$options = array(
'http' => array(
'method' => 'PATCH',
'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/sessions/close/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25", {
method: "PATCH",
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.PatchAsync(
"https://api.runonrufus.com/v0/sessions/close/2A19294BB886C3D5C7783309BBC6E385515C843893A6BC126FECE3904C6E2B25",
);
if (response.IsSuccessStatusCode)
{
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
else
{
Console.WriteLine("Error: " + response.StatusCode);
}
}
}
}
Last updated