query webhookRequestsAuthenticated
The delivery history for a webhook, oldest first.
Returns WebhookRequestConnection!
Arguments
| Argument | Type | Description |
|---|---|---|
input | WebhookRequestsInput! |
Example request
curl -X POST 'https://graph.clientloop.com/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{
"query": "query WebhookRequests($input: WebhookRequestsInput!) { webhookRequests(input: $input) { edges { node { id webhookId ownerId url payload status attempts lastStatusCode lastError nextAttemptAt createdAt updatedAt } cursor } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }",
"variables": {
"input": {
"webhookId": "abc123"
}
}
}'const response = await fetch('https://graph.clientloop.com/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <api-key>',
},
body: JSON.stringify({
query: `
query WebhookRequests($input: WebhookRequestsInput!) {
webhookRequests(input: $input) {
edges {
node {
id
webhookId
ownerId
url
payload
status
attempts
lastStatusCode
lastError
nextAttemptAt
createdAt
updatedAt
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
`,
variables: {
"input": {
"webhookId": "abc123"
}
},
}),
});
const { data, errors } = await response.json();<?php
$body = <<<'JSON'
{
"query": "query WebhookRequests($input: WebhookRequestsInput!) { webhookRequests(input: $input) { edges { node { id webhookId ownerId url payload status attempts lastStatusCode lastError nextAttemptAt createdAt updatedAt } cursor } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }",
"variables": {
"input": {
"webhookId": "abc123"
}
}
}
JSON;
$ch = curl_init('https://graph.clientloop.com/');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <api-key>',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var body = """
{
"query": "query WebhookRequests($input: WebhookRequestsInput!) { webhookRequests(input: $input) { edges { node { id webhookId ownerId url payload status attempts lastStatusCode lastError nextAttemptAt createdAt updatedAt } cursor } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }",
"variables": {
"input": {
"webhookId": "abc123"
}
}
}
""";
var request = HttpRequest.newBuilder(URI.create("https://graph.clientloop.com/"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <api-key>")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
var response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var body = """
{
"query": "query WebhookRequests($input: WebhookRequestsInput!) { webhookRequests(input: $input) { edges { node { id webhookId ownerId url payload status attempts lastStatusCode lastError nextAttemptAt createdAt updatedAt } cursor } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }",
"variables": {
"input": {
"webhookId": "abc123"
}
}
}
""";
using var client = new HttpClient();
using var content = new StringContent(body, Encoding.UTF8, "application/json");
client.DefaultRequestHeaders.Add("Authorization", "Bearer <api-key>");
var response = await client.PostAsync("https://graph.clientloop.com/", content);
var result = await response.Content.ReadAsStringAsync();Types
input WebhookRequestsInput
| Field | Type | Description |
|---|---|---|
webhookId | ID! | The webhook whose delivery history to return. |
first | Int | |
after | String | |
last | Int | |
before | String |
type WebhookRequestConnection
| Field | Type | Description |
|---|---|---|
edges | [WebhookRequestEdge!]! | |
pageInfo | PageInfo! |
type WebhookRequestEdge
| Field | Type | Description |
|---|---|---|
node | WebhookRequest! | |
cursor | String! |
type PageInfo
PageInfo type for cursor-based pagination following the Relay specification for cursor based pagination.
| Field | Type | Description |
|---|---|---|
hasNextPage | Boolean! | |
hasPreviousPage | Boolean! | |
startCursor | String | |
endCursor | String |
type WebhookRequest
A single delivery of a JSON payload to a webhook, together with its retry state. Retained for 90 days.
| Field | Type | Description |
|---|---|---|
id | ID! | |
webhookId | ID! | The webhook this payload is delivered to. |
ownerId | ID! | |
url | String! | Snapshot of the destination URL at dispatch time; retries keep targeting it even if the webhook is later edited. |
payload | JSON! | The JSON body delivered to the endpoint. |
status | WebhookRequestStatus! | |
attempts | Int! | How many delivery attempts have been made so far. |
lastStatusCode | Int | HTTP status code from the most recent attempt, if one has been made. |
lastError | String | Error message from the most recent attempt, if it failed. |
nextAttemptAt | DateTime | When the next attempt is scheduled, while the request is still pending. |
createdAt | DateTime! | |
updatedAt | DateTime! |
scalar JSON
A JSON string
enum WebhookRequestStatus
Delivery lifecycle of a WebhookRequest. A request is pending until it is delivered (an accepted 200/201 response) or failed (no acceptance within the 7-day retry deadline).
pendingdeliveredfailed
scalar DateTime
ISO 8601 formatted date time. Ex. 2023-11-23T14:30:00Z