You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This REST Handler contains general/utility functionality

POST saga/api/v2/processText

Will return Saga interpretation graph. At the moment it is HTML based but eventually the user will be able to choose the format.

Parameters

  • q ( type=string | required ) - This is the text to process
  • tags ( type=string array | required ) - List of tags to use to process the text
  • splitRegex ( type=string | default=[\r |\n ]+ | optional ) - Specifies the regex to use to split text into TEXT_BLOCKs
  • type ( type=string | default=ux | optional ) - Specifies the format of the results. It could be one of these values: "ux", "text" or "json"
  • pretty ( type=boolean | default=false | optional ) - Used to pretty format the JSON result

Request Examples

curl -X POST \
  http://localhost:8080/saga/api/v2/processText \
  -H 'Content-Type: application/json' \
  -d '
{
    "q": "I like traveling with Air Paris",
	"tags": ["airline"],
	"splitRegex": "[\r|\n]+",
	"type": "ux",
	"pretty": true
}'

Response

$action.getHelper().renderConfluenceMacro("$codeS$body$codeE")

GET saga/api/v2/solution

Returns the information of the solution currently being used. A solution is basically the set of Elasticsearch indices in use.

Request Examples

curl -X GET \
  http://localhost:8080/saga/api/v2/solution \
  -H 'Content-Type: application/json' \
  -d '
{
}'

Response

$action.getHelper().renderConfluenceMacro("$codeS$body$codeE")





  • No labels