combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.MonthlyVolumesApi

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

Method HTTP request Description
GetForecastMonthlyVolumes GET /v1/projects/{projectId}/forecasts/{forecastId}/monthly-volumes Returns a list of forecast volumes scoped to projectId project, forecastId forecast, and well.
HeadForecastMonthlyVolumes HEAD /v1/projects/{projectId}/forecasts/{forecastId}/monthly-volumes Returns metadata about the existing forecast volumes scoped to projectId project, forecastId forecast, and well.
PutForecastMonthlyVolumes PUT /v1/projects/{projectId}/forecasts/{forecastId}/monthly-volumes Replaces or creates monthly volumetric forecast volumes. Monthly values are converted to daily rates before storage, and repeated requests are idempotent. Each included phase fully replaces its existing stored series; the supplied date range is not merged with previously stored dates. Each top-level well record is atomic during conflict validation: if any submitted phase conflicts, no phase from that well record is written and every conflicting phase is reported. The client may resubmit a well record containing only the non-conflicting phases; omitted phases remain unchanged. Monthly values count toward the limits after calendar-aware daily expansion. Each phase is limited to 20,000 daily-equivalent forecast volume values, and the complete request is limited to 100,000 daily-equivalent forecast volume values. The request body may be one well record or an array of well records.

GetForecastMonthlyVolumes

ICollection<ForecastVolumes> GetForecastMonthlyVolumes (string projectId, string forecastId, int? skip = null, int? take = null, string sort = null, string cursor = null, string well = null, DateTimeOffset? startDate = null, DateTimeOffset? endDate = null)

Returns a list of forecast volumes scoped to projectId project, forecastId forecast, and 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 GetForecastMonthlyVolumesExample
    {
        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 MonthlyVolumesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var forecastId = "forecastId_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 well = "well_example";  // string | filter by well (optional)
            var startDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by startDate. Returns all records with a startDate greater than or equal to the specified value. (optional)
            var endDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by endDate. Returns all records with a endDate less than or equal to the specified value. (optional)

            try
            {
                // Returns a list of forecast volumes scoped to projectId project, forecastId forecast, and well.
                ICollection<ForecastVolumes> result = apiInstance.GetForecastMonthlyVolumes(projectId, forecastId, skip, take, sort, cursor, well, startDate, endDate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling MonthlyVolumesApi.GetForecastMonthlyVolumes: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
forecastId 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]
well string filter by well [optional]
startDate DateTimeOffset? filter by startDate. Returns all records with a startDate greater than or equal to the specified value. [optional]
endDate DateTimeOffset? filter by endDate. Returns all records with a endDate less than or equal to the specified value. [optional]

Return type

ICollection<ForecastVolumes>

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. | - | | 404 | The requested data was not found, or volumetric forecasts are not enabled for this tenant. | - |

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

HeadForecastMonthlyVolumes

void HeadForecastMonthlyVolumes (string projectId, string forecastId, int? skip = null, int? take = null, string well = null)

Returns metadata about the existing forecast volumes scoped to projectId project, forecastId forecast, and 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 HeadForecastMonthlyVolumesExample
    {
        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 MonthlyVolumesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var forecastId = "forecastId_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 well = "well_example";  // string | filter by well (optional)

            try
            {
                // Returns metadata about the existing forecast volumes scoped to projectId project, forecastId forecast, and well.
                apiInstance.HeadForecastMonthlyVolumes(projectId, forecastId, skip, take, well);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling MonthlyVolumesApi.HeadForecastMonthlyVolumes: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
forecastId 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]
well string filter by well [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. | - | | 404 | The requested data was not found, or volumetric forecasts are not enabled for this tenant. | - |

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

PutForecastMonthlyVolumes

ForecastVolumesWriteMultiStatusResponse PutForecastMonthlyVolumes (string projectId, string forecastId, List forecastVolumes)

Replaces or creates monthly volumetric forecast volumes. Monthly values are converted to daily rates before storage, and repeated requests are idempotent. Each included phase fully replaces its existing stored series; the supplied date range is not merged with previously stored dates. Each top-level well record is atomic during conflict validation: if any submitted phase conflicts, no phase from that well record is written and every conflicting phase is reported. The client may resubmit a well record containing only the non-conflicting phases; omitted phases remain unchanged. Monthly values count toward the limits after calendar-aware daily expansion. Each phase is limited to 20,000 daily-equivalent forecast volume values, and the complete request is limited to 100,000 daily-equivalent forecast volume values. The request body may be one well record or an array of well records.

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 PutForecastMonthlyVolumesExample
    {
        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 MonthlyVolumesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var forecastId = "forecastId_example";  // string | 
            var forecastVolumes = new List<ForecastVolumesInput>(); // List<ForecastVolumesInput> | A single forecast volume input or an array of forecast volume inputs.

            try
            {
                // Replaces or creates monthly volumetric forecast volumes. Monthly values are converted to daily rates before storage, and repeated requests are idempotent. Each included phase fully replaces its existing stored series; the supplied date range is not merged with previously stored dates. Each top-level well record is atomic during conflict validation: if any submitted phase conflicts, no phase from that well record is written and every conflicting phase is reported. The client may resubmit a well record containing only the non-conflicting phases; omitted phases remain unchanged. Monthly values count toward the limits after calendar-aware daily expansion. Each phase is limited to 20,000 daily-equivalent forecast volume values, and the complete request is limited to 100,000 daily-equivalent forecast volume values. The request body may be one well record or an array of well records.
                ForecastVolumesWriteMultiStatusResponse result = apiInstance.PutForecastMonthlyVolumes(projectId, forecastId, forecastVolumes);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling MonthlyVolumesApi.PutForecastMonthlyVolumes: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
forecastId string    
forecastVolumes List<ForecastVolumesInput> A single forecast volume input or an array of forecast volume inputs. [Max number of items is 200]

Return type

ForecastVolumesWriteMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 404 | The volumetric forecast feature is not enabled. | - | | 413 | The request exceeds the 20,000 daily-equivalent forecast volume value limit for a phase or the 100,000 daily-equivalent forecast volume value limit for the complete request. | - |

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