combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.DailyProductionsApi

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

Method HTTP request Description
DeleteDailyProductions DELETE /v1/daily-productions Delete the daily productions documents that match the given filters.
GetDailyProductions GET /v1/daily-productions Returns a list of daily production documents in the company scope.
HeadDailyProductions HEAD /v1/daily-productions Returns metadata about the existing daily production documents in the company scope.
PostDailyProductions POST /v1/daily-productions Inserts a list of daily production documents.
PutDailyProductions PUT /v1/daily-productions Upserts a list of daily production documents.

DeleteDailyProductions

void DeleteDailyProductions (string well = null, string startDate = null, string endDate = null)

Delete the daily productions documents that match the given filters.

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 DeleteDailyProductionsExample
    {
        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);

			// You can also use the specific API class
			// var apiInstance = new DailyProductionsApi(serviceAccount, apiKey);

            var well = "well_example";  // string | filter by well (optional)
            var startDate = "startDate_example";  // string | filter by startDate (optional)
            var endDate = "endDate_example";  // string | filter by endDate (optional)

            try
            {
                // Delete the daily productions documents that match the given filters.
                apiInstance.DeleteDailyProductions(well, startDate, endDate);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DailyProductionsApi.DeleteDailyProductions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
well string filter by well [optional]
startDate string filter by startDate [optional]
endDate string filter by endDate [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]

GetDailyProductions

ICollection<DailyProduction> GetDailyProductions (int? skip = null, int? take = null, string sort = null, string cursor = null, DateTimeOffset? createdAt = null, DateTimeOffset? date = null, string well = null, DateTimeOffset? updatedAt = null)

Returns a list of daily production documents in the company 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 GetDailyProductionsExample
    {
        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);

			// You can also use the specific API class
			// var apiInstance = new DailyProductionsApi(serviceAccount, apiKey);

            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 date = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by date (optional)
            var well = new string[] { "123456789abcdef012345678" };  // IEnumerable<string> | filter by well (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 daily production documents in the company scope.
                ICollection<DailyProduction> result = apiInstance.GetDailyProductions(skip, take, sort, cursor, createdAt, date, well, updatedAt);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DailyProductionsApi.GetDailyProductions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]
date DateTimeOffset? filter by date [optional]
well string filter by well [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<DailyProduction>

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]

HeadDailyProductions

void HeadDailyProductions (int? skip = null, int? take = null, DateTimeOffset? createdAt = null, DateTimeOffset? date = null, string well = null, DateTimeOffset? updatedAt = null)

Returns metadata about the existing daily production documents in the company 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 HeadDailyProductionsExample
    {
        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);

			// You can also use the specific API class
			// var apiInstance = new DailyProductionsApi(serviceAccount, apiKey);

            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 date = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by date (optional)
            var well = new string[] { "123456789abcdef012345678" };  // IEnumerable<string> | filter by well (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 daily production documents in the company scope.
                apiInstance.HeadDailyProductions(skip, take, createdAt, date, well, updatedAt);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DailyProductionsApi.HeadDailyProductions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]
date DateTimeOffset? filter by date [optional]
well string filter by well [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]

PostDailyProductions

ProductionMultiStatusResponse PostDailyProductions (List dailyProduction = null)

Inserts a list of daily production documents.

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 PostDailyProductionsExample
    {
        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
			// var apiInstance = new DailyProductionsApi(serviceAccount, apiKey);

            var dailyProduction = new List<DailyProductionInput>
            {
                new DailyProductionInput(date: new DateTime(2000, 1, 1)) {
                    Well = "5e28beb08060a6183c54cd1b",  // (required)
                    Water = 39,
                    Oil = 69,
                    Gas = 416,
                    Choke = 21,
                    HoursOn = 24,
                    BottomHolePressure = 0,
                    CasingHeadPressure = 0,
                    FlowlinePressure = 0,
                    GasLiftInjectionPressure = 0,
                    TubingHeadPressure = 0,
                    VesselSeparatorPressure = 0,
                }
            }; 

            try
            {
                // Inserts a list of daily production documents.
                ProductionMultiStatusResponse result = apiInstance.PostDailyProductions(dailyProduction);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DailyProductionsApi.PostDailyProductions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
dailyProduction List<DailyProductionInput> Daily production document(s) to insert. See DailyProductionInputList. [optional] [Max number of items is 20000]

Return type

ProductionMultiStatusResponse

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]

PutDailyProductions

ProductionMultiStatusResponse PutDailyProductions (List dailyProduction = null)

Upserts a list of daily production documents.

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 PutDailyProductionsExample
    {
        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
			// var apiInstance = new DailyProductionsApi(serviceAccount, apiKey);

            var dailyProduction = new List<DailyProductionInput>
            {
                new DailyProductionInput(date: new DateTime(2000, 1, 1)) {
                    Well = "5e28beb08060a6183c54cd1b",  // (required)
                    Water = 39,
                    Oil = 69,
                    Gas = 416,
                    Choke = 21,
                    HoursOn = 24,
                    BottomHolePressure = 0,
                    CasingHeadPressure = 0,
                    FlowlinePressure = 0,
                    GasLiftInjectionPressure = 0,
                    TubingHeadPressure = 0,
                    VesselSeparatorPressure = 0,
                }
            };

            try
            {
                // Upserts a list of daily production documents.
                ProductionMultiStatusResponse result = apiInstance.PutDailyProductions(dailyProduction);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DailyProductionsApi.PutDailyProductions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
dailyProduction List<DailyProductionInput> Daily production document(s) to upsert. See DailyProductionInputList. [optional] [Max number of items is 20000]

Return type

ProductionMultiStatusResponse

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]