Linguistic: Reporting
Reporting in Congree is done following these actions:
- Open a new reporting session by requesting a session ID
- Store the overall report for the entire document
- Store the reports for the different contexts
- Close the report session by setting the report status
Opening a report session
POST | /congree/api/Linguistic/Reporting/v1/Sessions | HTTP request to get the ID of the current reporting session |
The request returns a JSON object containing the session id.
{ "SessionId": "string" }
Storing a document report
PUT | Congree/api/Linguistic/Reporting/v1/Sessions/{sessionid} | HTTP request to store the report |
If the request was succesful it returns 200 status.
Storing a paragraph report
PUT | Congree/api/Linguistic/Reporting/v1/Sessions/{sessionid}/Paragraphs/{paragraphid} | HTTP request to store a paragraph specific report |
The input is a JSON object like shown in the sample below.
{ "Errors": [ { "ErrorId": 0, "ErrorType": "Abbreviation", "ErrorCode": "string", "Notification": "string", "Proposals": [ "string" ], "Status": "Normal" } ], "Context": "string" }
Property | Description |
---|---|
Errors | An array of errors for the given paragraph, e.g. context. |
ErrorId | The Id of the error as returned by the document check |
ErrorType | The category the error belongs to. Possible values are: 'Abbreviation', 'Grammar', 'Spelling', 'Style', 'Terminology', 'ValidTerm' |
ErrorCode | The code of the error as returned by the document check, i.e. the name of the rule |
Notification | The message assigned to the rule |
Proposals | An array of strings as returned by the document check |
Status | The status of the error. Possible values are:Â 'Normal', 'Ignored', 'Disregarded' |
If the request was succesful it returns 200 status.
Setting the report status and ending the session
PUT | Congree/api/Linguistic/Reporting/v1/Sessions/{sessionid}/Status | HTTP request to finish the report session |
The request expcects a JSON object a body parameter.
{ "IsCompleteCheck": true }
Possible values of the property "IsCompleteCheck" are true or false.