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

Compare with Current View Page History

« Previous Version 9 Next »

This REST Handler contains general/utility functionality

POST saga/api/v2/processText

Will return Saga interpretation graph in the format specified.

By default it returns the graph in HTML format which is the one used by the UI. It also can return JSON or plain text.

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": "text",
	"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")



GET saga/api/v2/info

Returns build specific and configuration information about Saga.

Build information contains Title, vendor, version, build revision and date.

Configuration information contains the solution (elastic index) and providers configured at the moment.

Request Examples

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


Response

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



  • No labels