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

Compare with Current View Page History

« Previous Version 4 Next »

This REST Handler contains general/utility functionality

POST saga/api/v2/preview

Will return Sagainterpretation 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 sentences
  • pretty ( type=boolean | default=false | optional ) - Used to pretty format the JSON result

Request Examples

curl -X POST \
  http://localhost:8080/saga/api/v2/preview \
  -H 'Content-Type: application/json' \
  -d '
{
    "q": "who is morgan freeman",
	"tags": ["human"],
	"splitRegex": "[\r|\n]+",
	"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