Connecting to the API to extract data

Document created by Peachy Velasco on Sep 25, 2017Last modified by Peachy Velasco on Jan 28, 2020
Version 17Show Document
  • View in full screen mode

On the Analysis > API screen, you can connect to API endpoints that allow you to extract the following data from Beacon and use them for purposes that may serve your organization.

  • Device Meter Data
  • Print Transactions Data
  • Monthly Print Data (print data aggregated monthly)

NOTES:

  • Connecting to these APIs requires a license. Also, only Admin users and system users have access to the API screen.
  • The system generates a new authorization key when you disable and then re-enable an API.

Connecting to the API to extract Device Meter Data

NOTE: The Device Meter API accesses only the columns on the Meter grid.

  1. In the Analysis > API screen, check the Enable box to connect to the API endpoint. This also creates an Authorization Key, which will give you access to the API.
  2. Select Device Meter Data. This opens the Device Meter Data dialog box. Take note of the HTTP request URL.
  3. You can manipulate meter data using a range of tools. Refer to the following examples:
  • Powershell

(Invoke-WebRequest -Headers @{Authorization = "bearer <Authorization Key>"} https://api.beacon.pharos.com/ReportApi/Reports/Meters).Content

  • curl

-curl -H 'Authorization: bearer <Authorization Key>' https://api.beacon.pharos.com/ReportApi/Reports/Meters

Connecting to the Print Analytics API to extract Print Transactions Data

For print transactions, you’ll need to specify a date range to pull a summary of all user data for the specified period.

  1. Navigate to the Analysis > API screen. 
  2. Select Enable to connect to the API endpoint. This creates an Authorization Key, which will give you access to the API.
  3. Click on Print Transactions Data. It opens a dialog box which includes the information you need to extract print transactions data.
    • HTTP request
    • HTTP request header
    • Instructions on how to extract data using different tools
  4. You can manipulate print data using a range of tools. Refer to the following examples.
  • Powershell

(Invoke-WebRequest -Headers @{Authorization = "bearer <Authorization Key>"} https://api.beacon.pharos.com/ReportApi/Reports/PrintJobs/<YYYY-MM-DD>/<YYYY-MM-DD>).Content

  • curl

curl -H 'Authorization: bearer <Authorization Key>' https://api.beacon.pharos.com/ReportApi/Reports/PrintJobs/<YYYY-MM-DD>/<YYYY-MM-DD> Example: curl -H 'Authorization: bearer 873fe108995e37b81e0c64b44e895de045c9dcc71408c03d1e70b4e8ca47649f' https://api.ci.aws.pharos.com/ReportApi/Reports/PrintJobs/2017-04-01/2017-05-01

 

Connecting to the Print Analytics API to extract Monthly Print Data

For monthly print data, you’ll need to specify a date range to pull a summary of all user data for the specified period.

  1. Navigate to the Analysis > API screen. 
  2. Select Enable to connect to the API endpoint. This creates an Authorization Key, which will give you access to the API.
  3. Click on Monthly Print Data. It opens a dialog box which includes the information you need to extract monthly print data.
    • HTTP request
    • HTTP request header
    • Instructions on how to extract data using different tools
  4. You can manipulate print data using a range of tools. Refer to the following examples.
  • Powershell

(Invoke-WebRequest -Headers @{Authorization = "bearer <Authorization Key>"} https://api.beacon.pharos.com/ReportApi/Reports/MonthlyPrintJobs/<YYYY-MM>/<YYYY-MM>).Content

  • curl

curl -H 'Authorization: bearer <Authorization Key>' https://api.beacon.pharos.com/ReportApi/Reports/MonthlyPrintJobs/<YYYY-MM>/<YYYY-MM>

Example: curl -H 'Authorization: bearer 873fe108995e37b81e0c64b44e895de045c9dcc71408c03d1e70b4e8ca47649f' https://api.beacon.pharos.com/ReportApi/Reports/PrintJobs/2017-04/2017-05

Attachments

    Outcomes