Topics
Overview
The Topics endpoints in the Hedera Mirror Node REST API allows developers to query topics and messages. These endpoints are crucial for retrieving topic details, message history, and tracking consensus events on the network.
Endpoints
The following endpoints are available for the Topics object:
Endpoint
Description
GET /api/v1/topics/{id}/messages
Retrieves messages for a specific topic by ID.
GET /api/v1/topics/{id}/messages/{sequence_number}
Fetches a specific message from a topic using sequence number.
GET /api/v1/topics/{id}/messages/{consensusTimestamp}
Retrieves a topic message by consensus timestamp.
GET /api/v1/topics/{topicid}
Retrieves the topic details for the given topic ID.
Topics
Returns the list of topic messages for the given topic id.
Network entity ID in the format of shard.realm.num
0.0.2
^\d{1,10}\.\d{1,10}\.\d{1,10}$
base64
The maximum number of items to return
2
The order in which items are listed
desc
asc
, desc
2
The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.
{"summary":"--","value":""}
Response Details
consensus_timestamp
The consensus timestamp of the message in seconds.nanoseconds
topic_id
The ID of the topic the message was submitted to
payer_account_id
The account ID that paid for the transaction to submit the message
message
The content of the message
running_hash
The new running hash of the topic that received the message
sequence_number
The sequence number of the message relative to all other messages for the same topic
Returns a single topic message for the given topic id and sequence number.
Network entity ID in the format of shard.realm.num
0.0.2
^\d{1,10}\.\d{1,10}\.\d{1,10}$
Topic message sequence number
2
Returns a topic message the given the consensusTimestamp.
The Unix timestamp in seconds.nanoseconds format, the timestamp at which the associated transaction reached consensus. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.
1234567890.0000007
^\d{1,10}(.\d{1,9})?$
Last updated
Was this helpful?