Export Catalog Resources
curl --request POST \
--url https://{api_endpoint}/v1/catalog/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_types": [],
"filters": {}
}
'import requests
url = "https://{api_endpoint}/v1/catalog/export"
payload = {
"resource_types": [],
"filters": {}
}
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({resource_types: [], filters: {}})
};
fetch('https://{api_endpoint}/v1/catalog/export', 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/catalog/export",
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([
'resource_types' => [
],
'filters' => [
]
]),
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/catalog/export"
payload := strings.NewReader("{\n \"resource_types\": [],\n \"filters\": {}\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/catalog/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_types\": [],\n \"filters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_endpoint}/v1/catalog/export")
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 \"resource_types\": [],\n \"filters\": {}\n}"
response = http.request(request)
puts response.read_body{
"metadata": {},
"assistants": [
{
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"name": "<string>",
"nickname": "<string>",
"instructions": "<string>",
"user_start_messages": [
"<string>"
],
"llm_name": "<string>",
"llm_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_access_enabled": true,
"context_variables": []
}
],
"models": [
{
"model_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"name": "<string>",
"display_name": "<string>",
"model_type": "chat",
"api_base": "<string>",
"api_version": "<string>",
"deployment_id": "<string>",
"config": {},
"provider_config": {},
"connection_id": "<string>"
}
],
"document_collections": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
]
}
],
"vector_indices": [
{
"name": "<string>",
"embeddings_model_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"chunk_size": 400,
"chunk_overlap": 20,
"status": "not_ready",
"status_msg": "<string>",
"top_k": 10,
"extraction_strategy": "standard"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Catalog Management
Export Catalog Resources
Export Catalog Resources
curl --request POST \
--url https://{api_endpoint}/v1/catalog/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_types": [],
"filters": {}
}
'import requests
url = "https://{api_endpoint}/v1/catalog/export"
payload = {
"resource_types": [],
"filters": {}
}
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({resource_types: [], filters: {}})
};
fetch('https://{api_endpoint}/v1/catalog/export', 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/catalog/export",
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([
'resource_types' => [
],
'filters' => [
]
]),
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/catalog/export"
payload := strings.NewReader("{\n \"resource_types\": [],\n \"filters\": {}\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/catalog/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_types\": [],\n \"filters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_endpoint}/v1/catalog/export")
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 \"resource_types\": [],\n \"filters\": {}\n}"
response = http.request(request)
puts response.read_body{
"metadata": {},
"assistants": [
{
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"name": "<string>",
"nickname": "<string>",
"instructions": "<string>",
"user_start_messages": [
"<string>"
],
"llm_name": "<string>",
"llm_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_access_enabled": true,
"context_variables": []
}
],
"models": [
{
"model_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"name": "<string>",
"display_name": "<string>",
"model_type": "chat",
"api_base": "<string>",
"api_version": "<string>",
"deployment_id": "<string>",
"config": {},
"provider_config": {},
"connection_id": "<string>"
}
],
"document_collections": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
]
}
],
"vector_indices": [
{
"name": "<string>",
"embeddings_model_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "<string>",
"tenant_name": "<string>",
"title": "<string>",
"description": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_username": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"chunk_size": 400,
"chunk_overlap": 20,
"status": "not_ready",
"status_msg": "<string>",
"top_k": 10,
"extraction_strategy": "standard"
}
]
}{
"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
- CustomAssistantOut
- WatsonAssistantOut
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

