Collection API
The Collections API in SearchBlox allows users to retrieve a list of collection names and IDs, as well as get the ID of an individual collection using simple HTTP POST and GET requests. This API also provides methods to work with certain aspects of collections and their indexed documents using REST requests with JSON payloads.
Listing the Collections
Index URL
https://localhost:8443/rest/collection/list
Method
POST
Media Type
application/json
Headers
content-type : application/json
accept: application/json
Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==
Document Syntax
{
"apikey":"C6D418861BAD66A46A7CC96B70CEADF9"
}
Document Description
| Field | Description | Type | Example Value |
|---|---|---|---|
apikey | The API key used for authentication | String | C6D418861BAD66A46A7CC96B70CEADF9 |
Get the individual Collection Id
Index URL
https://localhost:8443/rest/collection/list
Method
POST
Media Type
application/json
Headers
content-type : application/json
accept: application/json
Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==
Document Syntax
{
"apikey":"C6D418861BAD66A46A7CC96B70CEADF9",
"name": "site"
}
Document Description
| Field | Description | Type | Example Value |
|---|---|---|---|
apikey | The API key used for authentication | String | C6D418861BAD66A46A7CC96B70CEADF9 |
name | The name parameter, possibly specifying a site or category | String | site |
Get the Status of the Collections List
Status of the Collections List URL
https://localhost:8443/rest/collection/listCollectionsStatus
Method
POST
Media Type
application/json
Headers
content-type : application/json
accept: application/json
Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==
Document Syntax
{
"apikey" : "D12E5F6973A24461CCC8359CC5C0D128",
"col_ids":[1,2],
"col_names":["col1","col2"]
}
Document Description
| Field | Description | Type | Example Value |
|---|---|---|---|
apikey | The API key used for authentication | String | D12E5F6973A24461CCC8359CC5C0D128 |
col_ids | List of collection IDs | Array | [1,2] |
col_names | Corresponding names for the collections | Array | ["col1","col2"] |
Updated 27 days ago
