Get single webhook.
curl --request GET \
--url https://{tenant}/api/hooks/{hookId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/hooks/{hookId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}/api/hooks/{hookId}', 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://{tenant}/api/hooks/{hookId}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/api/hooks/{hookId}"
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))
}HttpResponse<String> response = Unirest.get("https://{tenant}/api/hooks/{hookId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/hooks/{hookId}")
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_body{
"api_model": {},
"event_timeout": 0,
"header_map": {
"secret": "superscretkey",
"x-auth": "authvalue"
},
"id": "363634393863643165326663643130303031383465636239",
"method": "POST",
"name": "Expired Keys webhook",
"org_id": "5e9d9544a1dcd60001d0ed20",
"target_path": "https://httpbin.org/expired-keys",
"template_path": "",
"webhook_id": "1f78e319202b430e92286cff3ca759e3"
}{
"Message": "Could not retrieve webhook detail.",
"Meta": null,
"Status": "Error"
}{
"Message": "Not authorised",
"Meta": null,
"Status": "Error"
}{
"Message": "access denied: You do not have permission to access /api/hooks/{hookId}",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to marshal data for webhook detail.",
"Meta": null,
"Status": "Error"
}Webhooks
Get single webhook.
Get a webhook details with its ID.
GET
/
api
/
hooks
/
{hookId}
Get single webhook.
curl --request GET \
--url https://{tenant}/api/hooks/{hookId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/hooks/{hookId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}/api/hooks/{hookId}', 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://{tenant}/api/hooks/{hookId}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/api/hooks/{hookId}"
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))
}HttpResponse<String> response = Unirest.get("https://{tenant}/api/hooks/{hookId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/hooks/{hookId}")
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_body{
"api_model": {},
"event_timeout": 0,
"header_map": {
"secret": "superscretkey",
"x-auth": "authvalue"
},
"id": "363634393863643165326663643130303031383465636239",
"method": "POST",
"name": "Expired Keys webhook",
"org_id": "5e9d9544a1dcd60001d0ed20",
"target_path": "https://httpbin.org/expired-keys",
"template_path": "",
"webhook_id": "1f78e319202b430e92286cff3ca759e3"
}{
"Message": "Could not retrieve webhook detail.",
"Meta": null,
"Status": "Error"
}{
"Message": "Not authorised",
"Meta": null,
"Status": "Error"
}{
"Message": "access denied: You do not have permission to access /api/hooks/{hookId}",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to marshal data for webhook detail.",
"Meta": null,
"Status": "Error"
}Authorizations
The Tyk Dashboard API Access Credentials
Path Parameters
ID of the webhook to fetch.
Response
Webhook fetched.
Example:
"POST"
Example:
"https://httpbin.org/expired-keys"
Example:
0
Show child attributes
Show child attributes
Example:
{
"secret": "superscretkey",
"x-auth": "authvalue"
}
Example:
"664b613f5715ec4c96cbef3e"
Example:
"Expired Keys webhook"
Example:
"5e9d9544a1dcd60001d0ed20"
Example:
"templates/default_webhook.json"
Example:
"1f78e319202b430e92286cff3ca759e3"
Was this page helpful?
⌘I