Retrieve ranked policy chunks for a question
curl --request POST \
--url https://sandbox.rcintell.com/v1/policy/retrieve \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"user_uid": "<string>",
"document_id": "<string>",
"document_ids": [
"<string>"
],
"package": "<string>",
"top_n": 20
}
'import requests
url = "https://sandbox.rcintell.com/v1/policy/retrieve"
payload = {
"query": "<string>",
"user_uid": "<string>",
"document_id": "<string>",
"document_ids": ["<string>"],
"package": "<string>",
"top_n": 20
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
user_uid: '<string>',
document_id: '<string>',
document_ids: ['<string>'],
package: '<string>',
top_n: 20
})
};
fetch('https://sandbox.rcintell.com/v1/policy/retrieve', 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://sandbox.rcintell.com/v1/policy/retrieve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'user_uid' => '<string>',
'document_id' => '<string>',
'document_ids' => [
'<string>'
],
'package' => '<string>',
'top_n' => 20
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rcintell.com/v1/policy/retrieve"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"user_uid\": \"<string>\",\n \"document_id\": \"<string>\",\n \"document_ids\": [\n \"<string>\"\n ],\n \"package\": \"<string>\",\n \"top_n\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.rcintell.com/v1/policy/retrieve")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"user_uid\": \"<string>\",\n \"document_id\": \"<string>\",\n \"document_ids\": [\n \"<string>\"\n ],\n \"package\": \"<string>\",\n \"top_n\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rcintell.com/v1/policy/retrieve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"user_uid\": \"<string>\",\n \"document_id\": \"<string>\",\n \"document_ids\": [\n \"<string>\"\n ],\n \"package\": \"<string>\",\n \"top_n\": 20\n}"
response = http.request(request)
puts response.read_body{
"candidate_count": 0,
"chunks": [
{
"chunk_id": "<string>",
"page_end": 123,
"page_start": 123,
"segmentation": "<string>",
"source_pdf": "<string>",
"text": "<string>",
"document_id": "",
"heading": "",
"heading_level": 123,
"matched_keywords": [
"<string>"
],
"priority": false,
"query_score": 0,
"relevance_score": 0,
"section_path": [
"<string>"
],
"tables": [
{}
]
}
],
"max_query_score": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}policy
Retrieve ranked policy chunks for a question
POST
/
v1
/
policy
/
retrieve
Retrieve ranked policy chunks for a question
curl --request POST \
--url https://sandbox.rcintell.com/v1/policy/retrieve \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"user_uid": "<string>",
"document_id": "<string>",
"document_ids": [
"<string>"
],
"package": "<string>",
"top_n": 20
}
'import requests
url = "https://sandbox.rcintell.com/v1/policy/retrieve"
payload = {
"query": "<string>",
"user_uid": "<string>",
"document_id": "<string>",
"document_ids": ["<string>"],
"package": "<string>",
"top_n": 20
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
user_uid: '<string>',
document_id: '<string>',
document_ids: ['<string>'],
package: '<string>',
top_n: 20
})
};
fetch('https://sandbox.rcintell.com/v1/policy/retrieve', 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://sandbox.rcintell.com/v1/policy/retrieve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'user_uid' => '<string>',
'document_id' => '<string>',
'document_ids' => [
'<string>'
],
'package' => '<string>',
'top_n' => 20
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rcintell.com/v1/policy/retrieve"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"user_uid\": \"<string>\",\n \"document_id\": \"<string>\",\n \"document_ids\": [\n \"<string>\"\n ],\n \"package\": \"<string>\",\n \"top_n\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.rcintell.com/v1/policy/retrieve")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"user_uid\": \"<string>\",\n \"document_id\": \"<string>\",\n \"document_ids\": [\n \"<string>\"\n ],\n \"package\": \"<string>\",\n \"top_n\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rcintell.com/v1/policy/retrieve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"user_uid\": \"<string>\",\n \"document_id\": \"<string>\",\n \"document_ids\": [\n \"<string>\"\n ],\n \"package\": \"<string>\",\n \"top_n\": 20\n}"
response = http.request(request)
puts response.read_body{
"candidate_count": 0,
"chunks": [
{
"chunk_id": "<string>",
"page_end": 123,
"page_start": 123,
"segmentation": "<string>",
"source_pdf": "<string>",
"text": "<string>",
"document_id": "",
"heading": "",
"heading_level": 123,
"matched_keywords": [
"<string>"
],
"priority": false,
"query_score": 0,
"relevance_score": 0,
"section_path": [
"<string>"
],
"tables": [
{}
]
}
],
"max_query_score": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Headers
Admin bootstrap secret required for privileged bootstrap/provisioning operations.
Body
application/json