Skip to main content
GET
/
blockchain
/
events
Queries blockchain events with optional filters.
curl --request GET \
  --url https://api.example.com/blockchain/events
import requests

url = "https://api.example.com/blockchain/events"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/blockchain/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/blockchain/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/blockchain/events"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/blockchain/events")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/blockchain/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "event_id": "<string>",
    "event_type": "<string>",
    "metadata": "<unknown>",
    "timestamp": 123,
    "tx_hash": "<string>",
    "block_height": 1,
    "drone_id": "<string>",
    "evidence_cid": "<string>",
    "location": {
      "latitude": 123,
      "longitude": 123,
      "altitude": 123
    }
  }
]

Query Parameters

event_type
string | null

Filter by blockchain event type.

start_time
integer<int64> | null

Unix timestamp lower bound for event time.

end_time
integer<int64> | null

Unix timestamp upper bound for event time.

incident_id
string | null

Filter events by associated incident ID.

drone_id
string | null

Filter events by drone ID.

Response

200 - application/json

List of blockchain events

event_id
string
required

Unique event identifier.

event_type
string
required

Event classification.

metadata
any
required

Arbitrary event metadata.

timestamp
integer<int64>
required

Unix timestamp when the event was recorded.

tx_hash
string
required

On-chain transaction hash.

block_height
integer<int64> | null

Block height at which the transaction was confirmed.

Required range: x >= 0
drone_id
string | null

Drone identifier associated with this event.

evidence_cid
string | null

IPFS CID of evidence linked to this event.

location
null | object

Geographic location associated with the event.