API resources output
In case of success or managed errors, the API's REST interface resources return HTTPS status 200 OK and a response containing an UTF-8 encoded JSON object.
Success
In case of success, all the document analysis, document classification and information detection resources share this response format:
{
"success": true,
"data": {
"content": analyzed text,
"language": language code,
"version": technology version info,
resource-specific output
}
}
Self-documention resources, instead, have their peculiar output format.
The Boolean property success indicates that processing was successful while the data object contains the results.
The data object has a similar structure for all the resources:
contentis the analyzed text.languageis the ISO 639-1 language code.versiongives information about the technology for reporting purposes.
After these properties the resource-specific output follows.
For more information about the output of specific resources, refer to the following:
-
Document analysis:
- Information detection:
Managed errors
In case of a managed error, all the API resources return a specific response.
Other errors
In case of unmanaged application errors or other anomalies, the API returns specific HTTP status codes.