curl --request GET \
--url https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}', 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://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}",
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://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
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://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}")
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{
"subscription": {
"id": "0192f1a0-0000-7000-8000-00000000c001",
"name": "orders-webhook",
"sink_kind": "webhook",
"endpoint": "https://hooks.example.com/ingest",
"signature_version": 1,
"plan_tier": "standard",
"enabled": true,
"verification_state": "pending_verification",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z",
"event_types": [
"account.created",
"account.updated"
],
"schema_major": 2
}
}{
"type": "https://errors.lerian.studio/v1/not_found",
"title": "Not Found",
"status": 404,
"detail": "subscription not found",
"code": "not_found"
}"<string>"{
"type": "https://errors.lerian.studio/v1/not_found",
"title": "Not Found",
"status": 404,
"detail": "subscription not found",
"code": "not_found"
}{
"type": "https://errors.lerian.studio/v1/not_found",
"title": "Not Found",
"status": 404,
"detail": "subscription not found",
"code": "not_found"
}Obter uma assinatura
Retorna uma assinatura com escopo do tenant autenticado. Um id ausente, soft-deleted ou de outro tenant (cross-tenant) retorna um 404 not_found uniforme (sem oráculo de existência). A resposta nunca transporta o segredo de assinatura.
curl --request GET \
--url https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}', 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://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}",
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://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
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://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}")
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{
"subscription": {
"id": "0192f1a0-0000-7000-8000-00000000c001",
"name": "orders-webhook",
"sink_kind": "webhook",
"endpoint": "https://hooks.example.com/ingest",
"signature_version": 1,
"plan_tier": "standard",
"enabled": true,
"verification_state": "pending_verification",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z",
"event_types": [
"account.created",
"account.updated"
],
"schema_major": 2
}
}{
"type": "https://errors.lerian.studio/v1/not_found",
"title": "Not Found",
"status": 404,
"detail": "subscription not found",
"code": "not_found"
}"<string>"{
"type": "https://errors.lerian.studio/v1/not_found",
"title": "Not Found",
"status": 404,
"detail": "subscription not found",
"code": "not_found"
}{
"type": "https://errors.lerian.studio/v1/not_found",
"title": "Not Found",
"status": 404,
"detail": "subscription not found",
"code": "not_found"
}Autorizações
Um JWT bearer emitido pelo plugin-auth (lib-auth). A identidade do tenant é resolvida a partir das claims validadas do token; a superfície /v1 nunca lê um tenant do corpo, do path ou da query. Chamadores de máquina obtêm um token via o fluxo client-credentials do plugin-auth. A superfície /admin autoriza contra um escopo de operador e não carrega contexto de tenant.
Parâmetros de caminho
The unique identifier of the subscription (UUIDv7).
Resposta
A assinatura.
The non-secret projection of a subscription. It never carries the signing secret or any credential material.
Show child attributes
Show child attributes
Esta página foi útil?

