API documentation
Swagger
All APIs are listed in swagger: Swagger UI.
APIs to be used by Power BI
The read only APIs to be used with Power BI are typically listed in Fields:
FieldId
You find the fieldId in 4Insight. It is available in the URL where your ValveTrack instance is published:
How to test the APIs in swagger?
Access
You will need access to 4Insight and the field to test - contact support for this access.
Authentication
You need to retrieve a bearer token:
Then:
Then past the token and click:
Try the API
Enter the fieldId and execute:
Connecting with PowerBI desktop
Access
A service account must be set up for you to get access. This must be set up by 4subsea support. They will also provide you with a PowerBI template (.pbix) with the authentication flow already set-up. Contact support by clicking the e-mail logo in ValveTrack:
Service account
Based on the service account you will get a client id and a secret - you need them both.
Parameters in PowerBI desktop
You need to enter the following parameters:
GetToken function
A GetToken function should be defined in the desktop file provided by 4subsea support.
Calling the valves API
Here is an example how to call the valves API:
= Json.Document(Web.Contents("https://valvetrack-surf-api.4subsea.net/api/v1/fields/" & field_id & "/valves", [Headers=[Authorization=GetToken()]]))Schedule refresh in PowerBI.com
You can the upload the desktop field and configure scheduled refresh.
Data source credetials
When setting this up you can skip test connection:
NB: The privacy should be the same on all data sources ("Organizational" is recommended)









