Secure Search API
Secure Search API requires two API calls:
- Get the security token
- Search API request using the security token
GET the Security Token
The request for authentication sends the credentials based on the security selected that is, SearchBlox Realm or LDAP Realm.
Prerequisite
Please select the realm in Search -> Security settings, give the required users, groups and then authenticate using the following API call:
Method
POST
Content-Type
application/json
URL
https://localhost:8443/searchblox/rest/v2/api/secured/authenticate
JSON Request
{
"username":"ad-test\\test",
"password":"password"
}
{
"username":"user",
"password":"pwd"
}
Search API Request
Using the token generated in the previous step you can get the search results in JSON format using the following API request
Prerequisite
Provide the token generated in the previous request as the bearer token under authentication. Please refer to the screenshot in postman for the same.
Method
GET
URL
https://localhost:8443/searchblox/rest/v2/api/search?query=*&public=true
Parameters
Below given are the basic mandatory parameters. There are a wide variety of parameters that are supported, please refer to Search Parameters
param | description |
---|---|
query | query string |
public | public parameter value to be true |
Updated over 3 years ago