Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

Building this integration involves writing scripts or code snippets that interact with the Fuse’s APIs, enabling seamless retrieval of reports based on specified parameters.

To utilise this integration, you must do the following:

Step 1: Create a custom report

  1. As a Fuse site admin, go to the Admin Panel and click Reporting (Beta).

    Screenshot 2024-03-14 at 16.07.56.png
  2. In the Create a custom report section, select a custom report you wish to create, ensuring that you give it a easily recognisable title and that you have applied the desired filters so that it contains the data you need. For more information on how to create a custom report, see Creating a custom report.

    Screenshot 2024-03-14 at 16.12.27.png

Step 2: Share the title or ID of the report

Once you have created the custom report, share either the title of the report or the report ID with the person in your organisation responsible for building the integration via RESTful API.

  • The title of the report you have created can be obtained in the Custom reports list in the Custom reports screen:

    Screenshot 2024-03-14 at 16.20.57.png
  • You can obtain the ID of a report by editing it and copying the ID from the URL. For information on how to edit a report, see Editing an existing report.

    Screenshot 2024-03-14 at 16.23.29.png

Step 3: Building the integration via API

Once the person responsible for building the integration has the title or ID of the custom report, they can start the process of building the integration using Fuse’s RESTful APIs, and to retrieve the designated report data. To do this, they must have access to the necessary RESTful API endpoints listed below.

Building this integration involves writing scripts or code snippets that interact with the Fuse API, enabling seamless retrieval of reports based on specified parameters.

Required API endpoints

GET: Retrieve the details of a report using the report title

The following GET request can be used to retrieve the details of a report using the report title.

GET /compliance_reporting/reports/all

GET: https://<instance>.fuseuniversal.com/api/v4.4/compliance_reporting/reports/all?query=<title_of_required_report>&auth_token==xxxxx

The above will return the following response:

{
  "total_count": 1,
  "last_page": true,
  "reports": [
    {
      "title": "Title of Report",             <---- Title of the report
      "id": 987654321,                         <---- ID of the report
      "report_created_by": "Report Owner",
      "created_at": "2024-02-22T12:05:58.000Z",
      "report_type_code": "learning_plan_status_custom",
      "tag": "Learning plan report",
      "executions": [
        {
          "execution_id": 12345678,             <---- Execution ID of the report
          "started_at": "2024-02-26 23:01:48",
          "report_executed_by": 12040315,
          "report_status": "success",
          "report_download_url": "https://fusion-universal-assets-production.s3-eu-west-1.amazonaws.com/report-engine/xxxxxx"
        },
     ]
    }
  ]
}

The execution_id returned in the above response can be used in the API shown below.

The download URL provided in the report_download_url section of the response body is used for the CSV download, and is only valid for 1 hour (60 mins) after the report URL has been generated by the API.

Example:
"report_download_url": "https://fusion-universal-assets-production.s3-eu-west-1.amazonaws.com/report-engine/xxxxxx"

Screenshot 2024-03-15 at 09.51.42.png

Retrieve a signed AWS download link to download the latest execution ID

The following GET request can be used to retrieve the a signed AWS download link, containing the latest execution ID for a report.

GET /compliance_reporting/download_report/{execution_id}

GET: https://<instance_name>.fuseuniversal.com/api/v4.4/compliance_reporting/download_report/<execution_id>?auth_token=<valid_auth_token>

The above will return the following response:

{
  "success": true,
  "signed_download_url": "https://fusion-universal-assets-production.s3-eu-west-1.amazonaws.com/report-engine/xxxxxxx"
}

 To get the download URL for a report generated using the “Reporting (Beta)” tool via the Fuse Admin page, run the below API Request URL to get the signed S3 download link:

Please use the request examples as reference.

The request example does not include all possible parameters.

The download URL provided in the signed_download_url section of the response body, used for the CSV download, is only valid for 1 hour (60 mins) after the report URL has been generated by the API.

Example:
"signed_download_url": "https://fusion-universal-assets-production.s3-eu-west-1.amazonaws.com/report-engine/xxxxxxx"

Screenshot 2024-03-15 at 09.44.05.png

 POST: Regenerating a report

This POST request can be used to regenerate a particular report by specifying the report ID.

POST: /compliance_reporting/reports/regenerate

POST https://<instance_name>>.fuseuniversal.com/api/v4.4/compliance_reporting/reports/regenerate?auth_token=<valid_auth_token>

The above will return the following:

{
  "success": true
}

Regenerating a report also generates a new execution_id, so please ensure that you run the GET: /compliance_reporting/reports/all endpoint to get the latest execution_id.

Screenshot 2024-03-15 at 09.39.20.png

Retrieving a list of executions for a particular report

The following GET request allows you to retrieve a list of executions for a particular report.

GET: /compliance_reporting/{report_id}/executions

GET https://<instance_name>>.fuseuniversal.com/api/v4.4/compliance_reporting/<report_id_goes_here>/executions?auth_token=<valid_auth_token>

The above will return the following:

{
  "total_count": 2,            <-- Number of executions for particular Report
  "last_page": true,
  "executions": [
    {
      "id": 1883,
      "title": "Title/Name of report",          <-- Title/Name of report
      "report_executed_by": "steve.jobs@contoso.com", <-- Who executed the latest run
      "started_at": "2024-03-15T08:32:29.000Z", <-- date of report execution/regeneration
      "report_executed_status": "success"
    },
    {
      "id": 1807,
      "title": "Title/Name of report",          <-- Title/Name of report
      "report_executed_by": "steve.jobs@contoso.com", <-- Who executed this run
      "started_at": "2024-03-08T09:57:29.000Z", <-- date of report execution
      "report_executed_status": "success"
    }
  ]
}

The executions are shown in descending order, with the latest execution_id appearing at the top of the response body.

Screenshot 2024-03-15 at 10.58.37.png

  • No labels