Get Subname by Full Name
curl --request GET \
--url https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}import requests
url = "https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}', 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://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}",
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://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}"
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://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}")
.asString();require 'uri'
require 'net/http'
url = URI("https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}")
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{
"id": "123",
"fullName": "alice.oppunk.eth",
"parentName": "oppunk.eth",
"label": "alice",
"texts": {
"email": "alice@example.com"
},
"addresses": {
"ETH": "0x1234...abcd"
},
"metadata": {
"role": "admin"
},
"contenthash": "ipfs://Qm...",
"namehash": "0xabc123..."
}Offchain API
Get subname by full name
Retrieve an offchain ENS subname and its records by full name.
GET
/
api
/
v1
/
subnames
/
{fullSubname}
Get Subname by Full Name
curl --request GET \
--url https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}import requests
url = "https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}', 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://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}",
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://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}"
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://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}")
.asString();require 'uri'
require 'net/http'
url = URI("https://offchain-manager.namespace.ninja/api/v1/subnames/{fullSubname}")
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{
"id": "123",
"fullName": "alice.oppunk.eth",
"parentName": "oppunk.eth",
"label": "alice",
"texts": {
"email": "alice@example.com"
},
"addresses": {
"ETH": "0x1234...abcd"
},
"metadata": {
"role": "admin"
},
"contenthash": "ipfs://Qm...",
"namehash": "0xabc123..."
}Path Parameters
The full subname to retrieve (e.g., alice.oppunk.eth)
Example:
"alice.oppunk.eth"
Response
Subname found
Unique identifier of the subname
Example:
"123"
Full name of the subname (e.g., alice.oppunk.eth)
Example:
"alice.oppunk.eth"
Parent name (e.g., oppunk.eth)
Example:
"oppunk.eth"
Label of the subname (e.g., alice)
Example:
"alice"
Text records associated with the subname
Example:
{ "email": "alice@example.com" }
Address records associated with the subname
Example:
{ "ETH": "0x1234...abcd" }
Metadata associated with the subname
Example:
{ "role": "admin" }
Namehash of the subname
Example:
"0xabc123..."
Content hash of the subname
Example:
"ipfs://Qm..."
Was this page helpful?

