Replay webhooks
curl --request POST \
--url https://api.cloudcruise.com/webhooks/{session_id}/replay \
--header 'cc-key: <api-key>'import requests
url = "https://api.cloudcruise.com/webhooks/{session_id}/replay"
headers = {"cc-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'cc-key': '<api-key>'}};
fetch('https://api.cloudcruise.com/webhooks/{session_id}/replay', 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.cloudcruise.com/webhooks/{session_id}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"cc-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"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcruise.com/webhooks/{session_id}/replay"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cc-key", "<api-key>")
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.cloudcruise.com/webhooks/{session_id}/replay")
.header("cc-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/webhooks/{session_id}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cc-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"info": "<string>",
"nr_success": 123,
"nr_failed": 123,
"webhook_events": [
{
"success": true,
"response": "<string>",
"error": "<string>"
}
]
}Webhooks API
Replay webhooks
Replays all webhooks that were sent during a session.
POST
/
webhooks
/
{session_id}
/
replay
Replay webhooks
curl --request POST \
--url https://api.cloudcruise.com/webhooks/{session_id}/replay \
--header 'cc-key: <api-key>'import requests
url = "https://api.cloudcruise.com/webhooks/{session_id}/replay"
headers = {"cc-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'cc-key': '<api-key>'}};
fetch('https://api.cloudcruise.com/webhooks/{session_id}/replay', 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.cloudcruise.com/webhooks/{session_id}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"cc-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"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcruise.com/webhooks/{session_id}/replay"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cc-key", "<api-key>")
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.cloudcruise.com/webhooks/{session_id}/replay")
.header("cc-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/webhooks/{session_id}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cc-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"info": "<string>",
"nr_success": 123,
"nr_failed": 123,
"webhook_events": [
{
"success": true,
"response": "<string>",
"error": "<string>"
}
]
}Replay re-sends webhook events already recorded for the specified run session. If no webhook events were recorded, the endpoint returns success with
nr_success: 0 and nr_failed: 0.Authorizations
API key-based authentication. Provide your CloudCruise API key in the cc-key header.
Path Parameters
The ID of the session to replay webhooks for
Response
200 - application/json
Webhooks successfully replayed
The status of the webhook replay.
Additional information about the replay.
Number of webhooks that were successfully replayed.
Number of webhooks that failed to be replayed.
Details of each webhook replay attempt.
Show child attributes
Show child attributes
Was this page helpful?

