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 .xml suffix or ?format=xml

HTTP + XML

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

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

<PredictionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/webappella">
  <CurrentWord>String</CurrentWord>
  <Language>String</Language>
  <NumberOfSuggestions>String</NumberOfSuggestions>
  <PrecedingText>String</PrecedingText>
  <Principal xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Security.Claims">
    <d2p1:m_serializedClaimsIdentities>AAEAAAD/////AQAAAAAAAAAEAQAAAH9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24GAAAICAkCAAAAAAAAAAAAAAARAgAAAAAAAAAL</d2p1:m_serializedClaimsIdentities>
    <d2p1:m_version>1.0</d2p1:m_version>
  </Principal>
  <SucceedingText>String</SucceedingText>
</PredictionRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PredictionResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/webappella">
  <lingitwords>
    <prediction xmlns:d3p1="http://schemas.datacontract.org/2004/07/webappella.Speller">
      <d3p1:SuggestionWrapper i:nil="true" />
    </prediction>
  </lingitwords>
</PredictionResult>