Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
fmadimba
Contributor II
Contributor II

Logging of extension export Information into Qlik Operations Monitor app

Hello,

Our team has developed an extension that exports tables, vizlib tables, charts. and it let users incorporates important information into the header and footer of the document. The extension is not using Qlik native exportData method since it is limited, instead it is using popular libraries such as ExcelJS and PDFMakeJS.

In our ongoing efforts to enhance functionality, we aim to transmit pertinent log information to the Operations Monitor app whenever an export is successfully completed. This information may include the app id, the object being exported, and a reference to our extension name so that we may know that the export is coming from our extension...

we envision leveraging an API endpoint to transmit POST requests containing our exported data, but we may be wrong, there may be other mechanisms in place to send log info to the Monitor App. We kindly request your guidance and or assistance in providing any pertinent documentation to facilitate the integration process.

 To provide context, our code features an export button, labeled "myExportObjBtn" which triggers an excel export function upon activation. We aim to seamlessly incorporate the API call within this function and the one handling PDF export to ensure that log data is transmitted to the Operations Monitor app following a successful export. Below is a sample code snippet illustrating our intent:

const accessToken = process.env.ACCESS_TOKEN; 

document.getElementById(“myExportObjBtn”).addEventListener(“click”, async function() {

     // simplification     

      exportObject();

});

 

exportObject: function() {

// Export code goes here

// Sending post request upon successful export

fetch('https://example.com/api/endpoint', {

  // the above url will be replaced with the one provided by you
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${accessToken}`,
  },
  body: JSON.stringify({
    objectType: 'table',

    objectID: 'objectID'
    appId: 'app1',

    sheetID: 'sheet 1'
    'exporter': 'myExtension'
  })
})
.then(response => response.json())
.then(data => {
  // Optional handling of response data
})
.catch(error => {
  // Error handling for POST request failures
});

 

}

 

See the attached screenshot of the Monitor App.

Fiston

Labels (5)
0 Replies