Learn how to redirect your users from Staffbase Search to your federated search solution in a seamless manner.
The redesigned search results page offers greater flexibility, allowing you to tailor the search experience to your business needs.
This article explains how to use the Search Settings API to:
With this setup, when users enter a search term, they are redirected to the specified URL, such as your federated search page, together with the search query.
Prerequisites:
Update the general settings In the general settings of the search settings page, you can hide the search flyout and provide the custom redirect URL to which you want to direct your users.
PUT
request to /search/settings/general
. In the request body schema, set the following:Parameter | Action |
---|---|
localizations | Define the object that contains localization strings of the search title. |
showFlyout | Set it as false . |
redirectUrl | Provide the URL to which you want to redirect the users for search. |
Example request
curl --location --request PUT 'https://exampleapp.staffbase.com/api/search/settings/general' \--header 'Authorization: Basic {Token}'--header 'Content-Type: application/json' \--data-raw '{ "localizations": { "de_DE": { "title": "Suchen" }, "en_US": { "title": "Search" } }, "showFlyout": false, "redirectUrl": "https://some-url.here/search?q={query}"}'
You get a 200 OK response that the search settings are updated. For request and response samples, see the Search Settings API.