combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ForecastsApi

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

Method HTTP request Description
DeleteForecastById DELETE /v1/projects/{projectId}/forecasts/{id} Delete the Forecast that matches the given id scoped to projectId project.
GetForecastById GET /v1/projects/{projectId}/forecasts/{id} Returns the forecast document that matches the given id scoped to projectId project.
GetForecasts GET /v1/projects/{projectId}/forecasts Returns a list of forecast documents scoped to projectId project.
HeadForecasts HEAD /v1/projects/{projectId}/forecasts Returns metadata about the existing forecast documents scoped to projectId project.
PatchForecast PATCH /v1/projects/{projectId}/forecasts/{id} Updates Forecast.
PostForecasts POST /v1/projects/{projectId}/forecasts Inserts a list of forecasts documents in projectId scope.
PostWellsToForecast POST /v1/projects/{projectId}/forecasts/{id}/wells Inserts a list of well into a forecast.

DeleteForecastById

void DeleteForecastById (string projectId, string id, bool? deleteTypeCurves = null)

Delete the Forecast that matches the given id scoped to projectId 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 DeleteForecastByIdExample
    {
        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 ForecastsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 
            var deleteTypeCurves = true;  // bool? | deletes all type-curves associated with the forecastId (optional)

            try
            {
                // Delete the Forecast that matches the given id scoped to projectId project.
                apiInstance.DeleteForecastById(projectId, id, deleteTypeCurves);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ForecastsApi.DeleteForecastById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    
deleteTypeCurves bool? deletes all type-curves associated with the forecastId [optional]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 204 | OK | * X-Delete-Count - The number of records that match the given filters and were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - |

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

GetForecastById

Forecast GetForecastById (string projectId, string id)

Returns the forecast document that matches the given id scoped to projectId 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 GetForecastByIdExample
    {
        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 ForecastsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 

            try
            {
                // Returns the forecast document that matches the given id scoped to projectId project.
                Forecast result = apiInstance.GetForecastById(projectId, id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ForecastsApi.GetForecastById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    

Return type

Forecast

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 400 | Bad Request. There is something wrong with the request data. | - | | 404 | Not Found | - |

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

GetForecasts

ICollection<Forecast> GetForecasts (string projectId, int? skip = null, int? take = null, string sort = null, string cursor = null, DateTimeOffset? createdAt = null, string name = null, DateTimeOffset? runDate = null, string type = null, string tag = null, DateTimeOffset? updatedAt = null)

Returns a list of forecast documents scoped to projectId 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 GetForecastsExample
    {
        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 ForecastsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var skip = 56;  // int? | number of items to skip (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 200)
            var sort = "sort_example";  // string | field to sort by, including + or - at the beginning for ascending or descending order, respectively (optional)
            var cursor = "cursor_example";  // string | used in pagination to get the next page (optional)
            var createdAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z (optional)
            var name = "default1";  // string | filter by name (optional)
            var runDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by runDate, can be used for incremental pull (optional)
            var type = "probabilistic";  // string | filter by type (optional)
            var tag = new string[] { "tagName" };  // IEnumerable<string> | filter by tag (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z (optional)

            try
            {
                // Returns a list of forecast documents scoped to projectId project.
                ICollection<Forecast> result = apiInstance.GetForecasts(projectId, skip, take, sort, cursor, createdAt, name, runDate, type, tag, updatedAt);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ForecastsApi.GetForecasts: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
skip int? number of items to skip [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 200]
sort string field to sort by, including + or - at the beginning for ascending or descending order, respectively [optional]
cursor string used in pagination to get the next page [optional]
createdAt DateTimeOffset? filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z [optional]
name string filter by name [optional]
runDate DateTimeOffset? filter by runDate, can be used for incremental pull [optional]
type string filter by type [optional]
tag string filter by tag [optional]
updatedAt DateTimeOffset? filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z [optional]

Return type

ICollection<Forecast>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * Link - Indicates a typed relationship with another resource, where the relation type is defined by RFC 5988. We include the relationships next, prev, first and last, which can be used to move between pages of the list of results. | | 400 | Bad Request. There is something wrong with the request data. | - |

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

HeadForecasts

void HeadForecasts (string projectId, int? skip = null, int? take = null, DateTimeOffset? createdAt = null, string name = null, DateTimeOffset? runDate = null, string type = null, DateTimeOffset? updatedAt = null)

Returns metadata about the existing forecast documents scoped to projectId 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 HeadForecastsExample
    {
        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 ForecastsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var skip = 56;  // int? | number of items to skip (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 200)
            var createdAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z (optional)
            var name = "f1";  // string | filter by name (optional)
            var runDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by runDate (optional)
            var type = "deterministic";  // string | filter by type (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z (optional)

            try
            {
                // Returns metadata about the existing forecast documents scoped to projectId project.
                apiInstance.HeadForecasts(projectId, skip, take, createdAt, name, runDate, type, updatedAt);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ForecastsApi.HeadForecasts: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
skip int? number of items to skip [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 200]
createdAt DateTimeOffset? filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z [optional]
name string filter by name [optional]
runDate DateTimeOffset? filter by runDate [optional]
type string filter by type [optional]
updatedAt DateTimeOffset? filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z [optional]

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.
* Link - Indicates a typed relationship with another resource, where the relation type is defined by RFC 5988. We include the relationships next, prev, first and last, which can be used to move between pages of the list of results. | | 400 | Bad Request. There is something wrong with the request data. | - |

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

PatchForecast

ForecastsStatus PatchForecast (string projectId, string id, ForecastPatchInput forecastInput = null)

Updates Forecast.

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 PatchForecastExample
    {
        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 ForecastsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | The project's id.
            var id = "id_example";  // string | The forecast's id.
            var forecastInput = new ForecastPatchInput(); // ForecastPatchInput | Forecast information to replace. See ForecastPatchInput. (optional) 

            try
            {
                // Updates Forecast.
                ForecastsStatus result = apiInstance.PatchForecast(projectId, id, forecastInput);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ForecastsApi.PatchForecast: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string The project's id.  
id string The forecast's id.  
forecastInput ForecastPatchInput Forecast information to replace. See ForecastPatchInput. [optional]

Return type

ForecastsStatus

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | Patch Status | - | | 400 | Bad Request. There is something wrong with the request data. | - |

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

PostForecasts

ForecastsMultiStatusResponse PostForecasts (string projectId, List forecastInput = null)

Inserts a list of forecasts documents in projectId scope.

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 PostForecastsExample
    {
        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 ForecastsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | The project's id.
            var forecastInput = new List<ForecastInput>(); // List<ForecastInput> | Forecasts to insert. See ForecastInputList. (optional) 

            try
            {
                // Inserts a list of forecasts documents in projectId scope.
                ForecastsMultiStatusResponse result = apiInstance.PostForecasts(projectId, forecastInput);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ForecastsApi.PostForecasts: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string The project's id.  
forecastInput List<ForecastInput> Forecasts to insert. See ForecastInputList. [optional] [Max number of items is 200]

Return type

ForecastsMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - |

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

PostWellsToForecast

WellMultiStatusResponse PostWellsToForecast (string projectId, string id, WellIdInput wellIds)

Inserts a list of well into a forecast.

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 PostWellsToForecastExample
    {
        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 ForecastsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 
            var wellIds = new WellIdInput(); // WellIdInput | WellIds documents to insert. See WellInputList.

            try
            {
                // Inserts a list of well into a forecast.
                WellMultiStatusResponse result = apiInstance.PostWellsToForecast(projectId, id, wellIds);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ForecastsApi.PostWellsToForecast: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    
wellIds WellIdInput WellIds documents to insert. See WellInputList.  

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. | - |

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