إلغاء إشعار مجدوَل
curl --request POST \
--url https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel \
--header 'Content-Type: application/json' \
--header 'atelerix-api-key: <api-key>' \
--data '
{
"apiKey": "<string>"
}
'import requests
url = "https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel"
payload = { "apiKey": "<string>" }
headers = {
"atelerix-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'atelerix-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>'})
};
fetch('https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel', 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.atelerix.dev/v1/{project-id}/notifications/{id}/cancel",
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([
'apiKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"atelerix-api-key: <api-key>"
],
]);
$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.atelerix.dev/v1/{project-id}/notifications/{id}/cancel"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("atelerix-api-key", "<api-key>")
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.atelerix.dev/v1/{project-id}/notifications/{id}/cancel")
.header("atelerix-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["atelerix-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyالإشعارات
إلغاء إشعار مجدوَل
أوقِف إشعاراً مجدولاً قبل تسليمه.
POST
/
v1
/
{project-id}
/
notifications
/
{id}
/
cancel
إلغاء إشعار مجدوَل
curl --request POST \
--url https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel \
--header 'Content-Type: application/json' \
--header 'atelerix-api-key: <api-key>' \
--data '
{
"apiKey": "<string>"
}
'import requests
url = "https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel"
payload = { "apiKey": "<string>" }
headers = {
"atelerix-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'atelerix-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>'})
};
fetch('https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel', 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.atelerix.dev/v1/{project-id}/notifications/{id}/cancel",
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([
'apiKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"atelerix-api-key: <api-key>"
],
]);
$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.atelerix.dev/v1/{project-id}/notifications/{id}/cancel"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("atelerix-api-key", "<api-key>")
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.atelerix.dev/v1/{project-id}/notifications/{id}/cancel")
.header("atelerix-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atelerix.dev/v1/{project-id}/notifications/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["atelerix-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyيلغي إشعاراً لم يُسلَّم بعد — صالح فقط بينما حالته
عند الفشل، تتبع الاستجابة الشكل الموثّق في رموز الأخطاء والنجاح.
scheduled. حذف صفّ
الإشعار وحده لن يكفي لأن التسليم غير متزامن (asynchronous)؛ لذا يضع هذا
حالته canceled حتى تتجاهله مهمّة التسليم المجدولة عند حلول موعدها.
استدعاء هذا على إشعار حالته بالفعل sent، أو failed، أو unsent، أو
canceled يُرجِع CANNOT_CANCEL_SENT_NOTIFICATION.
راجع مقدمة الـ API لإعداد الرابط الأساسي ومفتاحك الخاص قبل إرسال الطلبات.
المعاملات (Parameters)
string
مطلوب
معرّف مشروعك من إعدادات المشروع في لوحة التحكم.
string
مطلوب
notificationId المُرجَع عند جدولة الإشعار (راجع إرسال إشعار
ومعامله sentAt).string
مطلوب
مفتاحك الخاص من إعدادات المشروع.
الاستجابة (Response)
201 Created
{
"message": "Scheduled notification canceled"
}
⌘I