Webappella Web Services

<back to all web services

PredictionRequest

The following routes are available for this service:
POST/prediction/
GET OPTIONS/prediction/{CurrentWord}
GET OPTIONS/prediction/{CurrentWord}/{PrecedingText}
GET OPTIONS/prediction/{CurrentWord}/{PrecedingText}/{SucceedingText}
PredictionRequest Parameters:
NameParameterData TypeRequiredDescription
CurrentWordpathstringNo
PrecedingTextpathstringNo
SucceedingTextpathstringNo
LanguagebodystringNo
NumberOfSuggestionsbodystringNo
PrincipalbodyClaimsPrincipalNo
PredictionResult Parameters:
NameParameterData TypeRequiredDescription
lingitwordsbodyLingitWordsNo
LingitWords Parameters:
NameParameterData TypeRequiredDescription
predictionbodySuggestionWrapper[]No
SuggestionWrapper Parameters:
NameParameterData TypeRequiredDescription
TextbodystringNo
ResultTextbodystringNo
DisplayTextbodystringNo
LookUpTypebodyLookupTypeNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/PredictionRequest HTTP/1.1 
Host: 3.248.250.59 
Content-Type: application/json
Content-Length: length

{"CurrentWord":"String","PrecedingText":"String","SucceedingText":"String","Language":"String","NumberOfSuggestions":"String","Principal":{"Claims":[],"Identities":[]}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"lingitwords":{"prediction":[{}]}}