curl --request GET \
--url https://api.example.com/api/v1/topics/{topicId}import requests
url = "https://api.example.com/api/v1/topics/{topicId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/topics/{topicId}', 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/api/v1/topics/{topicId}",
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/api/v1/topics/{topicId}"
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/api/v1/topics/{topicId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/topics/{topicId}")
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{
"admin_key": {
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
},
"auto_renew_account": "0.0.2",
"auto_renew_period": 7776000,
"created_timestamp": "1586567700.453054000",
"custom_fees": {
"created_timestamp": "1586567700.453054000",
"fixed_fees": [
{
"amount": 100,
"collector_account_id": "0.0.2",
"denominating_token_id": "0.0.2"
}
]
},
"deleted": false,
"fee_exempt_key_list": [
{
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
}
],
"fee_schedule_key": {
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
},
"memo": "topic memo",
"submit_key": {
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
},
"timestamp": {
"from": "1586567700.453054000",
"to": "1586567700.453054000"
},
"topic_id": "0.0.2"
}{
"_status": {
"messages": [
{
"message": "Invalid parameter: account.id"
},
{
"message": "Invalid Transaction id. Please use \\shard.realm.num-sss-nnn\\ format where sss are seconds and nnn are nanoseconds"
}
]
}
}{
"_status": {
"messages": [
{
"message": "Not found"
}
]
}
}Get topic by ID
Returns the topic details for the given topic ID.
curl --request GET \
--url https://api.example.com/api/v1/topics/{topicId}import requests
url = "https://api.example.com/api/v1/topics/{topicId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/topics/{topicId}', 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/api/v1/topics/{topicId}",
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/api/v1/topics/{topicId}"
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/api/v1/topics/{topicId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/topics/{topicId}")
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{
"admin_key": {
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
},
"auto_renew_account": "0.0.2",
"auto_renew_period": 7776000,
"created_timestamp": "1586567700.453054000",
"custom_fees": {
"created_timestamp": "1586567700.453054000",
"fixed_fees": [
{
"amount": 100,
"collector_account_id": "0.0.2",
"denominating_token_id": "0.0.2"
}
]
},
"deleted": false,
"fee_exempt_key_list": [
{
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
}
],
"fee_schedule_key": {
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
},
"memo": "topic memo",
"submit_key": {
"_type": "ProtobufEncoded",
"key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
},
"timestamp": {
"from": "1586567700.453054000",
"to": "1586567700.453054000"
},
"topic_id": "0.0.2"
}{
"_status": {
"messages": [
{
"message": "Invalid parameter: account.id"
},
{
"message": "Invalid Transaction id. Please use \\shard.realm.num-sss-nnn\\ format where sss are seconds and nnn are nanoseconds"
}
]
}
}{
"_status": {
"messages": [
{
"message": "Not found"
}
]
}
}Path Parameters
Topic id
Network entity ID in the format of shard.realm.num
^\d{1,10}\.\d{1,10}\.\d{1,10}$"0.0.2"
Response
OK
The public key which controls access to various network entities.
Show child attributes
Show child attributes
Network entity ID in the format of shard.realm.num
^\d{1,10}\.\d{1,10}\.\d{1,10}$"0.0.2"
The amount of time to attempt to extend the topic's lifetime after expiration.
7776000
A Unix timestamp in seconds.nanoseconds format
^\d{1,10}(\.\d{1,9})?$"1586567700.453054000"
Custom fees assessed for each message submitted to the topic
Show child attributes
Show child attributes
Whether the topic is deleted or not.
false
Keys permitted to submit messages to the topic without paying custom fees
The public key which controls access to various network entities.
Show child attributes
Show child attributes
The public key which controls access to various network entities.
Show child attributes
Show child attributes
The memo associated with the topic.
"topic memo"
The public key which controls access to various network entities.
Show child attributes
Show child attributes
A timestamp range an entity is valid for
Show child attributes
Show child attributes
Network entity ID in the format of shard.realm.num
^\d{1,10}\.\d{1,10}\.\d{1,10}$"0.0.2"
Was this page helpful?