Check on the status of the suggest
or build
request using the request ID received on submission of that request.
If results are available, the body of the response will contain a JSON object with either the like word list or the lexicon_id
of the new lexicon.
Otherwise, HTTP status code 204 is returned with an empty response. Use the x-status
header in the response to determine the request status.
Response body
If the request status is “Ready” or “Completed”, the body of the response will contain a json object with the requested results.
If a suggest
request was performed, the resulting JSON object contains the word list and like words for each.
[
{
"word": "AppTek",
"like":
[
"apptek",
"apptech"
]
}
}
If there is an error processing a particular word, it will not appear in the resulting word list. Check that the word does not contain special characters of punctuation other than a hyphen.
If a build
request was performed, the resulting JSON object contains the processing result and the lexicon_id
if successfully processed.
{
"success": true,
"error": null,
"lexicon_id": "ac0dfe75-5072-49af-a65d-4f3412fe7e64"
}
Response headers
x-status
- One of the following indicating the current status of the request:
Status | Description |
---|---|
“Received” | The request has been received but processing hasn’t started |
“Queued” | One or more sub-components of the request have been queued for processing |
“Pending” | All the components of the request have been queued for processing |
“Ready” | All components of the request are finished processing but the user callback to the user has not occurred. |
“Completed” | The request has finished processing and the user callback, if provided has been called. |
“Failed” | An error occurred processing the request. |
x-error
- If the request failed, this would contain an error message.x-progress
- Percentage (0-100) of the input that has completed processing.x-userdata
- This will contain the user data supplied with the original request.