Get list of events of domain for Detailed domain page
curl --request GET \
--url https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/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.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"action": "<string>",
"from_address": {
"chain_id": "<string>",
"contract_name": "<string>",
"domain_info": {
"address": "<string>",
"expiry_date": "<string>",
"name": "<string>",
"names_count": 123
},
"hash": "<string>",
"is_contract": true,
"is_token": true,
"is_verified_contract": true,
"token_name": "<string>",
"token_type": "TOKEN_TYPE_UNSPECIFIED"
},
"timestamp": "<string>",
"transaction_hash": "<string>"
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}DomainsExtractor
Get list of events of domain for Detailed domain page
GET
/
services
/
bens
/
api
/
v1
/
{chain_id}
/
domains
/
{name}
/
events
Get list of events of domain for Detailed domain page
curl --request GET \
--url https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/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.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"action": "<string>",
"from_address": {
"chain_id": "<string>",
"contract_name": "<string>",
"domain_info": {
"address": "<string>",
"expiry_date": "<string>",
"name": "<string>",
"names_count": 123
},
"hash": "<string>",
"is_contract": true,
"is_token": true,
"is_verified_contract": true,
"token_name": "<string>",
"token_type": "TOKEN_TYPE_UNSPECIFIED"
},
"timestamp": "<string>",
"transaction_hash": "<string>"
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
bearerAuthapiKeyAuth
API key passed as a Bearer token in the Authorization header.
Path Parameters
The chain (network) where domain search should be done
Name of domain, for example vitalik.eth
Query Parameters
Sorting field. Default is timestamp
Order direction. Default is DESC
Available options:
ORDER_UNSPECIFIED, ASC, DESC Protocol id of domain, default is first priority protocol on that chain
Response
A successful response.
Show child attributes
Show child attributes
Was this page helpful?
⌘I