Automation engine provides RESTful API interface for processing reports.
URL: https://<server>/Audit/integration-api/reports/
The API call should be done using POST method, and the JSON document should be in the body of the request.
API uses OAuth 2.0 "Client Credentials" flow authentication. Client authentication instructions are described in Client Authentication documentation. Bearer token should be passed in "Authorization" headers in format Bearer <token>
. audit-report:create
scope should be requested while receiving a token.
POST /Audit/integration-api/reports/ HTTP/1.1
Host: your-server.example.com
Authorization: Bearer your_access_token_here
Cache-Control: no-cache
Content-Type: application/json
{
"company": "CyberdyneSystems",
"caseType": "personalProfile",
"person": {
"age": 29,
"name": "Dyson, Miles"
}
}
The Automation engine API endpoint accepts any valid JSON. The request body is validated against an empty JSON schema to ensure valid JSON format, but certain mandatory properties must be present:
In order to identify which company the report belongs to, there should be a string value on the document on path $.company
or $.companyId
.
In order to identify which reporting system the report belongs to, there should be a string value on the document on path $.caseType
.
The company and caseType properties do not need to be present in the fields configuration, which should only contain fields used for rules. However, Company/CaseType data must be present in the payload to identify the company and reporting system.
{
"company": "CyberdyneSystems",
"caseType": "personalProfile",
"person": {
"age": 38,
"name": "Dyson, Miles"
}
}
Besides Company and ReportingSystem identifiers, the data should be present on the document as well. Automation engine will try to parse each field of the reporting system from the JSON document while processing. It's important that all paths are valid according to the schema. Ideally the data should match the schema used for upload when creating, but the schema validation is not applied on data receipt.