Obtener el manifiesto de eventos de streaming
curl --request GET \
--url http://localhost:4005/v1/streaming/events \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:4005/v1/streaming/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4005/v1/streaming/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4005",
CURLOPT_URL => "http://localhost:4005/v1/streaming/events",
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 := "http://localhost:4005/v1/streaming/events"
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("http://localhost:4005/v1/streaming/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4005/v1/streaming/events")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"dataContentType": "<string>",
"dataSchema": "<string>",
"defaultPolicy": {
"enabled": true
},
"description": "<string>",
"eventType": "<string>",
"key": "<string>",
"resourceType": "<string>",
"schemaVersion": "<string>",
"systemEvent": true,
"topic": "<string>"
}
],
"publisher": {
"appVersion": "<string>",
"libVersion": "<string>",
"outboxSupported": true,
"producerId": "<string>",
"routePath": "<string>",
"serviceName": "<string>",
"sourceBase": "<string>"
},
"routes": [
{
"definitionKey": "<string>",
"destination": "<string>",
"dlqConfigured": true,
"key": "<string>",
"required": true,
"target": "<string>"
}
],
"version": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Obtener el manifiesto de eventos de streaming
Devuelve el catálogo de eventos de negocio en pasado que publica este servicio, con la política de entrega de cada evento. Es un descriptor de contrato estático que no revela la topología del broker.
GET
/
v1
/
streaming
/
events
Obtener el manifiesto de eventos de streaming
curl --request GET \
--url http://localhost:4005/v1/streaming/events \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:4005/v1/streaming/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4005/v1/streaming/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4005",
CURLOPT_URL => "http://localhost:4005/v1/streaming/events",
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 := "http://localhost:4005/v1/streaming/events"
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("http://localhost:4005/v1/streaming/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4005/v1/streaming/events")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"dataContentType": "<string>",
"dataSchema": "<string>",
"defaultPolicy": {
"enabled": true
},
"description": "<string>",
"eventType": "<string>",
"key": "<string>",
"resourceType": "<string>",
"schemaVersion": "<string>",
"systemEvent": true,
"topic": "<string>"
}
],
"publisher": {
"appVersion": "<string>",
"libVersion": "<string>",
"outboxSupported": true,
"producerId": "<string>",
"routePath": "<string>",
"serviceName": "<string>",
"sourceBase": "<string>"
},
"routes": [
{
"definitionKey": "<string>",
"destination": "<string>",
"dlqConfigured": true,
"key": "<string>",
"required": true,
"target": "<string>"
}
],
"version": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Autorizaciones
Autenticación mediante token Bearer. Formato: 'Bearer {access_token}'. Solo es obligatoria cuando el plugin de autenticación está habilitado.
Respuesta
Correcto
Eventos de negocio que Reporter puede publicar.
Show child attributes
Show child attributes
Ejemplo:
[
{
"dataContentType": "application/json",
"defaultPolicy": {
"direct": "direct",
"dlq": "on_routable_failure",
"enabled": true,
"outbox": "fallback_on_circuit_open"
},
"eventType": "requested",
"key": "report.requested",
"resourceType": "report",
"schemaVersion": "1.0.0",
"systemEvent": false,
"topic": "//lerian.studio/reporter/report/requested"
}
]
Metadatos que identifican al publicador de eventos de Reporter.
Show child attributes
Show child attributes
Ejemplo:
{
"outboxSupported": true,
"routePath": "/v1/streaming/events",
"serviceName": "reporter",
"sourceBase": "//lerian.studio/reporter"
}
Rutas de entrega depuradas cuando está habilitada la publicación de topología; Reporter omite este campo.
Show child attributes
Show child attributes
Ejemplo:
[]
Versión semántica del formato de transmisión del manifiesto.
Ejemplo:
"1.0.0"
¿Esta página le ayudó?
⌘I

