ForeSite Connect
The ForeSite Connect Package features a Python script that imports data from a specified ForeSite instance into PetroVisor. This script uses the ForeSite API calls to retrieve the data in form of Data Frames.
Details
This package utilizes the ForeSite Connect Python script, providing the capability to define the required API endpoint, select the appropriate request method, and choose whether to export the retrieved data. Authentication and data formatting are fully automated, ensuring a streamlined and secure data integration process.
Required Setup (One-time, Admin only)
An administrator must create two secret workspace values in PetroVisor:
- ForeSiteUser: Enter your ForeSite username
- ForeSitePassword: Enter your ForeSite password
To complete this setup:
- Open the admin application
- In the content tab on the right panel, select “Workspace Values”
- Click “Add”
- Choose “String” as the Value Type
- Enable the “Secret” toggle on the right
- Provide an appropriate description and enter the value
- Click “Save”. You will then be prompted to assign a name to the workspace value. Upon naming, the workspace value is created
After configuration, these credentials are securely stored and remain inaccessible to other users.
Input Arguments
Required:
- instance: ForeSite server URL
- api_route: API endpoint path, e.g., "WellTests/GetPerformanceDataByWellType/2"
- request_method: Choose "Get" or "Post" based on the API endpoint
Optional:
- export_file: Select "Yes" to save data to PetroVisor as Excel, "No" to just retrieve data
- file_name: Name for the exported Excel file (default: foresite_data.xlsx)