GET /api/v1/webhooks/{id}
This API endpoint is a GET request to retrieve webhooks related to note creation.
Input parmeters:
id
Name of the event for which you want to access the subsciptions detail.
string, supplied in the path of the request.
Example :
GET http://api.locate2u.com/api/v1/webhooks/note.created
Sample code
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://api.locate2u.com/api/v1/webhooks/note.created");
request.Headers.Add("Authorization", "Bearer yourBearerTokenHere");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("http://api.locate2u.com/api/v1/webhooks/note.created")
.method("GET", body)
.addHeader("Authorization", "Bearer yourBearerTokenHere")
.build();
Response response = client.newCall(request).execute();
var http = require('follow-redirects').http;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'api.locate2u.com',
'path': '/api/v1/webhooks/note.created',
'headers': {
'Authorization': 'Bearer yourBearerTokenHere'
},
'maxRedirects': 20
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
'http://api.locate2u.com/api/v1/webhooks/note.created',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer yourBearerTokenHere'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "http://api.locate2u.com/api/v1/webhooks/note.created"
payload = {}
headers = {
'Authorization': 'Bearer yourBearerTokenHere'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Response
Upon a successful execution, the API returns a JSON object with the following properties:
eventType (string): The type of event associated with the webhook.
url (string): The URL to which the webhook will be sent.
Example response:
{
"eventType": "note.created",
"url": "https://my.site/111111c-3ef4-4ac4-a24d-hjkhjk"
}