curl --request DELETE \
--url https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Idempotency: <x-idempotency>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Idempotency", "<x-idempotency>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'DELETE',
headers: {'X-Idempotency': '<x-idempotency>', 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));import requests
url = "https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
headers = {
"X-Idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}Delete a subscription
Soft-deletes a subscription scoped to the authenticated tenant. The operation is idempotent: an absent, already-deleted, or cross-tenant id is a no-op that still answers 204 (no existence oracle).
curl --request DELETE \
--url https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Idempotency: <x-idempotency>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Idempotency", "<x-idempotency>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'DELETE',
headers: {'X-Idempotency': '<x-idempotency>', 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));import requests
url = "https://streaming-hub.sandbox.lerian.net/v1/subscriptions/{id}"
headers = {
"X-Idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}{
"title": "Not Found",
"status": 404,
"type": "https://errors.lerian.studio/v1/not_found",
"detail": "subscription not found",
"code": "not_found",
"instance": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"location": "event_types/2",
"message": "\"transaction.creatd\" has no catalog entry at schema major 1"
}
]
}Autorizações
A bearer JWT issued by Access Manager. The /v1 surface never reads a tenant from the body, path, or query. Machine callers obtain a token with the Access Manager client-credentials flow. The /admin surface authorizes against an operator scope and carries no tenant context.
Cabeçalhos
A client-chosen unique key that makes this mutation at-most-once. A mutation sent without it is rejected before any write with 400 missing_idempotency_key. Reusing the same key with an identical request replays the original response byte-for-byte (with X-Idempotency-Replayed: true); reusing it with a different request body returns 409 idempotency_conflict. To re-drive a corrected request, mint a new key.
Parâmetros de caminho
The unique identifier of the subscription (UUIDv7).
Resposta
The subscription was deleted (or was already absent).
Esta página foi útil?

