Return a list of Web Tools.
curl --request GET \
--url https://api.tryhamsa.com/v1/voice-agents/web-tool/list \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v1/voice-agents/web-tool/list"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v1/voice-agents/web-tool/list', 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://api.tryhamsa.com/v1/voice-agents/web-tool/list",
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: <api-key>"
],
]);
$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://api.tryhamsa.com/v1/voice-agents/web-tool/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v1/voice-agents/web-tool/list")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v1/voice-agents/web-tool/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": false,
"message": "success",
"data": {
"items": [
{
"id": "009a3a7c-beb4-4471-9175-b49144daf4ad",
"name": "Tool",
"type": "FUNCTION",
"userId": "095e678e-2b18-4138-aae9-f4d92b557104",
"projectId": "ec4215b3-c65d-494d-b268-5618647207d8",
"async": true,
"strict": true,
"description": "dasdsad",
"toolSettings": {
"serverUrl": "http://google.com",
"timeout": 100000,
"authToken": "dasdsad",
"methodType": "POST",
"httpHeaders": {
"X-Account-Id": "12345"
},
"pathParameters": {
"orderId": "48213"
},
"onHoldMusic": false,
"hasAuthToken": true,
"httpHeaderNames": [
"X-Account-Id"
]
},
"params": {
"location": {
"type": "string",
"description": "The location to get weather for"
}
},
"messages": [
{
"type": "system",
"content": "You are a helpful weather assistant."
}
],
"persistentId": "cmjx8qzw0000004kz3jek1ktu",
"version": 1,
"isActive": true,
"collectionId": "550e8400-e29b-41d4-a716-446655440000"
}
],
"total": 15,
"filtered": 15
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}Web Tools Routes
Return a list of Web Tools.
deprecated
GET
/
v1
/
voice-agents
/
web-tool
/
list
Return a list of Web Tools.
curl --request GET \
--url https://api.tryhamsa.com/v1/voice-agents/web-tool/list \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v1/voice-agents/web-tool/list"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v1/voice-agents/web-tool/list', 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://api.tryhamsa.com/v1/voice-agents/web-tool/list",
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: <api-key>"
],
]);
$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://api.tryhamsa.com/v1/voice-agents/web-tool/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v1/voice-agents/web-tool/list")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v1/voice-agents/web-tool/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": false,
"message": "success",
"data": {
"items": [
{
"id": "009a3a7c-beb4-4471-9175-b49144daf4ad",
"name": "Tool",
"type": "FUNCTION",
"userId": "095e678e-2b18-4138-aae9-f4d92b557104",
"projectId": "ec4215b3-c65d-494d-b268-5618647207d8",
"async": true,
"strict": true,
"description": "dasdsad",
"toolSettings": {
"serverUrl": "http://google.com",
"timeout": 100000,
"authToken": "dasdsad",
"methodType": "POST",
"httpHeaders": {
"X-Account-Id": "12345"
},
"pathParameters": {
"orderId": "48213"
},
"onHoldMusic": false,
"hasAuthToken": true,
"httpHeaderNames": [
"X-Account-Id"
]
},
"params": {
"location": {
"type": "string",
"description": "The location to get weather for"
}
},
"messages": [
{
"type": "system",
"content": "You are a helpful weather assistant."
}
],
"persistentId": "cmjx8qzw0000004kz3jek1ktu",
"version": 1,
"isActive": true,
"collectionId": "550e8400-e29b-41d4-a716-446655440000"
}
],
"total": 15,
"filtered": 15
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}Authorizations
Query Parameters
Was this page helpful?