Get collection status
import requests
url = "https://{FUSION_HOST}/api/collections/{collection}/status"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION_HOST}/api/collections/{collection}/status")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION_HOST}/api/collections/{collection}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION_HOST}/api/collections/{collection}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/collections/{collection}/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION_HOST}/api/collections/{collection}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION_HOST}/api/collections/{collection}/status{
"maxShardsPerNode": 1,
"replicationFactor": 1,
"shards": {
"shard1": {
"range": "80000000-7fffffff",
"state": "active",
"replicas": {
"core_node1": {
"state": "active",
"core": "demo_shard1_replica1",
"leader": true,
"base_url": "https://FUSION_HOST:8983/solr",
"node_name": "FUSION_HOST:8983_solr"
}
}
}
}
}Get collection status
Status includes the state of each shard and each shard’s replica. Each shard will be listed, and within that each replica, including the core name, its status as leader, the base URL, and the node name.
GET
/
collections
/
{collection}
/
status
Get collection status
import requests
url = "https://{FUSION_HOST}/api/collections/{collection}/status"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION_HOST}/api/collections/{collection}/status")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION_HOST}/api/collections/{collection}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION_HOST}/api/collections/{collection}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/collections/{collection}/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION_HOST}/api/collections/{collection}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION_HOST}/api/collections/{collection}/status{
"maxShardsPerNode": 1,
"replicationFactor": 1,
"shards": {
"shard1": {
"range": "80000000-7fffffff",
"state": "active",
"replicas": {
"core_node1": {
"state": "active",
"core": "demo_shard1_replica1",
"leader": true,
"base_url": "https://FUSION_HOST:8983/solr",
"node_name": "FUSION_HOST:8983_solr"
}
}
}
}
}Was this page helpful?