Remove one or multiple endpoints from a URL Group. If all endpoints have been removed, the URL Group will be deleted.
Remove Endpoints
Remove one or more endpoints from a URL Group
1 min read
delete/v2/topics/{urlGroupName}/endpoints
Request example
curl --request DELETE \
--url https://qstash-eu-central-1.upstash.io/v2/topics/{urlGroupName}/endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"endpoints": [
{
"name": "<string>",
"url": "<string>"
}
]
}'import requests
url = "https://qstash-eu-central-1.upstash.io/v2/topics/{urlGroupName}/endpoints"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
payload = {
"endpoints": [
{
"name": "<string>",
"url": "<string>"
}
]
}
response = requests.request("DELETE", url, headers=headers, json=payload)
print(response.text)const response = await fetch('https://qstash-eu-central-1.upstash.io/v2/topics/{urlGroupName}/endpoints', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"endpoints": [
{
"name": "<string>",
"url": "<string>"
}
]
})
});
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://qstash-eu-central-1.upstash.io/v2/topics/{urlGroupName}/endpoints',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => '{
"endpoints": [
{
"name": "<string>",
"url": "<string>"
}
]
}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://qstash-eu-central-1.upstash.io/v2/topics/{urlGroupName}/endpoints"
payload := strings.NewReader("{\n \"endpoints\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", 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))
}HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qstash-eu-central-1.upstash.io/v2/topics/{urlGroupName}/endpoints"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString("{\n \"endpoints\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ]\n}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require 'uri'
require 'net/http'
url = URI('https://qstash-eu-central-1.upstash.io/v2/topics/{urlGroupName}/endpoints')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = url.scheme == 'https'
request = Net::HTTP::Delete.new(url)
request['Authorization'] = 'Bearer <token>'
request['Content-Type'] = 'application/json'
request.body = '{
"endpoints": [
{
"name": "<string>",
"url": "<string>"
}
]
}'
response = http.request(request)
puts response.read_bodydelete/v2/topics/{urlGroupName}/endpoints
Authorization
QStash authentication token
1 alternative authorization method available — see the spec for details.
Path parameters
The name of your URL Group.
Body
application/jsonResponses
200
Endpoint(s) removed successfully
Was this page helpful?