WebhooksSubscribe
Basis-URL
https://us1.proctorapi.comVerfügbare Regionen10 Regionen
Die Abonnement-Anfrage formalisiert die Einrichtung eines Abonnements für Proctorio-Webhook-Benachrichtigungen.
PfadparametertypestringErforderlich1 - Webhook-Typ für Verdachtsberechnungapplication/jsonBody
type
stringErforderlich
1 - Webhook-Typ für Verdachtsberechnung
Die Abonnement-Anfrage.
behavior_settings
object
version
string
Version des Verdachtsberechnungs-Webhooks, den Sie abonnieren möchten. Derzeit unterstützte Versionen sind '2' und '3'.
client
objectErforderlich
Antworten200application/jsonZeigt Erfolg an und gibt die Abonnement-Antwort zurück.
400application/jsonZeigt eine fehlerhafte Anfrage an.
401application/jsonZeigt eine nicht autorisierte Antwort an.
2154 - Konto nicht aktiv.
2155 - Falsche Region.
2655 - Ungültiger api_key.
200application/json
Zeigt Erfolg an und gibt die Abonnement-Antwort zurück.
400application/json
Zeigt eine fehlerhafte Anfrage an.
401application/json
Zeigt eine nicht autorisierte Antwort an.
2154 - Konto nicht aktiv.
2155 - Falsche Region.
2655 - Ungültiger api_key.
curl --request POST \
--url https://us1.proctorapi.com/v2/whks/subscribe/%7Btype%7D \
--header 'Content-Type: application/json' \
--header 'api_key: $API_KEY' \
--data '{"client":{"url":"https://example.com","key":"string"}}' import requests
url = "https://us1.proctorapi.com/v2/whks/subscribe/%7Btype%7D"
payload = { "client": {
"url": "https://example.com",
"key": "string"
} }
headers = {
"api_key": "$API_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json()) const fetch = require('node-fetch');
const url = 'https://us1.proctorapi.com/v2/whks/subscribe/%7Btype%7D';
const options = {
method: 'POST',
headers: {api_key: '$API_KEY', 'Content-Type': 'application/json'},
body: '{"client":{"url":"https://example.com","key":"string"}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
} using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://us1.proctorapi.com/v2/whks/subscribe/%7Btype%7D"),
Headers =
{
{ "api_key", "$API_KEY" },
},
Content = new StringContent("{\"client\":{\"url\":\"https://example.com\",\"key\":\"string\"}}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
} {
"client": {
"url": "https://example.com",
"key": "string"
}
}