Create Tenant
curl --request POST \
--url https://{api_endpoint}/v1/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"created_by": "<string>",
"title": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"settings": {
"model_settings": {
"base_llm": {
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"guardrails": {
"hap": {
"input": {
"enabled": false,
"threshold": 0.5
},
"output": {
"enabled": false,
"threshold": 0.5
},
"mask": {
"remove_entity_value": false
}
},
"social_bias": {
"input": {
"enabled": false,
"threshold": 0.5
},
"output": {
"enabled": false,
"threshold": 0.5
},
"mask": {
"remove_entity_value": false
}
},
"pii": {
"input": {
"enabled": false,
"threshold": 0.5
},
"output": {
"enabled": false,
"threshold": 0.5
},
"mask": {
"remove_entity_value": false
}
}
},
"system_prompt": "<string>",
"prompt_templates": {
"chat_template": "<string>",
"chat_template_params": {}
}
},
"embeddings": {
"model_name": "<string>",
"model_id": "<string>"
},
"is_base_llm_enabled": true
},
"router_settings": {
"router_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"routing_prompt": "<string>",
"router_config": {
"continue_journey_on_none": true,
"confidence_threshold": 123,
"confidence_method": "perplexity"
}
},
"user_settings": {
"confirm_routing": true,
"clear_watsonx_assistant_context": false,
"clientside_shortlisting": false
},
"slot_filling_settings": {
"slot_filler_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {}
}
}
}
'import requests
url = "https://{api_endpoint}/v1/tenants"
payload = {
"name": "<string>",
"id": "<string>",
"created_by": "<string>",
"title": "<string>",
"description": "<string>",
"tags": ["<string>"],
"settings": {
"model_settings": {
"base_llm": {
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"guardrails": {
"hap": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
},
"social_bias": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
},
"pii": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
}
},
"system_prompt": "<string>",
"prompt_templates": {
"chat_template": "<string>",
"chat_template_params": {}
}
},
"embeddings": {
"model_name": "<string>",
"model_id": "<string>"
},
"is_base_llm_enabled": True
},
"router_settings": {
"router_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"routing_prompt": "<string>",
"router_config": {
"continue_journey_on_none": True,
"confidence_threshold": 123,
"confidence_method": "perplexity"
}
},
"user_settings": {
"confirm_routing": True,
"clear_watsonx_assistant_context": False,
"clientside_shortlisting": False
},
"slot_filling_settings": {
"slot_filler_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {}
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
id: '<string>',
created_by: '<string>',
title: '<string>',
description: '<string>',
tags: ['<string>'],
settings: {
model_settings: {
base_llm: {
model_name: '<string>',
model_id: '<string>',
model_params: {},
guardrails: {
hap: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
},
social_bias: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
},
pii: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
}
},
system_prompt: '<string>',
prompt_templates: {chat_template: '<string>', chat_template_params: {}}
},
embeddings: {model_name: '<string>', model_id: '<string>'},
is_base_llm_enabled: true
},
router_settings: {
router_type: 'unified',
model_name: '<string>',
model_id: '<string>',
model_params: {},
routing_prompt: '<string>',
router_config: {
continue_journey_on_none: true,
confidence_threshold: 123,
confidence_method: 'perplexity'
}
},
user_settings: {
confirm_routing: true,
clear_watsonx_assistant_context: false,
clientside_shortlisting: false
},
slot_filling_settings: {
slot_filler_type: 'unified',
model_name: '<string>',
model_id: '<string>',
model_params: {}
}
}
})
};
fetch('https://{api_endpoint}/v1/tenants', 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_endpoint}/v1/tenants",
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([
'name' => '<string>',
'id' => '<string>',
'created_by' => '<string>',
'title' => '<string>',
'description' => '<string>',
'tags' => [
'<string>'
],
'settings' => [
'model_settings' => [
'base_llm' => [
'model_name' => '<string>',
'model_id' => '<string>',
'model_params' => [
],
'guardrails' => [
'hap' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
],
'social_bias' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
],
'pii' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
]
],
'system_prompt' => '<string>',
'prompt_templates' => [
'chat_template' => '<string>',
'chat_template_params' => [
]
]
],
'embeddings' => [
'model_name' => '<string>',
'model_id' => '<string>'
],
'is_base_llm_enabled' => true
],
'router_settings' => [
'router_type' => 'unified',
'model_name' => '<string>',
'model_id' => '<string>',
'model_params' => [
],
'routing_prompt' => '<string>',
'router_config' => [
'continue_journey_on_none' => true,
'confidence_threshold' => 123,
'confidence_method' => 'perplexity'
]
],
'user_settings' => [
'confirm_routing' => true,
'clear_watsonx_assistant_context' => false,
'clientside_shortlisting' => false
],
'slot_filling_settings' => [
'slot_filler_type' => 'unified',
'model_name' => '<string>',
'model_id' => '<string>',
'model_params' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{api_endpoint}/v1/tenants"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"created_by\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {\n \"model_settings\": {\n \"base_llm\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"system_prompt\": \"<string>\",\n \"prompt_templates\": {\n \"chat_template\": \"<string>\",\n \"chat_template_params\": {}\n }\n },\n \"embeddings\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\"\n },\n \"is_base_llm_enabled\": true\n },\n \"router_settings\": {\n \"router_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"routing_prompt\": \"<string>\",\n \"router_config\": {\n \"continue_journey_on_none\": true,\n \"confidence_threshold\": 123,\n \"confidence_method\": \"perplexity\"\n }\n },\n \"user_settings\": {\n \"confirm_routing\": true,\n \"clear_watsonx_assistant_context\": false,\n \"clientside_shortlisting\": false\n },\n \"slot_filling_settings\": {\n \"slot_filler_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {}\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{api_endpoint}/v1/tenants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"created_by\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {\n \"model_settings\": {\n \"base_llm\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"system_prompt\": \"<string>\",\n \"prompt_templates\": {\n \"chat_template\": \"<string>\",\n \"chat_template_params\": {}\n }\n },\n \"embeddings\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\"\n },\n \"is_base_llm_enabled\": true\n },\n \"router_settings\": {\n \"router_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"routing_prompt\": \"<string>\",\n \"router_config\": {\n \"continue_journey_on_none\": true,\n \"confidence_threshold\": 123,\n \"confidence_method\": \"perplexity\"\n }\n },\n \"user_settings\": {\n \"confirm_routing\": true,\n \"clear_watsonx_assistant_context\": false,\n \"clientside_shortlisting\": false\n },\n \"slot_filling_settings\": {\n \"slot_filler_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_endpoint}/v1/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"created_by\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {\n \"model_settings\": {\n \"base_llm\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"system_prompt\": \"<string>\",\n \"prompt_templates\": {\n \"chat_template\": \"<string>\",\n \"chat_template_params\": {}\n }\n },\n \"embeddings\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\"\n },\n \"is_base_llm_enabled\": true\n },\n \"router_settings\": {\n \"router_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"routing_prompt\": \"<string>\",\n \"router_config\": {\n \"continue_journey_on_none\": true,\n \"confidence_threshold\": 123,\n \"confidence_method\": \"perplexity\"\n }\n },\n \"user_settings\": {\n \"confirm_routing\": true,\n \"clear_watsonx_assistant_context\": false,\n \"clientside_shortlisting\": false\n },\n \"slot_filling_settings\": {\n \"slot_filler_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Tenant Management
Create Tenant
Create Tenant
curl --request POST \
--url https://{api_endpoint}/v1/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"created_by": "<string>",
"title": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"settings": {
"model_settings": {
"base_llm": {
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"guardrails": {
"hap": {
"input": {
"enabled": false,
"threshold": 0.5
},
"output": {
"enabled": false,
"threshold": 0.5
},
"mask": {
"remove_entity_value": false
}
},
"social_bias": {
"input": {
"enabled": false,
"threshold": 0.5
},
"output": {
"enabled": false,
"threshold": 0.5
},
"mask": {
"remove_entity_value": false
}
},
"pii": {
"input": {
"enabled": false,
"threshold": 0.5
},
"output": {
"enabled": false,
"threshold": 0.5
},
"mask": {
"remove_entity_value": false
}
}
},
"system_prompt": "<string>",
"prompt_templates": {
"chat_template": "<string>",
"chat_template_params": {}
}
},
"embeddings": {
"model_name": "<string>",
"model_id": "<string>"
},
"is_base_llm_enabled": true
},
"router_settings": {
"router_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"routing_prompt": "<string>",
"router_config": {
"continue_journey_on_none": true,
"confidence_threshold": 123,
"confidence_method": "perplexity"
}
},
"user_settings": {
"confirm_routing": true,
"clear_watsonx_assistant_context": false,
"clientside_shortlisting": false
},
"slot_filling_settings": {
"slot_filler_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {}
}
}
}
'import requests
url = "https://{api_endpoint}/v1/tenants"
payload = {
"name": "<string>",
"id": "<string>",
"created_by": "<string>",
"title": "<string>",
"description": "<string>",
"tags": ["<string>"],
"settings": {
"model_settings": {
"base_llm": {
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"guardrails": {
"hap": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
},
"social_bias": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
},
"pii": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
}
},
"system_prompt": "<string>",
"prompt_templates": {
"chat_template": "<string>",
"chat_template_params": {}
}
},
"embeddings": {
"model_name": "<string>",
"model_id": "<string>"
},
"is_base_llm_enabled": True
},
"router_settings": {
"router_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {},
"routing_prompt": "<string>",
"router_config": {
"continue_journey_on_none": True,
"confidence_threshold": 123,
"confidence_method": "perplexity"
}
},
"user_settings": {
"confirm_routing": True,
"clear_watsonx_assistant_context": False,
"clientside_shortlisting": False
},
"slot_filling_settings": {
"slot_filler_type": "unified",
"model_name": "<string>",
"model_id": "<string>",
"model_params": {}
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
id: '<string>',
created_by: '<string>',
title: '<string>',
description: '<string>',
tags: ['<string>'],
settings: {
model_settings: {
base_llm: {
model_name: '<string>',
model_id: '<string>',
model_params: {},
guardrails: {
hap: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
},
social_bias: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
},
pii: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
}
},
system_prompt: '<string>',
prompt_templates: {chat_template: '<string>', chat_template_params: {}}
},
embeddings: {model_name: '<string>', model_id: '<string>'},
is_base_llm_enabled: true
},
router_settings: {
router_type: 'unified',
model_name: '<string>',
model_id: '<string>',
model_params: {},
routing_prompt: '<string>',
router_config: {
continue_journey_on_none: true,
confidence_threshold: 123,
confidence_method: 'perplexity'
}
},
user_settings: {
confirm_routing: true,
clear_watsonx_assistant_context: false,
clientside_shortlisting: false
},
slot_filling_settings: {
slot_filler_type: 'unified',
model_name: '<string>',
model_id: '<string>',
model_params: {}
}
}
})
};
fetch('https://{api_endpoint}/v1/tenants', 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_endpoint}/v1/tenants",
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([
'name' => '<string>',
'id' => '<string>',
'created_by' => '<string>',
'title' => '<string>',
'description' => '<string>',
'tags' => [
'<string>'
],
'settings' => [
'model_settings' => [
'base_llm' => [
'model_name' => '<string>',
'model_id' => '<string>',
'model_params' => [
],
'guardrails' => [
'hap' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
],
'social_bias' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
],
'pii' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
]
],
'system_prompt' => '<string>',
'prompt_templates' => [
'chat_template' => '<string>',
'chat_template_params' => [
]
]
],
'embeddings' => [
'model_name' => '<string>',
'model_id' => '<string>'
],
'is_base_llm_enabled' => true
],
'router_settings' => [
'router_type' => 'unified',
'model_name' => '<string>',
'model_id' => '<string>',
'model_params' => [
],
'routing_prompt' => '<string>',
'router_config' => [
'continue_journey_on_none' => true,
'confidence_threshold' => 123,
'confidence_method' => 'perplexity'
]
],
'user_settings' => [
'confirm_routing' => true,
'clear_watsonx_assistant_context' => false,
'clientside_shortlisting' => false
],
'slot_filling_settings' => [
'slot_filler_type' => 'unified',
'model_name' => '<string>',
'model_id' => '<string>',
'model_params' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{api_endpoint}/v1/tenants"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"created_by\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {\n \"model_settings\": {\n \"base_llm\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"system_prompt\": \"<string>\",\n \"prompt_templates\": {\n \"chat_template\": \"<string>\",\n \"chat_template_params\": {}\n }\n },\n \"embeddings\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\"\n },\n \"is_base_llm_enabled\": true\n },\n \"router_settings\": {\n \"router_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"routing_prompt\": \"<string>\",\n \"router_config\": {\n \"continue_journey_on_none\": true,\n \"confidence_threshold\": 123,\n \"confidence_method\": \"perplexity\"\n }\n },\n \"user_settings\": {\n \"confirm_routing\": true,\n \"clear_watsonx_assistant_context\": false,\n \"clientside_shortlisting\": false\n },\n \"slot_filling_settings\": {\n \"slot_filler_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {}\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{api_endpoint}/v1/tenants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"created_by\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {\n \"model_settings\": {\n \"base_llm\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"system_prompt\": \"<string>\",\n \"prompt_templates\": {\n \"chat_template\": \"<string>\",\n \"chat_template_params\": {}\n }\n },\n \"embeddings\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\"\n },\n \"is_base_llm_enabled\": true\n },\n \"router_settings\": {\n \"router_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"routing_prompt\": \"<string>\",\n \"router_config\": {\n \"continue_journey_on_none\": true,\n \"confidence_threshold\": 123,\n \"confidence_method\": \"perplexity\"\n }\n },\n \"user_settings\": {\n \"confirm_routing\": true,\n \"clear_watsonx_assistant_context\": false,\n \"clientside_shortlisting\": false\n },\n \"slot_filling_settings\": {\n \"slot_filler_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_endpoint}/v1/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"created_by\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {\n \"model_settings\": {\n \"base_llm\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"system_prompt\": \"<string>\",\n \"prompt_templates\": {\n \"chat_template\": \"<string>\",\n \"chat_template_params\": {}\n }\n },\n \"embeddings\": {\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\"\n },\n \"is_base_llm_enabled\": true\n },\n \"router_settings\": {\n \"router_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {},\n \"routing_prompt\": \"<string>\",\n \"router_config\": {\n \"continue_journey_on_none\": true,\n \"confidence_threshold\": 123,\n \"confidence_method\": \"perplexity\"\n }\n },\n \"user_settings\": {\n \"confirm_routing\": true,\n \"clear_watsonx_assistant_context\": false,\n \"clientside_shortlisting\": false\n },\n \"slot_filling_settings\": {\n \"slot_filler_type\": \"unified\",\n \"model_name\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_params\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful Response
⌘I

