Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This contract is currently in the Proof-of-concept stage and still subject to change

Introduction

To expose Reporting services to our system, we need an API to be exposed for the MediaHaven installation. When creating new Module Plugins having of the following Plugin Category:

  • Business Intelligence

then MediaHaven will connect to this plugin using REST API calls, which must implement the following methods depending on the category.

Methods

GET /reports
Status
colourBlue
titleBusiness Intelligence

Return a list of report URLs, they MUST be embeddable. Meaning those URLs can be safely embed into a 3rd party website (=MediaHaven FrontEnd in this case)

  • Example and reference, please see metabase’s static embedding, which utilize JWT signing to defend against 3rd party website tamper with the embedded URL’s path parameter

Optional parameters

  • organisationLongName

  • organisationShortName

  • organisationId

...

part of version 25.1

Introduction

Our product can integrate with a variety of business intelligence (commonly called BI) tools. By configuring new Module Plugins with the category “Business Intelligence”, MediaHaven will produce a list of reports by combining all reports across all plugins of this category.

Methods

A connector of the category “Business Intelligence” must implement the following methods

GET /reports

Returns a list of embeddable report URLs. This means those URLs can be safely embedded into a 3rd party website, specifically the MediaHaven frontend. If the BI tool wants to protect itself against tampering of the URL by the end-user (e.g. changing a parameter), then the connector should produce a signed URL which is inherently tamper-proof.

Optional parameters

Depending on the application and the authorizations of the user, the following parameters can be provided with this GET request.

Parameter

Usage

Example

collection

When the installation contains multiple applications, then the collection parameter specifies which application it concerns such that a different list of reports can be returned.

Seriesregister, e-Depot

  • filter.organisation_long_name

  • filter.organisation_short_name

  • filter.organisation_id

When the user has no access across all organisations, then these parameters restrict the results that should be displayed in the report to this organisation. Specifically, if the user has the function ADMIN_VIEW_ALL_ORGANISATIONSthen they can see installation-wide reports.

The organisation of the user

  • layout.border

  • layout.title

Changing the layout of the embedding setting them to true or false will display or hide the corresponding item in the embedded. By default all of them are false

Expected headers

Code Block
x-api-key: <reporting engine api key>

Output

Expand
titleExample
Code Block
languagejson
[
  {
    "EmbedUrl": "https://mh-dev.mediahaven.com/reporting/embed/dashboard/
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEsInBhcmFtZXRlcnMiOnt9fSwiZXhwIjoxNzMwMjcxODA4fQ.dMXAfLJjNx-Pf_c_5yz4NFi-Xp7JWZGvM6Oe1-5GYOg#bordered
ABC#bordered=true&titled=true
', '
",
    "Id": 123,
    "Label": "My report A",
    "Collection": "Collection",
    "Params": [
      {
        "Id": 123,
        "Label": "label",
        "Type": "Type"
      }
    ]
  },
  {
    "EmbedUrl": "https://mh-dev.mediahaven.com/reporting/embed/dashboard/
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjUsInBhcmFtZXRlcnMiOnt9fSwiZXhwIjoxNzMwMjcxODA4fQ.TCmK6WP8CoIWcxloiqFV4m5pfOoPlOC_Jqw_3F6o4IU#bordered
XYZ#bordered=true&titled=true
', 'https://mh-dev.mediahaven.com/reporting/embed/dashboard/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjQsInBhcmFtZXRlcnMiOnt9fSwiZXhwIjoxNzMwMjcxODA4fQ.hMBWYw-xEg5Az_v9MqkY69WU7eWBieCI3ApX369y_Dk#bordered=true&titled=true', 'https://mh-dev.mediahaven.com/reporting/embed/dashboard/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjcsInBhcmFtZXRlcnMiOnt9fSwiZXhwIjoxNzMwMjcxODA4fQ.tiy1-p1gVGK5QI1PfY1WezH1oIgviU6dVEAtYgkWXPM#bordered=true&titled=true', 'https://mh-dev.mediahaven.com/reporting/embed/dashboard/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjksInBhcmFtZXRlcnMiOnt9fSwiZXhwIjoxNzMwMjcxODA4fQ.N3TCom8_zrSONVOWQqdKA_kpYsmepBHs_GDzazoPYHM#bordered=true&titled=true', '
",
    "Id": 124,
    "Label": "My report B",
    "Collection": "Collection",
    "Params": [
      {
        "Id": 124,
        "Label": "label",
        "Type": "Type"
      }
    ]
  }
]

GET /reports/:id

Returns a specific report with the ID

Optional parameters

Same as the general GET method.

Expected headers

Code Block
x-api-key: <reporting engine api key>

Output

...

Expand
titleExample
Code Block
languagejson
{
  "EmbedUrl": "https://mh-dev.mediahaven.com/reporting/embed/dashboard/
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEwLCJwYXJhbWV0ZXJzIjp7fX0sImV4cCI6MTczMDI3MTgwOH0.ja7zTH99_PPaYdrAIyLiHjNVXVnUBGCDLgBrNZAEgVg#bordered
ABC#bordered=true&titled=true",
  "Id": 123,
  "Label": "My report A",
  "Collection": "Collection",
  "Params"
: [
    {
      "Id"
: 123,
      "Label"
: "label",
      "Type"
: "Type"
    }
  ]

}
]

GET /reports/:id