RUFUS Help
RUFUS Cloud Public API
RUFUS Cloud Public API
  • Introduction to RUFUS Cloud API
  • Getting Started
    • Overview
    • Get your api keys
    • Api permissions
  • TIMING DEVICES
    • Overview
    • Bind a new device
    • Unbind a device
    • Get devices by company
    • Get device information
  • TIMING SESSIONS
    • Overview
    • Insert a new session
    • Close a session
    • Get sessions by device
    • Get active session from device
    • Get session information
  • RACE PASSINGS
    • Overview
    • Insert passings
    • Get session passings by range
    • Get device passings by datetime
Powered by GitBook
On this page
  1. TIMING DEVICES

Unbind a device

Removes a device from the company account.

When a device is unbinded, all timing sessions and passings are removed also.

Removes a device from the company account.

DELETE https://api.runonrufus.com/v0/devices/{deviceid}

Path Parameters

Name
Type
Description

deviceid*

String

Id of the device to remove.

Headers

Name
Type
Description

api_key*

String

Account api key with unbind permission.

{
    "description":"Device unbinded succesfully"
    "deviceid":"65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
}

{
    "description":"Device not found"
    "deviceid":"65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "api_key: ror-ae4fc6c19681a20fad30" \
https://api.runonrufus.com/v0/devices/65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B
<?php
$url = "https://api.runonrufus.com/v0/devices/65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B";

$options = array(
    'http' => array(
      'method'  => 'DELETE',
      '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/devices/65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B", {
    method: "DELETE",
    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.DeleteAsync(
                "https://api.runonrufus.com/v0/devices/65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B",
            );
            
            if (response.IsSuccessStatusCode)
            {
                var result = await response.Content.ReadAsStringAsync();

                Console.WriteLine(result);
            }
            else
            {
                Console.WriteLine("Error: " + response.StatusCode);
            }
        }
    }
}
PreviousBind a new deviceNextGet devices by company

Last updated 2 years ago