cURL
curl --request PATCH \
--url https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_id": "<string>",
"subscription": {
"project_id": "<string>",
"name": "<string>",
"topic_id": "<string>",
"https_url": "<string>",
"filter": "<string>",
"delete_after_use": true
},
"update_mask": "<string>"
}
'import requests
url = "https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}"
payload = {
"subscription_id": "<string>",
"subscription": {
"project_id": "<string>",
"name": "<string>",
"topic_id": "<string>",
"https_url": "<string>",
"filter": "<string>",
"delete_after_use": True
},
"update_mask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscription_id: '<string>',
subscription: {
project_id: '<string>',
name: '<string>',
topic_id: '<string>',
https_url: '<string>',
filter: '<string>',
delete_after_use: true
},
update_mask: '<string>'
})
};
fetch('https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_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://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'subscription_id' => '<string>',
'subscription' => [
'project_id' => '<string>',
'name' => '<string>',
'topic_id' => '<string>',
'https_url' => '<string>',
'filter' => '<string>',
'delete_after_use' => true
],
'update_mask' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}"
payload := strings.NewReader("{\n \"subscription_id\": \"<string>\",\n \"subscription\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"https_url\": \"<string>\",\n \"filter\": \"<string>\",\n \"delete_after_use\": true\n },\n \"update_mask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_id\": \"<string>\",\n \"subscription\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"https_url\": \"<string>\",\n \"filter\": \"<string>\",\n \"delete_after_use\": true\n },\n \"update_mask\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscription_id\": \"<string>\",\n \"subscription\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"https_url\": \"<string>\",\n \"filter\": \"<string>\",\n \"delete_after_use\": true\n },\n \"update_mask\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"project_id": "<string>",
"name": "<string>",
"topic_id": "<string>",
"https_url": "<string>",
"id": "<string>",
"filter": "<string>",
"delete_after_use": true
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Callbacks
Update subscription
UpdateSubscription
Updates existing subscription.
PATCH
/
integration
/
subscriptions
/
v1
/
{subscription_id}
cURL
curl --request PATCH \
--url https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_id": "<string>",
"subscription": {
"project_id": "<string>",
"name": "<string>",
"topic_id": "<string>",
"https_url": "<string>",
"filter": "<string>",
"delete_after_use": true
},
"update_mask": "<string>"
}
'import requests
url = "https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}"
payload = {
"subscription_id": "<string>",
"subscription": {
"project_id": "<string>",
"name": "<string>",
"topic_id": "<string>",
"https_url": "<string>",
"filter": "<string>",
"delete_after_use": True
},
"update_mask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscription_id: '<string>',
subscription: {
project_id: '<string>',
name: '<string>',
topic_id: '<string>',
https_url: '<string>',
filter: '<string>',
delete_after_use: true
},
update_mask: '<string>'
})
};
fetch('https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_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://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'subscription_id' => '<string>',
'subscription' => [
'project_id' => '<string>',
'name' => '<string>',
'topic_id' => '<string>',
'https_url' => '<string>',
'filter' => '<string>',
'delete_after_use' => true
],
'update_mask' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}"
payload := strings.NewReader("{\n \"subscription_id\": \"<string>\",\n \"subscription\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"https_url\": \"<string>\",\n \"filter\": \"<string>\",\n \"delete_after_use\": true\n },\n \"update_mask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_id\": \"<string>\",\n \"subscription\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"https_url\": \"<string>\",\n \"filter\": \"<string>\",\n \"delete_after_use\": true\n },\n \"update_mask\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/integration/subscriptions/v1/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscription_id\": \"<string>\",\n \"subscription\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"https_url\": \"<string>\",\n \"filter\": \"<string>\",\n \"delete_after_use\": true\n },\n \"update_mask\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"project_id": "<string>",
"name": "<string>",
"topic_id": "<string>",
"https_url": "<string>",
"id": "<string>",
"filter": "<string>",
"delete_after_use": true
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Subscription is used to define which events of the relevant topics should be sent to the callback URL. Limitations:
- This is only forward-looking, meaning that only events that occur after the subscription is created will be sent to the target.
- There may only be two (2) subscriptions per topic, unless the subscription filter specifies a specific
idfield ORdelete_after_useis set to true. - Delivery is not guaranteed; message delivery will be retried when encountering a non-2xx response, but if there are multiple subscriptions for the same topic and one subscription successfully received the message, it will not be redelivered to the others.
Show child attributes
Show child attributes
Response
OK
Subscription is used to define which events of the relevant topics should be sent to the callback URL. Limitations:
- This is only forward-looking, meaning that only events that occur after the subscription is created will be sent to the target.
- There may only be two (2) subscriptions per topic, unless the subscription filter specifies a specific
idfield ORdelete_after_useis set to true. - Delivery is not guaranteed; message delivery will be retried when encountering a non-2xx response, but if there are multiple subscriptions for the same topic and one subscription successfully received the message, it will not be redelivered to the others.
Show child attributes
Show child attributes

