Dashboard API

Overview

The Hawksearch platform enables online retailers and publishers the ability to drive a rich, compelling user search and navigation experience. This experience drives visitors to the products and information that they seeking.

When navigating throughout a site, visitors discover landing pages that contain relevant content and products for a particular category or topic. As part of a Hawksearch implementation, business users will be creating these landing pages.

There are multiple ways to create a landing page:

  • Using the Hawksearch Workbench for Landing Pages Administration
  • Providing the data feed for landing pages so these can be created during the rebuild index process (landing page data feed document is described in a separate document)
  • Using the Hawksearch REST API to create / update / delete pages on demand

This document goes over the Hawk REST API for managing landing pages and rebuilding the site index.

API

Hawksearch offers a REST API to manage integration with your website. It uses the four HTTP methods GET, POST, PUT and DELETE to execute different operations on landing pages. This REST API allows:

  • Landing Page Management (Create/Update/Delete)
  • Index Rebuilding On Demand

Domains

Hawksearch has three environments available: Development, Test, and load-balanced Production. When using the search API methods in this document, the following domains can be used to access each environment after your engine has been set up in that environment.

🚧

Before You Begin

Please ensure that your client-specific endpoints are configured before implementing any API integrations. Please refer to this article to learn more about client-specific endpoints and reach out to our CSD team for any questions.

Development

client-specific URL: https://enginename.dev.dashboard-na.hawksearch.com

Configurations for an engine in this location are maintained in the HawkSearch Workbench at dev.hawksearch.net.

Test

client-specific URL: <https://enginename.test.dashboard-na.hawksearch.com>

Configurations for an engine in this location are maintained in the HawkSearch Workbench at test.hawksearch.net.

Production

client-specific URL: https://enginename.dashboard-na.hawksearch.com

Configurations for an engine in this location are maintained in the HawkSearch Workbench at dashboard-na.hawksearch.com.

AUTHENTICATION

In order to use the API, pass the API key provided in the header of the request to authenticate the request. You can find this in the Account Info section within the Workbench.

Please make the request using the Secure Socket Layer (SSL) and you access the REST Service URL via https. The header variable to use for the API key is: X-HawkSearch-ApiKey

Sample code for authentication - note that the API key needs to be added in line 4 per the code samples below.

C#

HttpClient client = new HttpClient();
client.BaseAddress = new Uri(apiUrl);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Add("X-HawkSearch-ApiKey", apiKey);

VB.NET

Dim client As HttpClient = New HttpClient()
client.BaseAddress = New Uri(apiUrl)
client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json"))
client.DefaultRequestHeaders.Add("X-HawkSearch-ApiKey", apiKey)

REST API Methods

A list of all available web methods can be found on the following URL: adminapi-na.hawksearh.com

All methods have an additional parameter from the URL API version, e.g. v10