combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.WellCalcsRunApi

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

Method HTTP request Description
GetProjectWellCalcsRunStatus GET /v1/projects/{projectId}/well-calcs/run/{jobId} Returns the current status of a well calcs run started through the API. Only runs started through the API can be polled.
GetWellCalcsRunStatus GET /v1/well-calcs/run/{jobId} Returns the current status of a well calcs run started through the API. Only runs started through the API can be polled.
PostProjectWellCalcsRun POST /v1/projects/{projectId}/well-calcs/run Starts an asynchronous run of the well calcs for the given wells of a project, the same calculation as Run Well Calcs in the ComboCurve UI. It refreshes the calculated well headers: months produced, cumulative volumes, first 6/12 months, last 12 months, last month, and their per-perforated-interval variants. Production written or deleted through the API does not refresh these headers. After a load, call this endpoint once with all the affected wells instead of after every request. Always returns `202 Accepted` immediately with a `jobId` that can be polled via `GET /v1/projects/{projectId}/well-calcs/run/{jobId}`. The request is rejected without starting a run when any of the wells is not a well of the project.
PostWellCalcsRun POST /v1/well-calcs/run Starts an asynchronous run of the well calcs for the given company wells, the same calculation as Run Well Calcs in the ComboCurve UI. It refreshes the calculated well headers: months produced, cumulative volumes, first 6/12 months, last 12 months, last month, and their per-perforated-interval variants. Production written or deleted through the API does not refresh these headers. After a load, call this endpoint once with all the affected wells instead of after every request. Always returns `202 Accepted` immediately with a `jobId` that can be polled via `GET /v1/well-calcs/run/{jobId}`. The request is rejected without starting a run when any of the wells is not a company well.

GetProjectWellCalcsRunStatus

WellCalcsRunStatus GetProjectWellCalcsRunStatus (string projectId, string jobId)

