Using API to Get FieldId/Name Information

This API allows you to get all fields list (FieldId and Name) stored in Hawksearch Dashboard.

Example use case: Get all fields information.

Request: GET request to the API below:

GET /api/v9/FieldInfo HTTP/1.1 Host: dev.hawksearch.net X-HawkSearch-ApiKey: USE_YOUR_API_KEY con: application/json Cache-Control: no-cache Postman-Token: e72b5414-198d-3a18-6c27-e7231168c2f9

 

Response: The response is an array of field objects, every field object being a series of key-value pairs. Description of the data is as follows:

No

Key

Description

Value Type

No

Key

Description

Value Type

1

FieldId

The unique identifier of the field (unique across the whole system)

Number

2

Name

Name unique to an engine (can be the same for one or more engines)

lowercase alphanumeric string with underscores allowed

 

[ { "FieldId": 12345, "Name": "agegroup" }, { "FieldId": 412587, "Name": "color" }, { "FieldId": 741258, "Name": "brand" }, { "FieldId": 745896, "Name": "name" } ]

 

Field Info for a specific field

GET api/v9/FieldInfo/{id}

GET /api/v9/FieldInfo/12345 HTTP/1.1 Host: dev.hawksearch.net X-HawkSearch-ApiKey: USE_YOUR_API_KEY con: application/json Cache-Control: no-cache Postman-Token: e72b5414-198d-3a18-6c27-e7231168c2f9

Returns Field with a particular Id.
Parameters:

  • id: Unique Id of the Field (FromUri)