Dashboard API

In this article you will find:


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.

Development

https://dev.hawksearch.net/api/v10

Test

https://test.hawksearch.net/api/v10

Production

https://adminapi-na.hawksearch.com/api/v10

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: http://lusearchapi-na.hawksearch.com/api/v9

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

Below are the detailed descriptions of the API functions: