Get webhook URL
curl --request GET \
--url https://nitro-script-api.nitrorx.ai/entity/webhook \
--header 'Authorization: Bearer <token>'import requests
url = "https://nitro-script-api.nitrorx.ai/entity/webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nitro-script-api.nitrorx.ai/entity/webhook', 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://nitro-script-api.nitrorx.ai/entity/webhook",
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://nitro-script-api.nitrorx.ai/entity/webhook"
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://nitro-script-api.nitrorx.ai/entity/webhook")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://nitro-script-api.nitrorx.ai/entity/webhook")
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{
"message": "Webhook URL",
"data": {
"webhook_url": "https://example.com/webhook"
}
}{
"message": "A bad request error",
"data": null
}{
"message": "Unauthorized",
"data": null
}{
"message": "An internal server error occurred",
"data": null
}Entity Endpoints
Get Webhook URL
Returns the webhook URL for the entity
GET
/
entity
/
webhook
Get webhook URL
curl --request GET \
--url https://nitro-script-api.nitrorx.ai/entity/webhook \
--header 'Authorization: Bearer <token>'import requests
url = "https://nitro-script-api.nitrorx.ai/entity/webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nitro-script-api.nitrorx.ai/entity/webhook', 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://nitro-script-api.nitrorx.ai/entity/webhook",
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://nitro-script-api.nitrorx.ai/entity/webhook"
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://nitro-script-api.nitrorx.ai/entity/webhook")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://nitro-script-api.nitrorx.ai/entity/webhook")
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{
"message": "Webhook URL",
"data": {
"webhook_url": "https://example.com/webhook"
}
}{
"message": "A bad request error",
"data": null
}{
"message": "Unauthorized",
"data": null
}{
"message": "An internal server error occurred",
"data": null
}Webhook URL is the URL that will be called when a script is processed and the results are ready to be sent to your system.
When do we send script results back to your system?
Script results will be sent to your system when both of these conditions are met:- The
reference_idhas a value other than0. - A valid
webhook_urlhas been provided.