Skip to content

Connect Power BI to FieldOps BI API

Power BI can connect directly to the FieldOps BI API using an authenticated Web connection.

This allows organizations to create dashboards and reports from FieldOps operational data without providing direct database access.

Power BI connects to FieldOps using:

  • FieldOps BI API endpoints
  • BI Access Tokens
  • Bearer token authentication
  • JSON data responses

Before you begin

You need:

  • A valid FieldOps BI Access Token
  • Access to a FieldOps organization with BI access enabled
  • Microsoft Power BI Desktop

If you have not created a BI Access Token, complete this first:

Create a BI Access Token

Important

Power BI does not connect directly to the FieldOps application database.

All reporting connections should use the FieldOps BI API.

BI API endpoint

The BI API endpoint follows this format:

https://app.fieldopsafrica.com/api/bi/tables/{table}

Replace {table} with the BI table you want to retrieve.

For example:

https://app.fieldopsafrica.com/api/bi/tables/bi_visits

Authentication

FieldOps uses Bearer token authentication.

The BI Access Token is sent through the HTTP Authorization header.

The header format is:

Authorization: Bearer YOUR_BI_ACCESS_TOKEN

Example:

Authorization: Bearer fldops_bi_xxxxxxxxxxxxxxxxx

Warning

Never publish a real BI Access Token in screenshots, documentation, source code repositories, or public messages.

Connect Power BI

Step 1: Open Get Data

Open Power BI Desktop.

From the ribbon select:

Home
→ Get Data
→ Get data from other sources
→ Get data from another source

Step 2: Select Web connector

Under available connectors select:

Other
→ Web

Select:

Connect

Step 3: Select Advanced mode

In the Web connection window select:

Advanced

Do not add the BI Access Token to the URL.

The token must be supplied as an HTTP request header.

Step 4: Enter the FieldOps BI endpoint

Under URL Parts enter:

https://app.fieldopsafrica.com/api/bi/tables/bi_visits

This example connects to the visits BI table.

Other BI tables can be used by replacing the table name.

Examples:

https://app.fieldopsafrica.com/api/bi/tables/bi_visit_responses

https://app.fieldopsafrica.com/api/bi/tables/bi_daily_visit_metrics

Step 5: Add Authorization header

Under HTTP Request Header Parameters add:

Field Value
Header name Authorization
Value Bearer YOUR_BI_ACCESS_TOKEN

Example:

Header name Value
Authorization Bearer fldops_bi_xxxxxxxxx

Replace the example token with your actual BI Access Token.

Step 6: Authentication selection

Power BI may display an authentication method selection screen.

Select:

Anonymous

This does not make the FieldOps BI API public.

The request is authenticated using the Authorization header containing your BI Access Token.

Note

Power BI's Anonymous option means that Power BI itself is not managing the authentication. The FieldOps BI API validates the Bearer token provided in the request header.

Step 7: Load the data

After successful connection, Power BI will display the API response.

Select either:

Load

or:

Transform Data

Use Transform Data if you want to modify or expand the response before loading it.

Working with FieldOps BI responses

The FieldOps BI API response contains metadata and the actual reporting data.

The main sections include:

meta

data

query_guard

pagination

The reporting records are contained inside:

data

Power BI can expand this into a normal table structure.

Expanding data

If Power BI displays a record or list:

Select:

Expand

Continue expanding until the table rows are visible.

The final table may contain fields such as:

organization_name

program_name

project_name

site_name

visit_date

status

These fields can then be used in Power BI visuals.

Transforming data with Power Query

After connecting Power BI to FieldOps, you can select Transform Data to open Power Query Editor.

Power Query allows you to prepare FieldOps data before creating reports.

Common transformations include:

  • Expanding the data field from the API response
  • Removing unnecessary columns
  • Renaming fields
  • Changing data types
  • Filtering records

For most FieldOps reports:

  1. Expand the data column.
  2. Select the fields required for reporting.
  3. Confirm data types.
  4. Select Close & Apply to load the data into Power BI.

Tip

For large datasets, apply filters through the FieldOps BI API query parameters before loading the data into Power Query. This improves refresh performance.

Creating your first visual

After loading the data:

  1. Open the Report view.
  2. Select a visual type.
  3. Drag FieldOps fields into the visual.

Examples:

Visits by Programme

Visual:

Column chart

Axis:

program_name

Values:

Count of visit_id

Visits by Site

Visual:

Bar chart

Axis:

site_name

Values:

Count of visit_id

Visits over time

Visual:

Line chart

Axis:

visit_date

Values:

Count of visit_id

Refreshing Power BI data

When the report refreshes, Power BI sends requests to the FieldOps BI API again.

Ensure:

  • The BI Access Token is still valid
  • The token has not been revoked
  • The organization still has BI access enabled

Using filters

For larger datasets, use filtered BI queries.

Example:

https://app.fieldopsafrica.com/api/bi/tables/bi_visits?status=eq:approved

Example:

https://app.fieldopsafrica.com/api/bi/tables/bi_visits?program_id=eq:1

Filters reduce the amount of data transferred and improve report performance.

Learn more:

Query BI Data

Common problems

Power BI cannot connect

Check:

  • The URL is correct
  • The Authorization header name is exactly:

    Authorization

  • The header value starts with:

    Bearer

  • There is a space between Bearer and the token

  • The BI Access Token is valid

Unauthorized response

Check:

  • The token was copied completely
  • The token has not been revoked
  • No extra spaces were added
  • The correct organization token was used

Data loads but columns are missing

Use:

  • Dataset discovery
  • Schema discovery

to confirm available fields.

See:

Discover BI Datasets and Schemas

Best practices

For production reporting:

  • Create separate BI tokens for separate Power BI reports
  • Use descriptive token names
  • Keep BI Access Tokens secure
  • Do not embed tokens in public files
  • Request only the data required
  • Use filters for large datasets

What to do next

After connecting Power BI you can:

  • Create dashboards
  • Add charts and KPIs
  • Build operational reports
  • Add filters and slicers
  • Schedule data refreshes