Update Threshold Assignment
curl --request POST \
--url https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update \
--header 'Content-Type: application/json' \
--data '
{
"ThresholdAssignmentId": "TAID-00000001-0000-0000-0000-000000000001",
"ThresholdId": "THID-a1b2c3d4-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
'import requests
url = "https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update"
payload = {
"ThresholdAssignmentId": "TAID-00000001-0000-0000-0000-000000000001",
"ThresholdId": "THID-a1b2c3d4-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ThresholdAssignmentId: 'TAID-00000001-0000-0000-0000-000000000001',
ThresholdId: 'THID-a1b2c3d4-0000-0000-0000-000000000001',
SubscriptionId: 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
})
};
fetch('https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update', 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.telegent.com/v1.0/subscriptions/thresholds/assignments/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ThresholdAssignmentId' => 'TAID-00000001-0000-0000-0000-000000000001',
'ThresholdId' => 'THID-a1b2c3d4-0000-0000-0000-000000000001',
'SubscriptionId' => 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
]),
CURLOPT_HTTPHEADER => [
"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.telegent.com/v1.0/subscriptions/thresholds/assignments/update"
payload := strings.NewReader("{\n \"ThresholdAssignmentId\": \"TAID-00000001-0000-0000-0000-000000000001\",\n \"ThresholdId\": \"THID-a1b2c3d4-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update")
.header("Content-Type", "application/json")
.body("{\n \"ThresholdAssignmentId\": \"TAID-00000001-0000-0000-0000-000000000001\",\n \"ThresholdId\": \"THID-a1b2c3d4-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ThresholdAssignmentId\": \"TAID-00000001-0000-0000-0000-000000000001\",\n \"ThresholdId\": \"THID-a1b2c3d4-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}"
response = http.request(request)
puts response.read_body{
"ThresholdAssignmentId": "TAID-00000001-0000-0000-0000-000000000001",
"ThresholdId": "THID-a1b2c3d4-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c",
"Active": true
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Subscriptions
Update Threshold Assignment
Update an existing threshold assignment — for example, to re-point it to a different subscription or threshold. Only included fields are changed.
What this does: Returns the updated assignment record.
Next steps:
- Confirm the update —
GET /v1.0/subscriptions/thresholds/assignments
POST
/
v1.0
/
subscriptions
/
thresholds
/
assignments
/
update
Update Threshold Assignment
curl --request POST \
--url https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update \
--header 'Content-Type: application/json' \
--data '
{
"ThresholdAssignmentId": "TAID-00000001-0000-0000-0000-000000000001",
"ThresholdId": "THID-a1b2c3d4-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
'import requests
url = "https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update"
payload = {
"ThresholdAssignmentId": "TAID-00000001-0000-0000-0000-000000000001",
"ThresholdId": "THID-a1b2c3d4-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ThresholdAssignmentId: 'TAID-00000001-0000-0000-0000-000000000001',
ThresholdId: 'THID-a1b2c3d4-0000-0000-0000-000000000001',
SubscriptionId: 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
})
};
fetch('https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update', 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.telegent.com/v1.0/subscriptions/thresholds/assignments/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ThresholdAssignmentId' => 'TAID-00000001-0000-0000-0000-000000000001',
'ThresholdId' => 'THID-a1b2c3d4-0000-0000-0000-000000000001',
'SubscriptionId' => 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
]),
CURLOPT_HTTPHEADER => [
"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.telegent.com/v1.0/subscriptions/thresholds/assignments/update"
payload := strings.NewReader("{\n \"ThresholdAssignmentId\": \"TAID-00000001-0000-0000-0000-000000000001\",\n \"ThresholdId\": \"THID-a1b2c3d4-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update")
.header("Content-Type", "application/json")
.body("{\n \"ThresholdAssignmentId\": \"TAID-00000001-0000-0000-0000-000000000001\",\n \"ThresholdId\": \"THID-a1b2c3d4-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/subscriptions/thresholds/assignments/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ThresholdAssignmentId\": \"TAID-00000001-0000-0000-0000-000000000001\",\n \"ThresholdId\": \"THID-a1b2c3d4-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}"
response = http.request(request)
puts response.read_body{
"ThresholdAssignmentId": "TAID-00000001-0000-0000-0000-000000000001",
"ThresholdId": "THID-a1b2c3d4-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c",
"Active": true
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Body
application/jsontext/jsonapplication/*+json
Update_Threshold_Assignment_Request object
ID of the threshold assignment to update (TAID-).
Example:
"TAID-00000001-0000-0000-0000-000000000001"
Replacement threshold ID (THID-).
Example:
"THID-a1b2c3d4-0000-0000-0000-000000000001"
Replacement subscription ID (SUB-).
Example:
"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
Response
Updated threshold assignment record
The response is of type object.
⌘I