Retrieve Compliance Async Evaluation Job Detail Action

Get job details for an asynchronous compliance evaluation.

This action is available in API version 65.0 and later.

Special Access Rules 

To use this action, you must have the Compliance User permission set.

Supported REST HTTP Methods 

URI: /services/data/vXX.X/actions/standard/retrieveCmplAsyncEvalJobDtl

Where XX.X is the latest API version.

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a variable.

Inputs 

InputTypeDescription
compliance​AsyncEvaluation​JobIdstringRequired. ID of the asynchronous compliance evaluation job.
offsetSizeintegerNumber of records after which you want to search records.
pageSizeintegerNumber of records to display on a single page.

Outputs 

OutputTypeDescription
retrieveCmpl​JobDetail​ActionResponseApex-definedAn Apex ConnectApi.ComplianceJobStatusRepresentation record that contains the details and results of the compliance asynchronous evaluation job.

Example 

POST

This example shows a sample request for the Retrieve Compliance Async Evaluation Job Detail action.

1{
2  "inputs": [
3    {
4      "complianceAsyncEvaluationJobId": "1VUSG000000N4J3",
5      "pageSize":10,
6      "offsetSize":0
7    }
8  ]
9}

This is a sample request to call this invocable action from Apex code.

1public class JobStatus {
2  public void getJobStatus() {
3    String jobId = '<JOB ID>';
4    Integer pageSize = 10;
5    Integer offset = 0;
6
7    // Call API
8    ConnectApi.ComplianceJobStatusRepresentation response =
9      ConnectApi.IndustriesCompliance.getComplianceJobResults(jobId, pageSize,
10      offset);
11    System.debug('Response**********' + response);
12  }
13}
14
15// Execute the method
16JobStatus jobStatus = new JobStatus();
17jobStatus.getJobStatus();

This example shows a sample response for the Retrieve Compliance Async Evaluation Job Detail action.

1{
2  "actionName": "retrieveCmplAsyncEvalJobDtl",
3  "errors": null,
4  "invocationId": null,
5  "isSuccess": true,
6  "outcome": null,
7  "outputValues": {
8    "retrieveCmplJobDetailActionResponse": {
9      "complianceProcedureId": "1Naxx0000004C92CAE",
10      "complianceProcedureVersionId": "1Nbxx0000004C92CAE",
11      "failedEvaluationsCount": 0,
12      "jobId": "1VUxx0000004C92",
13      "results": [
14        {
15          "controls": [
16            {
17              "complianceControlId": "18Qxx0000004C92EAE",
18              "complianceControlVersionId": "18txx0000004C92AAE",
19              "complianceMessage": "Compliant!",
20              "errorId": null,
21              "errorMessage": null,
22              "isCompliant": true,
23              "status": "Success"
24            }
25          ],
26          "errorId": null,
27          "errorMessage": null,
28          "isCompliant": true,
29          "status": "Success",
30          "transactionId": "c6357adf-9798-4549-9d7f-80c12adfad89",
31          "transactionKey": "myKey1"
32        },
33        {
34          "controls": [
35            {
36              "complianceControlId": "18Qxx0000004C92EAE",
37              "complianceControlVersionId": "18txx0000004C92AAE",
38              "complianceMessage": "Not Compliant!",
39              "errorId": null,
40              "errorMessage": null,
41              "isCompliant": false,
42              "status": "Success"
43            }
44          ],
45          "errorId": null,
46          "errorMessage": null,
47          "isCompliant": false,
48          "status": "Success",
49          "transactionId": "c6357adf-9798-4549-9d7f-80c12adfad89",
50          "transactionKey": "myKey2"
51        }
52      ],
53      "successfulEvaluationsCount": 2,
54      "totalEvaluationsCount": 2
55    }
56  },
57  "sortOrder": -1,
58  "version": 1
59}