Secure Search API

Secure Search API requires two API calls

  1. Get the security token
  2. Search servlet 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:

http://localhost:8080/searchblox/rest/v2/api/secured/authenticate

JSON Request:

{
"username":"ad-test\\test",
"password":"password"
}
{
"username":"user",
"password":"pwd"
}

Search servlet API request

Using the the token generated in previous step you can get the search results in JSON format using the following API request

Prerequisite

Provide the token generated in previous request as bearer token under authentication. Please refer the screenshot in postman for the same.

Method:

GET

URL:

http://localhost:8080/searchblox/rest/v2/api/search?query=*

params

Below given are basic mandatory parameters. There are a wide variety of parameters that are supported, please refer Search Parameters

param

description

query

query string


Did this page help you?