Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt

...

HTTP response status codes described in this section indicate whether a specific HTTP request has been successfully completed. Refer to their descriptions below when integrating WebSpellChecker into your applications and testing REST API. This section covers: 

Table of Contents
maxLevel2
stylenone

Server version request format

Use the following format for your request URL: 

Code Block
titleRequest URL (GET): 
http(s)://your_host_name:2880/?cmd=[command]&[parameter]=[value]

Cloud version request format

Use the following template for your request URL: 

Code Block
titleRequest URL (GET): 
http(s)://svc.webspellchecker.net/spellcheck31/script/ssrv.fcgi?cmd=[command]&[parameter]=[value]&customerid=[encrypted_customer_ID]

Response Structure

The response structure below is applicable to all error messages you may receive. The difference depends on the command used and the message returned.

Code Block
languagejs
{
   "error": true,
   "is_critical": 0,
   "message": "...",
   "command": "..."
}

400 Bad Request

The HTTP 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error.

Tip
iconfalse

Possible Cause 

  • Incorrect syntax
  • Incorrect spelling of command, parameter, or value name
Info
iconfalse

Remediation

Check the command correctness:

  • Verify if the request command syntax is correct, and the command is not empty,
  • Make sure the request message is framed correctly.

For example, the following command has a syntax error in "check_spelling" command name:

Code Block
languagejs
{
   "error": true,
   "is_critical": 0,
   "message": "The command value 'check_spellin' for 'cmd' parameter is unknown. Check available commands. Contact [email protected] for more details.",
   "command": "check_spellin"
}

Remediation for the example above is to specify a correct command name. 

Tip

Tip: Refer to the list of available commands in Cloud Web API and Server Web API.

For example, the command is unspecified: 

Code Block
languagejava
{
   "error": true,
   "is_critical": 0,
   "message": "The command value for 'cmd' parameter is not specified in your request. Contact [email protected] for more details.",
   "command": ""
}

Remediation for the example above is to specify the command value.

For example, the parameter key is invalid:

Code Block
languagejava
{
   "error": true,
   "is_critical": 0,
   "message": "The command value for 'cmd' parameter is not specified in your request. Contact [email protected] for more details.",
   "command": ""
}

Remediation for the example above is to specify a correct parameter key. 

403 Forbidden

The HTTP 403 Forbidden client error status response code indicates that the server understood the request but refuses to authorize it.

Tip
iconfalse

Possible Cause 

Some issues usages or occurrences d in the response, for example: 

  • Language is disabled/unallowed; 
  • Service on the unallowed domain; 
  • Command, check type unallowed; for example, grammar checking command is not available under free services.
  • Product unavailable for the given license; 
  • Exceeded usage limitations;
  • Service subscription expiration.
Info
iconfalse

Remediation

In most cases an error description provides the exact cause of the issue and solution on how to fix the issue in response on your side.

Example of incorrect customer ID:

Code Block
languagejava
{
   "error": true,
   "is_critical": 0,
   "message": "An incorrect value is used for the service ID parameter. To access the service, Cloud customers are required to use a key which they received in the 'config.ini' file which is attached to the subscription email or 'Download configuration file' from the account panel on the webspellchecker.com website. (Decoded data too short to contain the main chunk body)",
   "command": "check_spelling"
}

Example of expired customer ID: 

Code Block
languagejava
{
   "error": true,
   "is_critical": 0,
   "message": "The request from '' has failed. '' is not in the list of allowed domains for this subscription. Check the list of allowed domains in your subscription management panel.",
   "command": "check_spelling"
}

Remediation: request a new/valid customer ID.

Example of the list of unallowed domains: 

Code Block
languagejava
{
   "error": true,
   "is_critical": 0,
   "message": "The request from '' has failed. '' is not in the list of allowed domains for this subscription. Check the list of allowed domains in your subscription management panel.",
   "command": "check_spelling"
}

Remediation: Verify the subscription covers the domain where you are using WebSpellChecker. 

Example of the subscription key which is either turned off or does not exist yet:

Code Block
languagejava
themeEmacs
{
   "error": true,
   "is_critical": 0,
   "message": "Your subscription to the service is disabled or doesn't exist. Contact [email protected] for more details.",
   "command": "check_spelling"
}

Remediation: Contact our support team for details.  

500 Internal Server Error

The HTTP 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. 

Tip
iconfalse

Possible Cause 

This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response.

This error usually denotes some situation when the server is not aware of how to handle it properly. It can be for example, any exceptions of the server logic including all hardware issues. 

Info
iconfalse

Remediation

For the moment, the only option to fix the issue with such request responses is to contact our support team at [email protected]

503 Service Unavailable

This parameter is applicable for WebSpellChecker Server version only. You may encounter this error in the following cases:

  • License is invalid.
  • Service is unavailable. 

...

-include
IN:_include_http_response_status_codes_server_cloud_55x
IN:_include_http_response_status_codes_server_cloud_55x
nopaneltrue