Show / Hide Table of Contents

    Reports

    This article documents how to perform actions via the API relating to reports. Ensure that the appropriate authentication headers are configured when sending these requests.

    Service location

    The endpoint you need to use is based on which environment is hosting your PACE system. You can find this out by checking your normal login link. Make your selection below and all examples will be tailored to your environment.

    Retrieve all reports

    get api/reports

    This action will return all reports created in the PACE Administration system. The results will indicate whether a report can be run from the API, and if it requires any parameters to be submitted.

    Example request

    Send a GET request to https://online.cardinus.com/api/reports to retrieve all the reports in the PACE system.

    Example response

    {
        "Count": 34,
        "Items": [
            {
                "Name": "User status",
                "Description": "This report shows risk assessment, training status and task codes for each user.",
                "CreatedDate": "2015-06-30T16:15:12.3",
                "CreatedBy": "Cardinus Admin",
                "ModifiedDate": "2016-07-26T15:12:18.197",
                "ModifiedBy": "Cardinus Admin",
                "ReportGuid": "e7c0e248-4a00-4de5-913c-b283a48aed51",
                "ApiEnabled": false,
                "ApiParameters": null
            },
            {
                "Name": "Risk assessment list",
                "Description": "This report lists risk assessment records.",
                "CreatedDate": "2015-07-01T13:41:42.817",
                "CreatedBy": "Cardinus Admin",
                "ModifiedDate": "2016-07-26T15:00:42.1",
                "ModifiedBy": "Cardinus Admin",
                "ReportGuid": "91f98232-0ba6-4806-a177-2b41fab0219e",
                "ApiEnabled": true,
                "ApiParameters": [
                    "StartDate",
                    "EndDate",
                    "Assessments"
                ]
            },
            {
                "Name": "User list",
                "Description": "This report lists all course users.",
                "CreatedDate": "2015-09-02T15:16:58.423",
                "CreatedBy": "Master Admin",
                "ModifiedDate": "2016-07-26T15:10:21.317",
                "ModifiedBy": "Master Admin",
                "ReportGuid": "b4ceacb2-a46b-45a0-bee0-6b46acd62797",
                "ApiEnabled": true,
                "ApiParameters": []
            },
            etc...
        ]
    }
    

    Retrieve a report with the given ID

    get api/reports/{id}

    This action will return the report created in the PACE Administration system via the parameter passed in on the request. The parameter is a report identifier in a GUID format.

    Parameter Description Location
    id Report ID in a GUID format URL

    Example request

    URL: https://online.cardinus.com/api/reports/{id} (GET)

    https://online.cardinus.com/api/Reports/336f6b42-3e33-461f-8cba-4997c9882f85
    

    Example response

    {
        "Name": "User status",
        "Description": "This report shows risk assessment, training status and task codes for each user.",
        "CreatedDate": "2015-06-30T16:15:12.3",
        "CreatedBy": "Cardinus Admin",
        "ModifiedDate": "2016-07-26T15:12:18.197",
        "ModifiedBy": "Cardinus Admin",
        "ReportGuid": "e7c0e248-4a00-4de5-913c-b283a48aed51",
        "ApiEnabled": false,
        "ApiParameters": null
    }
    

    Run a report

    post api/reports/run/{id}

    This action will run the specified report via the passed parameter which is a report identifier in a GUID format.

    Report data format

    The format of the data can be controlled by specifying an Accept header. There are two format's supported, plain text comma-separated values and JSON. If the Accept header is omitted then JSON will be returned.

    Value of Accept Report data format
    text/csv comma-separated values
    application/json JSON formatted
    omitted JSON formatted

    Example request

    Send a POST request to https://online.cardinus.com/api/Reports/Run/{id} with the appropriate parameters in the payload body.

    The following shows all the different parameter types in the body part of the POST request that maybe needed for a report:

    {
        "StartDate": DateTime,   // yyyy-MM-dd e.g. "2024-01-01"
        "EndDate": DateTime,
        "Programmes": [
            string
        ],
        "Assessments": [
            string
        ],
        "InvitationTemplates": [
            string
        ],
        "ReminderTemplates": [
            string
        ],
        "CountReminderTemplates": [
            string
        ],
        "UarChaserTemplates": [
            string
        ],
        "CountUarChaserTemplates": [
            string
        ]
    }
    

    And in the body of the request, pass the parameters as follows:

    {
          "StartDate": "2023/06/01 00:00:00",
          "EndDate": "2023/11/08 00:00:00",
          "Programmes": [
                "name"
          ],
          "Assessments": [
                "Ergonomic Desk Assessment - HWP",
                "Healthy Working Plus",
                "Healthy Working Plus - Profile"
          ]
    }
    
    Important

    The content-type header must be included and set to application/json.

    As above we are passing in four different parameter attributes required for the Risk assessment list report. these are StartDate, EndDate, Programmes and Assessments. Programmes and Assessments are array types.

    Retrieve an overview of all reports

    get api/reports/overview

    This action will give an overview of relevant data for all reports in the PACE Administration system.

    Example request

    Send a GET request to https://online.cardinus.com/api/reports/overview with no parameters to get the overview of report data in your PACE system.

    Example response

    {  
        "Count": 2920
    }
    

    Available Reports

    At the time of publishing this documentation, the following reports are available.

    Report name Id
    Risk assessment list 91f98232-0ba6-4806-a177-2b41fab0219e
    User list b4ceacb2-a46b-45a0-bee0-6b46acd62797
    Training report 336f6b42-3e33-461f-8cba-4997c9882f85
    Accumulated risk report - current status 4d403bbb-5a18-495d-9225-2d081ad5be23
    Accumulated risk report - original risk 175131a3-e41f-4669-a644-b7f5ce6142bc
    Completion report - courses with RA c571be4b-f8c1-4358-98da-ae4b68e0507b
    Email template overview f1244bc3-d950-49cd-8920-c81d851fa214
    Issues summary b5e8e852-ae37-4462-84fc-fd6d0f6311e0
    Issues outstanding 8c0cc450-7775-43c0-9d1f-ae0ea75e41e0
    Risk assessment list - status view 1f5d8843-edf0-4ddc-8efd-20bf23874a54
    Users with incomplete or no assessment records 4bbc9c18-f71e-45ff-99df-b824991f19c8
    Users without training records 49242181-d9a1-4799-8303-bee6b223425d
    Assessment answer data 0e0430fd-de34-430f-9fff-426a77589e73
    Email count report 107b3997-0b65-4764-b4f5-1d5f7d97c1c7
    Task codes with costings afd64535-4af7-4751-9345-a02337ada1ca
    Program Overview Report ce505a6e-9bfa-4b20-8062-b2f3c9be0ffb
    Healthy Working Plus Compliance report 116c2730-cd7f-48fd-a46e-2c2d79e3fd9d
    Programme Progress and Issues report 47d877ab-2c3a-425c-b05b-8056c92adc99
    Completion report - courses with training only bbb5de07-7e79-4e8c-85c7-ddc75e41f32c

    To get an up to date list of all reports available in your system, use the API endpoint for all reports.

    Theme Back to top