For an authenticated user, this method returns a list of measurements for the posted documents. Each document is gauged for the amount of polarity with respect to the observer given. The observer functions as a document filter, selecting only sentences matching the observer terms, include and exclude filters. Please observe that you need to spedify a valid MonitorAPI apiKey.
https://ethersource.gavagai.se/ethersource/rest/v2/gauge?apiKey=123ok
media type | data type | description |
---|---|---|
application/json | GaugeRequest (JSON) | The request, stated in JSON format { "documents":[ { "body":"First text to analyze", "uri":"unique identifier 1" }, { "body":"Second text to analyze", "uri":"unique identifier 2" } ], "poleIds": [ 1, 2, 3 ], "observerId": 10 } |
media type | data type | description |
---|---|---|
application/json | GaugeResponse (JSON) | A list of measurements from the poles associated with the specified observer when you do not specify any pole ids. If you specify pole ids in a list (and you have the right to see these poles, either if you own them or if you have read access to them), you will get values for those only. |
POST /gauge
Content-Type: application/json
Accept: application/json
{
"poleIds" : [ 12345, 12345 ],
"observerId" : 12345,
"documents" : [ {
"body" : "...",
"title" : "...",
"uri" : "..."
}, {
"body" : "...",
"title" : "...",
"uri" : "..."
} ]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"measurements" : [ {
"uri" : "...",
"scores" : [ {
"poleId" : 12345,
"score" : 12345.0,
"poleName" : "..."
}, {
"poleId" : 12345,
"score" : 12345.0,
"poleName" : "..."
} ]
}, {
"uri" : "...",
"scores" : [ {
"poleId" : 12345,
"score" : 12345.0,
"poleName" : "..."
}, {
"poleId" : 12345,
"score" : 12345.0,
"poleName" : "..."
} ]
} ],
"observer" : {
"id" : 12345,
"name" : "...",
"created" : { },
"kpiId" : 12345
}
}