Returns the current status of a well calcs run started through the API. Only runs started through the API can be polled.

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 GetProjectWellCalcsRunStatusExample
    {
        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 WellCalcsRunApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | The ID of the project containing the wells.
            var jobId = "jobId_example";  // string | The `jobId` returned by `POST .../well-calcs/run`.

            try
            {
                // Returns the current status of a well calcs run started through the API. Only runs started through the API can be polled.
                WellCalcsRunStatus result = apiInstance.GetProjectWellCalcsRunStatus(projectId, jobId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WellCalcsRunApi.GetProjectWellCalcsRunStatus: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string The ID of the project containing the wells.  
jobId string The `jobId` returned by `POST …/well-calcs/run`.  

Return type

WellCalcsRunStatus

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 404 | Not Found. The project was not found, or no well calcs run was found with the given `jobId`. | - |

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

GetWellCalcsRunStatus

WellCalcsRunStatus GetWellCalcsRunStatus (string jobId)

Returns the current status of a well calcs run started through the API. Only runs started through the API can be polled.

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 GetWellCalcsRunStatusExample
    {
        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 WellCalcsRunApi(serviceAccount, apiKey);

            var jobId = "jobId_example";  // string | The `jobId` returned by `POST /v1/well-calcs/run`.

            try
            {
                // Returns the current status of a well calcs run started through the API. Only runs started through the API can be polled.
                WellCalcsRunStatus result = apiInstance.GetWellCalcsRunStatus(jobId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WellCalcsRunApi.GetWellCalcsRunStatus: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
jobId string The `jobId` returned by `POST /v1/well-calcs/run`.  

Return type

WellCalcsRunStatus

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 404 | Not Found. No well calcs run was found with the given `jobId`. | - |

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

PostProjectWellCalcsRun

WellCalcsRunJobId PostProjectWellCalcsRun (string projectId, WellCalcsRunRequest wellCalcsRun)

Starts an asynchronous run of the well calcs for the given wells of a project, the same calculation as Run Well Calcs in the ComboCurve UI. It refreshes the calculated well headers: months produced, cumulative volumes, first 6/12 months, last 12 months, last month, and their per-perforated-interval variants. Production written or deleted through the API does not refresh these headers. After a load, call this endpoint once with all the affected wells instead of after every request. Always returns 202 Accepted immediately with a jobId that can be polled via GET /v1/projects/{projectId}/well-calcs/run/{jobId}. The request is rejected without starting a run when any of the wells is not a well of the project.

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 PostProjectWellCalcsRunExample
    {
        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 WellCalcsRunApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | The ID of the project containing the wells.
            var wellCalcsRun = new WellCalcsRunRequest(); // WellCalcsRunRequest | 

            try
            {
                // Starts an asynchronous run of the well calcs for the given wells of a project, the same calculation as Run Well Calcs in the ComboCurve UI. It refreshes the calculated well headers: months produced, cumulative volumes, first 6/12 months, last 12 months, last month, and their per-perforated-interval variants. Production written or deleted through the API does not refresh these headers. After a load, call this endpoint once with all the affected wells instead of after every request. Always returns `202 Accepted` immediately with a `jobId` that can be polled via `GET /v1/projects/{projectId}/well-calcs/run/{jobId}`. The request is rejected without starting a run when any of the wells is not a well of the project.
                WellCalcsRunJobId result = apiInstance.PostProjectWellCalcsRun(projectId, wellCalcsRun);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WellCalcsRunApi.PostProjectWellCalcsRun: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string The ID of the project containing the wells.  
wellCalcsRun WellCalcsRunRequest    

Return type

WellCalcsRunJobId

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 202 | Accepted. The run has been queued. Poll `GET /v1/projects/{projectId}/well-calcs/run/{jobId}` for status. | - | | 400 | Bad Request. The body failed validation (no wells, more than 1000 wells, an invalid well ID or resolution), or some wells were not found in the project. | - | | 404 | Not Found. The project was not found. | - | | 429 | Too Many Requests. The tenant has too many runs in progress (pending or running). Wait for a run to complete before starting a new one. | - |

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

PostWellCalcsRun

WellCalcsRunJobId PostWellCalcsRun (WellCalcsRunRequest wellCalcsRun)

Starts an asynchronous run of the well calcs for the given company wells, the same calculation as Run Well Calcs in the ComboCurve UI. It refreshes the calculated well headers: months produced, cumulative volumes, first 6/12 months, last 12 months, last month, and their per-perforated-interval variants. Production written or deleted through the API does not refresh these headers. After a load, call this endpoint once with all the affected wells instead of after every request. Always returns 202 Accepted immediately with a jobId that can be polled via GET /v1/well-calcs/run/{jobId}. The request is rejected without starting a run when any of the wells is not a company well.

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 PostWellCalcsRunExample
    {
        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 WellCalcsRunApi(serviceAccount, apiKey);

            var wellCalcsRun = new WellCalcsRunRequest(); // WellCalcsRunRequest | 

            try
            {
                // Starts an asynchronous run of the well calcs for the given company wells, the same calculation as Run Well Calcs in the ComboCurve UI. It refreshes the calculated well headers: months produced, cumulative volumes, first 6/12 months, last 12 months, last month, and their per-perforated-interval variants. Production written or deleted through the API does not refresh these headers. After a load, call this endpoint once with all the affected wells instead of after every request. Always returns `202 Accepted` immediately with a `jobId` that can be polled via `GET /v1/well-calcs/run/{jobId}`. The request is rejected without starting a run when any of the wells is not a company well.
                WellCalcsRunJobId result = apiInstance.PostWellCalcsRun(wellCalcsRun);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WellCalcsRunApi.PostWellCalcsRun: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
wellCalcsRun WellCalcsRunRequest    

Return type

WellCalcsRunJobId

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 202 | Accepted. The run has been queued. Poll `GET /v1/well-calcs/run/{jobId}` for status. | - | | 400 | Bad Request. The body failed validation (no wells, more than 1000 wells, an invalid well ID or resolution), or some wells were not found among the company wells. | - | | 429 | Too Many Requests. The tenant has too many runs in progress (pending or running). Wait for a run to complete before starting a new one. | - |

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