Connecting to the API to extract data

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

Requirements for connecting to the APIs

  • A valid license is necessary to access the APIs.

  • Only Admin users and system users have access to the API screen.

Client Application

Accounts

The Accounts Application API enables administrators to create and manage accounts programmatically. This API provides the necessary endpoints and functionality for administrators to automate account creation, update account details and set limits, and manage access permissions.

Click Generate to obtain the Client ID and Client Secret needed for interacting with Pharos Cloud account data. Ensure you save this information, as the Client ID and Client Secret cannot be retrieved later. If you lose your client application credentials, you can revoke them and generate new ones.

After generating the credentials, the Status shows when the credentials were created.

Note: For more information on how to use the Accounts API, refer to the Accounts API documentation.

Access via API Key

In modern print management systems, leveraging APIs is essential for efficient data extraction and analysis. The following APIs are designed to provide detailed and aggregated information about device usage and print activities:

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

Note: 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

  • Power BI Desktop - See Importing data via Power BI

Connecting to the API to extract Device Status Data

This API enables administrators to retrieve status data for exporting and manipulation.

  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 Status Data. This opens the Device Status 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/Status).Content
  • curl

    curl -H 'Authorization: bearer <Authorization Key>' https://api.beacon.pharos.com/ReportApi/Reports/Status
  • Power BI Desktop - See Importing data via Power BI

Connecting to the API to extract Device Toner Data

This API enables administrators to retrieve toner data for exporting and manipulation.

  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 Toner Data. This opens the Device Toner 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/Toner).Content
  • curl

    curl -H 'Authorization: bearer <Authorization Key>' https://api.beacon.pharos.com/ReportApi/Reports/Toner
  • Power BI Desktop - See Importing data via Power BI

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
  1. 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
  1. 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