Retrieve Query Profile

Retrieves a query profile.

A query profile specifies the manipulation configuration to apply to the query criteria and corresponding results of a search against an unstructured text index. The Retrieve Query Profile allows you to retrieve a query profile configuration.

Quick Start

Use this API to retrieve the details of a query profile. Supply the name of the query profile you want to examine.

For example:

/1/api/sync/retrievequeryprofile/v1?query_profile=sdksynonyms

The response returns the details of the query profile, including the index it is associated with, and details of promotions, synonyms, or blacklists it contains. The example below describes a query profile with synonyms enabled and an empty categories field.

{
  "query_profile": "sdksynonyms",
  "description": null,
  "query_manipulation_index": "search_default_index",
  "promotions_enabled": false,
  "promotion_categories": [],
  "promotions_identified": false,
  "synonyms_enabled": true,
  "synonym_categories": [],
  "blacklists_enabled": false,
  "blacklist_categories": []
}

Tip: To remind yourself of the names of the query profiles you have configured, you can use the API, setting the type parameter to query_profile.

Synchronous
https://api.havenondemand.com/1/api/sync/retrievequeryprofile/v1
Asynchronous
https://api.havenondemand.com/1/api/async/retrievequeryprofile/v1
Authentication

This API requires an authentication token to be supplied in the following parameter:

Parameter Description
apikey The API key to use to authenticate the API request.
Parameters

This API accepts the following parameters:

Required
Name Type Description
query_profile
resource The name of the query profile. The maximum length is 100 characters.

This API returns a JSON response that is described by the model below. This single model is presented both as an easy to read abstract definition and as the formal JSON schema.

Asynchronous Use

Additional requests are required to get the result if this API is invoked asynchronously.

You can use /1/job/status/<job-id> to get the status of the job, including results if the job is finished.

You can also use /1/job/result/<job-id>, which waits until the job has finished and then returns the result.

Model
This is an abstract definition of the response that describes each of the properties that might be returned.
Retrieve Query Profile Response {
query_profile ( string ) The name of the query profile.
description ( ) The query profile description.
query_manipulation_index ( string ) The name of the query manipulation index.
promotions_enabled ( boolean ) Whether to enable promotion.
promotion_categories ( array[string] ) A list of promotion categories.
promotions_identified ( boolean ) Whether to identify whether documents are a promotion or not.
synonyms_enabled ( boolean ) Whether to enable synonyms.
synonym_categories ( array[string] ) A list of synonym categories.
blacklists_enabled ( boolean ) Whether to enable blacklist.
blacklist_categories ( array[string] ) A list of blacklist categories.
}
Model Schema
This is a JSON schema that describes the syntax of the response. See json-schema.org for a complete reference.
{
    "properties": {
        "query_profile": {
            "type": "string"
        },
        "query_manipulation_index": {
            "type": "string"
        },
        "promotions_enabled": {
            "type": "boolean"
        },
        "promotion_categories": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "promotions_identified": {
            "type": "boolean"
        },
        "synonyms_enabled": {
            "type": "boolean"
        },
        "synonym_categories": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "blacklists_enabled": {
            "type": "boolean"
        },
        "blacklist_categories": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "required": [
        "query_profile",
        "description",
        "query_manipulation_index",
        "promotions_enabled",
        "promotion_categories",
        "promotions_identified",
        "synonyms_enabled",
        "synonym_categories",
        "blacklists_enabled",
        "blacklist_categories"
    ],
    "type": "object"
}


If you would like to provide us with more information then please use the box below:

We will use your submission to help improve our product.