Collection API
The SearchBlox Collections API enables the user to get a list of collection names/ids as well as individual collection id from SearchBlox using simple HTTP POST and GET actions. SearchBlox Collection API provides methods for working with few aspects of the collection and 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
JSON Fields | Value |
---|---|
apikey | API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file. |
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
JSON Fields | Value |
---|---|
apikey | API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file. |
name | Name of the collection for which the id has to be identified |
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
JSON Fields | Value |
---|---|
apikey | API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file. |
col_ids | List of Collection Ids. |
col_names | List of collection names. |
Updated about 2 years ago