Skip to content

List Webhooks

After successfull authorization your client app can get your webhook info. Basic auth credentials and signature key are not part of the response. If you lost the signature key and you need a new one just recreate the webhook (destroy + create).

GET/api/webhooks

After successfull authorization your client app can get your webhook info. Basic auth credentials and signature key are not part of the response. If you lost the signature key and you need a new one just recreate the webhook (destroy + create).

URL returning webhook info (you have to be authorized, otherwise you’ll receive error 401).

Headers

Name Example Description
Authorization Bearer demo_access_token —

Code examples

curl --request GET 'https://app.datamolino.com/api/webhooks' \
  --header 'Authorization: Bearer demo_access_token'
GET /api/webhooks HTTP/1.1
Host: app.datamolino.com
Authorization: Bearer demo_access_token
const response = await fetch("https://app.datamolino.com/api/webhooks", {
  method: "GET",
  headers: {
    "Authorization": "Bearer demo_access_token"
  },
});

const data = await response.json();
import axios from "axios";

const response = await axios({
  method: "get",
  url: "https://app.datamolino.com/api/webhooks",
  headers: {
    "Authorization": "Bearer demo_access_token"
  }
});

console.log(response.data);
import requests

url = "https://app.datamolino.com/api/webhooks"
headers = {
  "Authorization": "Bearer demo_access_token"
}

response = requests.request("GET", url, headers=headers)
response.raise_for_status()
print(response.json())
require 'json'
require 'net/http'

uri = URI("https://app.datamolino.com/api/webhooks")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer demo_access_token"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
# app/services/datamolino_client.rb
require 'json'
require 'net/http'

class DatamolinoClient
  BASE_URL = "https://app.datamolino.com"

  def initialize(access_token: Rails.application.credentials.dig(:datamolino, :access_token))
    @access_token = access_token
  end

  def request_list_webhooks
    uri = URI("#{BASE_URL}/api/webhooks")
    request = Net::HTTP::Get.new(uri)
    request["Authorization"] = "Bearer #{@access_token}"

    response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
      http.request(request)
    end

    JSON.parse(response.body)
  end
end
<?php

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://app.datamolino.com/api/webhooks', [
    'headers' => json_decode('{"Authorization":"Bearer demo_access_token"}', true)
]);

echo $response->getBody();
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
    .url("https://app.datamolino.com/api/webhooks")
    .addHeader("Authorization", "Bearer demo_access_token")
    .method("GET", null)
    .build();

Response response = client.newCall(request).execute();
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://app.datamolino.com/api/webhooks");
request.Headers.Add("Authorization", "Bearer demo_access_token");

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
client := &http.Client{}
req, err := http.NewRequest("GET", "https://app.datamolino.com/api/webhooks", nil)
if err != nil { panic(err) }
req.Header.Add("Authorization", "Bearer demo_access_token")

res, err := client.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()

body, err := io.ReadAll(res.Body)
if err != nil { panic(err) }
fmt.Println(string(body))
import Foundation

var request = URLRequest(url: URL(string: "https://app.datamolino.com/api/webhooks")!)
request.httpMethod = "GET"
request.setValue("Bearer demo_access_token", forHTTPHeaderField: "Authorization")

let (data, _) = try await URLSession.shared.data(for: request)
print(String(data: data, encoding: .utf8)!)

Responses

200 OK

Content type: application/json; charset=utf-8

https://example.com/webhooks/datamolino
Navigation

Type to search…

↑↓ navigate ↵ select Esc close