Integrate Staffbase Content Into Your Federated Search

Learn how to use different search endpoints to fetch content into your federated search solutions.

Employee App
Staffbase Intranet
beta

Federated search is a powerful way to centralize access to content from multiple platforms. In this article, you’ll learn how to use Staffbase search endpoints to surface content such as news posts, plugins, user profiles, and media within your federated search solution. By integrating Staffbase content into your federated search, users can discover relevant information without switching platforms. This integration not only enhances the user experience but also ensures that search results respect the permissions and access controls enforced by the Staffbase platform. This approach is ideal if you want to make Staffbase content discoverable through search based on user input, while also avoiding direct indexing of the data.

Prerequisite:

  • You have implemented OAuth client access token on demand, using the following scopes for their respective endpoints:
    • For installations: plugins:read
    • For media: media:read
    • For posts: psosts:read

Based on the user’s query, the endpoint performs a text search across all searchable profile fields and returns the relevant information.

  • Make a GET request to /profiles/search?query={queryterm}.
Terminal window
curl --location 'https://exampleapp.staffbase.com/api/profiles/search?query={queryterm}' \
--header 'Authorization: Basic {Token}' \

For request and response samples, see the Profile API.

The endpoint performs a text search across the title, content, description, and hashtags used for the plugins.

  • Make a GET request to /installations/search?query={queryterm}.
Terminal window
curl --location 'https://exampleapp.staffbase.com/api/installations/search?query={queryterm}' \
--header 'Authorization: Basic {Token}'

For request and response samples, see the Installation API.

The endpoint performs a text search across the filename, content, or file type and returns information that matches the search term.

  • Make a GET request to /media/search?query={queryterm}.
Terminal window
curl --location 'https://exampleapp.staffbase.com/api/media/search?query={queryterm}' \
--header 'Authorization: Basic {Token}'

For request and response samples, see the Media API.

The endpoint performs a text search across the content, hashtags, image descriptions, teasers, or titles of the news posts.

  • Make a GET request to /posts/search?query={queryterm}.
Terminal window
curl --location 'https://exampleapp.staffbase.com/api/posts/search?query={queryterm}' \
--header 'Authorization: Basic {Token}'

For request and response samples, see the News API.