List webhook delivery attempts
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts \
--header 'Authorization: Bearer <token>'{
"data": [
{
"attempt": 2,
"trigger": "initial",
"url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"http_status": 123,
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"has_more": true,
"next_cursor": "<string>",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}Webhook Deliveries
List webhook delivery attempts
List a delivery’s attempts, newest first.
GET
/
webhooks
/
deliveries
/
{delivery_id}
/
attempts
List webhook delivery attempts
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts \
--header 'Authorization: Bearer <token>'{
"data": [
{
"attempt": 2,
"trigger": "initial",
"url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"http_status": 123,
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"has_more": true,
"next_cursor": "<string>",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}0 credits
See the guide for examples and usage.
Authorizations
Query Parameters
Response
A page of delivery attempts
Was this page helpful?