Übersicht
Retrieves the full configuration and current state of a single stream by its unique ID. Use this endpoint to inspect a specific stream's settings including its network, dataset, filter function, block range, destination attributes, reorg handling configuration, and current processing position.
Key use cases:
- Monitor a stream's progress during backfills
- Debug delivery issues by checking configuration
- Verify configuration changes after an update
- Check the current sequence number and processing status
Endpoint
Send a GET request to retrieve a specific stream by its ID.
GET https://api.quicknode.com/streams/rest/v1/streams/{id}
Pfadparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| id | Zeichenkette | Ja | The unique identifier (UUID) of the stream to retrieve |
Example Request
- cURL
- CLI
- JavaScript
Python
- Ruby
- SDK (JS)
SDK (Python)
- SDK (Ruby)
- SDK (Rust)
curl -X GET "https://api.quicknode.com/streams/rest/v1/streams/f6ad6459-b5ad-4183-b370-1c1388e47e83" \
-H "accept: application/json" \
-H "x-api-key: YOUR_API_KEY"
qn stream show f6ad6459-b5ad-4183-b370-1c1388e47e83 -o json
const headers = new Headers()
headers.append('accept', 'application/json')
headers.append('x-api-key', 'YOUR_API_KEY')
fetch('https://api.quicknode.com/streams/rest/v1/streams/f6ad6459-b5ad-4183-b370-1c1388e47e83', {
method: 'GET',
headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error))
import requests
url = "https://api.quicknode.com/streams/rest/v1/streams/f6ad6459-b5ad-4183-b370-1c1388e47e83"
headers = {
"accept": "application/json",
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
require "uri"
require "net/http"
url = URI("https://api.quicknode.com/streams/rest/v1/streams/f6ad6459-b5ad-4183-b370-1c1388e47e83")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["x-api-key"] = "YOUR_API_KEY"
response = https.request(request)
puts response.body
import { QuicknodeSdk } from "@quicknode/sdk"
const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })
const stream = await qn.streams.getStream("f6ad6459-b5ad-4183-b370-1c1388e47e83")
console.log(stream.id, stream.name, stream.status)
import asyncio
from quicknode_sdk import QuicknodeSdk, SdkFullConfig
async def main():
qn = QuicknodeSdk(SdkFullConfig(api_key="YOUR_API_KEY"))
stream = await qn.streams.get_stream("f6ad6459-b5ad-4183-b370-1c1388e47e83")
print(stream.id, stream.name, stream.status)
asyncio.run(main())
require "quicknode_sdk"
qn = QuicknodeSdk::SDK.from_config(api_key: "YOUR_API_KEY")
stream = qn.streams.get_stream(id: "f6ad6459-b5ad-4183-b370-1c1388e47e83")
puts "#{stream["id"]} #{stream["name"]} #{stream["status"]}"
use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("YOUR_API_KEY").build())?;
let stream = qn.streams.get_stream("f6ad6459-b5ad-4183-b370-1c1388e47e83").await?;
println!("{} {} {}", stream.id, stream.name, stream.status);
Ok(())
}
Antwort
On success, the API returns the stream object with all configuration and status information.
{
"id": "f6ad6459-b5ad-4183-b370-1c1388e47e83",
"name": "My Stream",
"network": "ethereum-mainnet",
"dataset": "block",
"region": "usa_east",
"filter_function": "ZnVuY3Rpb24gbWFpbihkYXRhKSB7Li4ufQ==",
"start_range": 100,
"end_range": 200,
"dataset_batch_size": 1,
"elastic_batch_enabled": true,
"fix_block_reorgs": 0,
"keep_distance_from_tip": 0,
"destination": "webhook",
"destination_attributes": {
"url": "https://webhook.site",
"compression": "none",
"headers": { "Authorization": "Bearer token" },
"max_retry": 3,
"retry_interval_sec": 1,
"post_timeout_sec": 10,
"mtls": true,
"security_token": "qn_xxxxxxxxxxxxxx"
},
"status": "active",
"sequence": 150,
"current_hash": "0x1234567890abcdef...",
"notification_email": null,
"extra_destinations": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:45:00Z"
}
Antwortfelder
| Feld | Typ | Beschreibung |
|---|---|---|
| id | Zeichenkette | Unique stream identifier (UUID) |
| Name | Zeichenkette | Stream name |
| network | Zeichenkette | Blockchain network |
| dataset | Zeichenkette | Dataset type |
| region | Zeichenkette | Deployment region |
| filter_function | Zeichenkette | Base64-encoded filter function (if configured) |
| start_range | Ganzzahl | Starting block number |
| end_range | Ganzzahl | Ending block number (null for continuous) |
| dataset_batch_size | Ganzzahl | Number of blocks per batch |
| elastic_batch_enabled | boolesch | Whether elastic batching is enabled |
| fix_block_reorgs | Ganzzahl | Reorg detection setting (1 = enabled) |
| keep_distance_from_tip | Ganzzahl | Blocks to stay behind chain tip |
| destination | Zeichenkette | Destination type (webhook, s3, azure, postgres) |
| destination_attributes | Objekt | Destination configuration (varies by type) |
| Status | Zeichenkette | Stream status (active or paused) |
| sequence | Ganzzahl | Last delivered block from the data range |
| current_hash | Zeichenkette | Hash of the current block being processed |
| notification_email | Zeichenkette | Email for stream termination alerts |
| extra_destinations | Array | Additional destinations (if configured) |
| created_at | Zeichenkette | Stream creation timestamp (ISO 8601) |
| aktualisiert_am | Zeichenkette | Last update timestamp (ISO 8601) |
Response Destination Attributes
Die destination_attributes object in the response varies based on the destination type. Select a tab below to view the fields returned for each destination.
- Webhook
- S3
- Azure
- PostgreSQL
| Feld | Typ | Beschreibung |
|---|---|---|
| url | Zeichenkette | Webhook endpoint URL |
| compression | Zeichenkette | Compression type (none or gzip) |
| headers | Objekt | Custom headers (if configured) |
| max_retry | Ganzzahl | Maximum retry attempts |
| retry_interval_sec | Ganzzahl | Seconds between retries |
| post_timeout_sec | Ganzzahl | Request timeout in seconds |
| security_token | Zeichenkette | Auto-generated token for validating webhook authenticity |
| mtls | boolesch | Whether Quicknode authenticates to this endpoint with its client certificate (mutual TLS) |
| ssl_ca_pem | Zeichenkette | CA certificate (PEM) used to verify the endpoint's server certificate (only set for private CAs) |
| Feld | Typ | Beschreibung |
|---|---|---|
| endpoint | Zeichenkette | S3 endpoint |
| bucket | Zeichenkette | Bucket name |
| access_key | Zeichenkette | S3 access key |
| object_prefix | Zeichenkette | Prefix for object keys |
| file_compression_type | Zeichenkette | Compression type (none or gzip) |
| file_type | Zeichenkette | File format (.json) |
| max_retry | Ganzzahl | Maximum retry attempts |
| retry_interval_sec | Ganzzahl | Seconds between retries |
| use_ssl | boolesch | SSL enabled status |
| Feld | Typ | Beschreibung |
|---|---|---|
| storage_account | Zeichenkette | Azure storage account name |
| container | Zeichenkette | Container name |
| blob_prefix | Zeichenkette | Prefix for blob names |
| file_compression_type | Zeichenkette | Compression type (none or gzip) |
| file_type | Zeichenkette | File format (.json) |
| max_retry | Ganzzahl | Maximum retry attempts |
| retry_interval_sec | Ganzzahl | Seconds between retries |
| Feld | Typ | Beschreibung |
|---|---|---|
| host | Zeichenkette | Database host |
| port | Ganzzahl | Database port |
| username | Zeichenkette | Database username |
| table_name | Zeichenkette | Target table name |
| sslmode | Zeichenkette | SSL mode (require or disable) |
| max_retry | Ganzzahl | Maximum retry attempts |
| retry_interval_sec | Ganzzahl | Seconds between retries |
Sensitive fields like secret_key (S3), sas_token (Azure), and password (PostgreSQL) are not returned in the response for security reasons.