API v2

The API can be accessed at /api/v2 and supports JSON, XML, and HTML as output format. The XML is generated from the JSON using the bijective XPath 3.1 transformation json-to-xml. The HTML is generated from the XML using the same XSLT transformations as in the main web search interface.
A few parameters are available for all endpoints:

Retrieve arguments

GET /api/v2/arguments

Response

{
  "query": {
    "text":"text",
    "properties":{
      "key":"value", ...
    },
    "start":"timestamp"
  },
  "arguments":[
    {
      "id":"id",
      "conclusion":"text",
      "premises":[
        {
          "text":"text",
          "stance":"stance-towards-conclusion: PRO or CON",
          "annotations":[
            {
              "type":"java-class",
              "start":"character-offset",
              "end":"character-offset"
            }, ...
          ]
        }, ...
      ],
      "context":{
        "key":"value", ...
      },
      "summary":"text",
      "explanation":{
        "score":score,
        "name":score-name,
        "details":[
          { explanation }, ...
        ]
      },
      "stance":"stance-towards-query: PRO or CON"
    }, ...
  ],
  "totalSize":number-of-matching-arguments-in-index,
  "resultsBefore":number-of-arguments-on-previous-pages,
  "retrievalTimeInMilliseconds":milliseconds-between-query-parsing-and-result-presentation
}

Get argument

GET /api/v2/arguments/id

This end point offers no additional parameters.

Response

{
  "id":"id",
  "conclusion":"text",
  "premises":[
    {
      "text":"text",
      "stance":"stance-towards-conclusion: PRO or CON",
      "annotations":[
        {
          "type":"java-class",
          "start":"character-offset",
          "end":"character-offset"
        }, ...
      ]
    }, ...
  ],
  "context":{
    "key":"value", ...
  }
}

Get aspect space

GET /api/v2/aspectSpace

The same parameters as for GET /api/v2/arguments apply. The aspect space is created from the arguments that are retrieved using these parameters. In addition, the following parameters are available to modify the way the aspect space is created.

Response

{
  "dimensions":[
    {
      "aspects":["name", ...],
      "weight":normalized-sum-of-weights-from-arguments,
      "index":non-negative-integer,
      "cartesianX":X-coordinate-of-this-dimension-in-an-cartesian-system in [-1;1],
      "cartesianY":Y-coordinate-of-this-dimension-in-an-cartesian-system in [-1;1]
    }, ...
  ],
  "ignoredAspects":[ "aspects-ignored-due-to-query-terms", ... ]
}
Back to main page