I have a project that is a combination of imported wells though a csv, and added wells from the company level. When I use the get-project-wells call, it looks like it only returns wells that have that project scope, not the company level wells.
Is there anything in the API that would allow me to include the company wells also, but return just the ones I’ve included in that project?
Thanks
I believe the get-project-company-wells endpoint is what you are looking for. It should return any company wells that have been assigned to the given project.
To achieve the functionality you’re looking for, you’ll need to follow these steps:
- Get Project Wells: Use the
get-project-wells
API call to fetch the wells specifically assigned to your project.
- Get Company Wells: Use a separate API call to fetch all wells available at the company level.
- Filter Company Wells: Filter the company wells to include only those that are also part of your project.
Here’s a conceptual outline of the process in pseudo-code:
Step 1: Fetch project wells
project_wells = api_call(‘get-project-wells’, project_id)
Step 2: Fetch all company wells
company_wells = api_call(‘get-company-wells’, company_id)
Step 3: Filter company wells that are part of the project
project_company_wells = [well for well in company_wells if well[‘id’] in project_wells]
Combine both lists if necessary
all_project_related_wells = project_wells + project_company_wells
This method assumes: