combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ProjectDailyProductionsApi

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

Method HTTP request Description
DeleteProjectDailyProductions DELETE /v1/projects/{projectId}/daily-productions Delete the daily productions documents that match the given filters.
GetProjectsDailyProductions GET /v1/projects/{projectId}/daily-productions Returns a list of daily production documents in the specified project's scope.
HeadProjectsDailyProductions HEAD /v1/projects/{projectId}/daily-productions Returns metadata about the existing daily production documents in the specified project's scope.
PatchProjectsDailyProductions PATCH /v1/projects/{projectId}/daily-productions Patch a list of daily production documents in projectId scope.
PostProjectsDailyProductions POST /v1/projects/{projectId}/daily-productions Upserts a list of daily production documents in projectId scope.
PutProjectsDailyProductions PUT /v1/projects/{projectId}/daily-productions Upserts a list of daily production documents in projectId scope.

DeleteProjectDailyProductions

void DeleteProjectDailyProductions (string projectId, 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 DeleteProjectDailyProductionsExample
    {
        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 ProjectDailyProductionsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            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.DeleteProjectDailyProductions(projectId, well, startDate, endDate);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectDailyProductionsApi.DeleteProjectDailyProductions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
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]

GetProjectsDailyProductions

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

Returns a list of daily production documents in the specified project’s 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 GetProjectsDailyProductionsExample
    {
        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 ProjectDailyProductionsApi(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 well = new string[] { "well_example" };  // 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 specified project's scope.
                ICollection<DailyProduction> result = apiInstance.GetProjectsDailyProductions(projectId, skip, take, sort, cursor, createdAt, well, updatedAt);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectDailyProductionsApi.GetProjectsDailyProductions: " + 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]
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]

HeadProjectsDailyProductions

void HeadProjectsDailyProductions (string projectId, int? skip = null, int? take = null, DateTimeOffset? createdAt = null, string well = null, DateTimeOffset? updatedAt = null)

Returns metadata about the existing daily production documents in the specified project’s 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 HeadProjectsDailyProductionsExample
    {
        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 ProjectDailyProductionsApi(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 well = new string[] { "well_example" };  // 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 specified project's scope.
                apiInstance.HeadProjectsDailyProductions(projectId, skip, take, createdAt, well, updatedAt);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectDailyProductionsApi.HeadProjectsDailyProductions: " + 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]
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]

PatchProjectsDailyProductions

ProductionMultiStatusResponse PatchProjectsDailyProductions (string projectId, List dailyProduction = null)

Patch a list of daily production 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 PatchProjectsDailyProductionsExample
    {
        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 ProjectDailyProductionsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var dailyProduction = new List<DailyProductionPatchInput>(); // List<DailyProductionPatchInput> | Daily production document(s) to patch. See DailyProductionPatchInputList. (optional) 

            try
            {
                // Patch a list of daily production documents in projectId scope.
                ProductionMultiStatusResponse result = apiInstance.PatchProjectsDailyProductions(projectId, dailyProduction);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectDailyProductionsApi.PatchProjectsDailyProductions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
dailyProduction List<DailyProductionPatchInput> Daily production document(s) to patch. See DailyProductionPatchInputList. [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]

PostProjectsDailyProductions

ProductionMultiStatusResponse PostProjectsDailyProductions (string projectId, List dailyProduction = null)

Upserts a list of daily production 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 PostProjectsDailyProductionsExample
    {
        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 ProjectDailyProductionsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var dailyProduction = new List<DailyProductionInput>(); // List<DailyProductionInput> | Daily production document(s) to insert. See DailyProductionInputList. (optional) 

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

Parameters

Name Type Description Notes
projectId string    
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]

PutProjectsDailyProductions

ProductionMultiStatusResponse PutProjectsDailyProductions (string projectId, List dailyProduction = null)

Upserts a list of daily production 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 PutProjectsDailyProductionsExample
    {
        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 ProjectDailyProductionsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var dailyProduction = new List<DailyProductionInput>(); // List<DailyProductionInput> | Daily production document(s) to upsert. See DailyProductionInputList. (optional) 

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

Parameters

Name Type Description Notes
projectId string    
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]