combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

View the Project on GitHub insidepetroleum/combocurve-client-csharp

ComboCurve.Api.Api.ProjectScenarioFacilityNetworkWellGroupWellsApi

All URIs are relative to https://api.combocurve.com

Method HTTP request Description
DeleteProjectScenarioFacilityNetworkWellGroupWells DELETE /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups/{wellGroupId}/wells Removes the listed wells from the group. `X-Delete-Count` is the number of wells that were in the group; a well that was not is ignored. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.
GetProjectScenarioFacilityNetworkWellGroupWells GET /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups/{wellGroupId}/wells Returns the wells in the group by business key, `scope` and id, in well id order.
HeadProjectScenarioFacilityNetworkWellGroupWells HEAD /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups/{wellGroupId}/wells Returns the number of wells in the group in `X-Query-Count`, without a body.
PutProjectScenarioFacilityNetworkWellGroupWells PUT /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups/{wellGroupId}/wells Adds wells to the group. A well can be in only one group of a network, so a well that is in another group is refused: delete it there first. A row is also refused when the well does not exist, is not in the project and the scenario, or is a facility. Wells are identified by business key and `scope` (`company` when omitted, or `project` for a well of the network's project); an `id` in a row is ignored. A well already in the group is left as it is. A network loaded in pieces passes through partial states that an economics run could see. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.

DeleteProjectScenarioFacilityNetworkWellGroupWells

void DeleteProjectScenarioFacilityNetworkWellGroupWells (string projectId, string scenarioId, string networkId, string wellGroupId, List wells = null)

Removes the listed wells from the group. X-Delete-Count is the number of wells that were in the group; a well that was not is ignored. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class DeleteProjectScenarioFacilityNetworkWellGroupWellsExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new ProjectScenarioFacilityNetworkWellGroupWellsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var networkId = "networkId_example";  // string | 
            var wellGroupId = "wellGroupId_example";  // string | The well group's id, as listed by the well-groups endpoint.
            var wells = new List<FacilityNetworkWellGroupMember>(); // List<FacilityNetworkWellGroupMember> | Wells to remove. See FacilityNetworkWellGroupMemberList. (optional) 

            try
            {
                // Removes the listed wells from the group. `X-Delete-Count` is the number of wells that were in the group; a well that was not is ignored. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.
                apiInstance.DeleteProjectScenarioFacilityNetworkWellGroupWells(projectId, scenarioId, networkId, wellGroupId, wells);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupWellsApi.DeleteProjectScenarioFacilityNetworkWellGroupWells: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
networkId string    
wellGroupId string The well group's id, as listed by the well-groups endpoint.  
wells List<FacilityNetworkWellGroupMember> Wells to remove. See FacilityNetworkWellGroupMemberList. [optional] [Max number of items is 1000]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 204 | No Content | * X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project, scenario, network or well group does not exist. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetProjectScenarioFacilityNetworkWellGroupWells

ICollection<FacilityNetworkWellGroupMember> GetProjectScenarioFacilityNetworkWellGroupWells (string projectId, string scenarioId, string networkId, string wellGroupId, int? take = null, string cursor = null)

Returns the wells in the group by business key, scope and id, in well id order.

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class GetProjectScenarioFacilityNetworkWellGroupWellsExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new ProjectScenarioFacilityNetworkWellGroupWellsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var networkId = "networkId_example";  // string | 
            var wellGroupId = "wellGroupId_example";  // string | The well group's id, as listed by the well-groups endpoint.
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 1000)
            var cursor = "cursor_example";  // string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. (optional)

            try
            {
                // Returns the wells in the group by business key, `scope` and id, in well id order.
                ICollection<FacilityNetworkWellGroupMember> result = apiInstance.GetProjectScenarioFacilityNetworkWellGroupWells(projectId, scenarioId, networkId, wellGroupId, take, cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupWellsApi.GetProjectScenarioFacilityNetworkWellGroupWells: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
networkId string    
wellGroupId string The well group's id, as listed by the well-groups endpoint.  
take int? max records to return [optional] [default to 25] [between 1 and 1000]
cursor string Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. [optional]

Return type

ICollection<FacilityNetworkWellGroupMember>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * X-Query-Count - The number of records in this resource. When filters are provided only matching records are counted.
* Link - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project, scenario, network or well group does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

HeadProjectScenarioFacilityNetworkWellGroupWells

void HeadProjectScenarioFacilityNetworkWellGroupWells (string projectId, string scenarioId, string networkId, string wellGroupId)

Returns the number of wells in the group in X-Query-Count, without a body.

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class HeadProjectScenarioFacilityNetworkWellGroupWellsExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new ProjectScenarioFacilityNetworkWellGroupWellsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var networkId = "networkId_example";  // string | 
            var wellGroupId = "wellGroupId_example";  // string | The well group's id, as listed by the well-groups endpoint.

            try
            {
                // Returns the number of wells in the group in `X-Query-Count`, without a body.
                apiInstance.HeadProjectScenarioFacilityNetworkWellGroupWells(projectId, scenarioId, networkId, wellGroupId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupWellsApi.HeadProjectScenarioFacilityNetworkWellGroupWells: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
networkId string    
wellGroupId string The well group's id, as listed by the well-groups endpoint.  

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * X-Query-Count - The number of records in this resource. When filters are provided only matching records are counted. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project, scenario, network or well group does not exist. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutProjectScenarioFacilityNetworkWellGroupWells

WellMultiStatusResponse PutProjectScenarioFacilityNetworkWellGroupWells (string projectId, string scenarioId, string networkId, string wellGroupId, List wells = null)

Adds wells to the group. A well can be in only one group of a network, so a well that is in another group is refused: delete it there first. A row is also refused when the well does not exist, is not in the project and the scenario, or is a facility. Wells are identified by business key and scope (company when omitted, or project for a well of the network’s project); an id in a row is ignored. A well already in the group is left as it is. A network loaded in pieces passes through partial states that an economics run could see. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class PutProjectScenarioFacilityNetworkWellGroupWellsExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new ProjectScenarioFacilityNetworkWellGroupWellsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var networkId = "networkId_example";  // string | 
            var wellGroupId = "wellGroupId_example";  // string | The well group's id, as listed by the well-groups endpoint.
            var wells = new List<FacilityNetworkWellGroupMember>(); // List<FacilityNetworkWellGroupMember> | Wells to add. See FacilityNetworkWellGroupMemberList. (optional) 

            try
            {
                // Adds wells to the group. A well can be in only one group of a network, so a well that is in another group is refused: delete it there first. A row is also refused when the well does not exist, is not in the project and the scenario, or is a facility. Wells are identified by business key and `scope` (`company` when omitted, or `project` for a well of the network's project); an `id` in a row is ignored. A well already in the group is left as it is. A network loaded in pieces passes through partial states that an economics run could see. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.
                WellMultiStatusResponse result = apiInstance.PutProjectScenarioFacilityNetworkWellGroupWells(projectId, scenarioId, networkId, wellGroupId, wells);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupWellsApi.PutProjectScenarioFacilityNetworkWellGroupWells: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
networkId string    
wellGroupId string The well group's id, as listed by the well-groups endpoint.  
wells List<FacilityNetworkWellGroupMember> Wells to add. See FacilityNetworkWellGroupMemberList. [optional] [Max number of items is 1000]

Return type

WellMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project, scenario, network or well group does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]