Skip to main content
POST
Elastic search for pattern

Description

Query text responses given a pattern and optional sentiment filters. Optionally find synonyms or antonyms.

Payload

where:
  • projectId: unique identifier of the project. (Required).
  • pattern: term to query responses for. (Required).
  • questionId: single element array containing the unique identifier of the text question. (Required).
  • wordType: can be “none”, “synonym”, or “antonym”. “none” searches for the provided pattern, “synonym” searches for synonyms of the pattern, and “antonym” searches for antonyms of the pattern. If not specified, this will be treated as “none”. (Optional).
  • sentiment: an array containing any of the following elements: “vpos”, “pos”, “neu”, “neg”, and “vneg”. “vpos” is very positive, “pos” is positive, “neu” is neutral, “neg” is negative, and “vneg” is very negative. The service queries only responses with the selected sentiment parameters. (Required).
  • conceptTestsDisplayed: an array describing which responses within concept tests to query. (Optional).

Responses

200 OK

where:
  • result: array of objects, where each object is of the following structure:
    • object:
      • matches: string array consisting of matches wrapped in html <em> tags.
      • fullText: full response text of the found match
      • sentiment: sentiment tag of the response of the found match (vpos, pos, neu, neg, vneg).
      • questionId: unique identifier of the text question.
      • responseId: unique identifier of the response of the found match.
      • _score: calculated score of the found match as a floating point number.

401 Unauthorized

Invalid authorization.

500 Internal Server Error

An error occurred processing the request.

502 Bad Gateway

Invalid or missing parameters, or other internal error.

Authorizations

Authorization
string
header
required

Access token obtained from the m2m-token endpoint.

Headers

Authorization
string
required

Body

application/json

The body is of type object.

Response

Successful response