Search articles
curl --request GET \
--url https://api1.irisagent.com/v1/community/search/articles \
--header 'Authorization: Bearer <token>' \
--header 'X-Business-Id: <x-business-id>'import requests
url = "https://api1.irisagent.com/v1/community/search/articles"
headers = {
"X-Business-Id": "<x-business-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Business-Id': '<x-business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api1.irisagent.com/v1/community/search/articles', 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://api1.irisagent.com/v1/community/search/articles",
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>",
"X-Business-Id: <x-business-id>"
],
]);
$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://api1.irisagent.com/v1/community/search/articles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Business-Id", "<x-business-id>")
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://api1.irisagent.com/v1/community/search/articles")
.header("X-Business-Id", "<x-business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api1.irisagent.com/v1/community/search/articles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Business-Id"] = '<x-business-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"articles": [
{
"id": "<string>",
"title": "<string>",
"url": "<string>",
"snippet": "<string>"
}
]
}API Reference
Search articles
Search knowledge base articles for any query using AI-powered recommendation
GET
/
v1
/
community
/
search
/
articles
Search articles
curl --request GET \
--url https://api1.irisagent.com/v1/community/search/articles \
--header 'Authorization: Bearer <token>' \
--header 'X-Business-Id: <x-business-id>'import requests
url = "https://api1.irisagent.com/v1/community/search/articles"
headers = {
"X-Business-Id": "<x-business-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Business-Id': '<x-business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api1.irisagent.com/v1/community/search/articles', 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://api1.irisagent.com/v1/community/search/articles",
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>",
"X-Business-Id: <x-business-id>"
],
]);
$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://api1.irisagent.com/v1/community/search/articles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Business-Id", "<x-business-id>")
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://api1.irisagent.com/v1/community/search/articles")
.header("X-Business-Id", "<x-business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api1.irisagent.com/v1/community/search/articles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Business-Id"] = '<x-business-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"articles": [
{
"id": "<string>",
"title": "<string>",
"url": "<string>",
"snippet": "<string>"
}
]
}Authorizations
The Authorization header is required to authenticate API requests.
It should contain a bearer token obtained through the IrisAgent portal.
Headers
Business ID of the customer.
Query Parameters
The search query string.
Pagination offset for search results.
Required range:
x >= 0Maximum number of results to return.
Required range:
x >= 1Response
Search results
Show child attributes
Show child attributes
⌘I