C# client for the ComboCurve REST API
View the Project on GitHub insidepetroleum/combocurve-client-csharp
All URIs are relative to https://api.combocurve.com
Method | HTTP request | Description |
---|---|---|
DeleteMonthlyProductions | DELETE /v1/monthly-productions | Delete the monthly productions documents that match the given filters. |
GetMonthlyProductions | GET /v1/monthly-productions | Returns a list of monthly production documents in the company scope. |
HeadMonthlyProductions | HEAD /v1/monthly-productions | Returns metadata about the existing monthly production documents in the company scope. |
PostMonthlyProductions | POST /v1/monthly-productions | Inserts a list of monthly production documents. |
PutMonthlyProductions | PUT /v1/monthly-productions | Upserts a list of monthly production documents. |
void DeleteMonthlyProductions (string well = null, string startDate = null, string endDate = null)
Delete the monthly productions documents that match the given filters.
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 DeleteMonthlyProductionsExample
{
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 MonthlyProductionsApi(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 monthly productions documents that match the given filters.
apiInstance.DeleteMonthlyProductions(well, startDate, endDate);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MonthlyProductionsApi.DeleteMonthlyProductions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
well | string | filter by well | [optional] |
startDate | string | filter by startDate | [optional] |
endDate | string | filter by endDate | [optional] |
void (empty response body)
API Key, Service Account
| 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]
ICollection<MonthlyProduction> GetMonthlyProductions (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 monthly production documents in the company scope.
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 GetMonthlyProductionsExample
{
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 MonthlyProductionsApi(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 monthly production documents in the company scope.
ICollection<MonthlyProduction> result = apiInstance.GetMonthlyProductions(skip, take, sort, cursor, createdAt, date, well, updatedAt);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MonthlyProductionsApi.GetMonthlyProductions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
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] |
ICollection<MonthlyProduction>
API Key, Service Account
| 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]
void HeadMonthlyProductions (int? skip = null, int? take = null, DateTimeOffset? createdAt = null, DateTimeOffset? date = null, string well = null, DateTimeOffset? updatedAt = null)
Returns metadata about the existing monthly production documents in the company scope.
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 HeadMonthlyProductionsExample
{
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 MonthlyProductionsApi(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 monthly production documents in the company scope.
apiInstance.HeadMonthlyProductions(skip, take, createdAt, date, well, updatedAt);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MonthlyProductionsApi.HeadMonthlyProductions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
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] |
void (empty response body)
API Key, Service Account
| 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]
ProductionMultiStatusResponse PostMonthlyProductions (List
monthlyProduction = null)
Inserts a list of monthly production documents.
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 PostMonthlyProductionsExample
{
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 MonthlyProductionsApi(serviceAccount, apiKey);
var monthlyProduction = new List<MonthlyProductionInput>
{
new MonthlyProductionInput(date: new DateTime(2000, 1, 1)) // (required) (the day of the month is ignored)
{
Well = "5e28beb08060a6183c54cd1b", // (required)
Water = 39,
Oil = 69,
Gas = 416,
Choke = 21,
DaysOn = 31,
}
};
try
{
// Inserts a list of monthly production documents.
ProductionMultiStatusResponse result = apiInstance.PostMonthlyProductions(monthlyProduction);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MonthlyProductionsApi.PostMonthlyProductions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
monthlyProduction | List<MonthlyProductionInput> | Monthly production document(s) to insert. See MonthlyProductionInputList. | [optional] [Max number of items is 20000] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProductionMultiStatusResponse PutMonthlyProductions (List
monthlyProduction = null)
Upserts a list of monthly production documents.
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 PutMonthlyProductionsExample
{
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 MonthlyProductionsApi(serviceAccount, apiKey);
var monthlyProduction = new List<MonthlyProductionInput>
{
new MonthlyProductionInput(date: new DateTime(2000, 1, 1)) // (required) (the day of the month is ignored)
{
Well = "5e28beb08060a6183c54cd1b", // (required)
Water = 39,
Oil = 69,
Gas = 416,
Choke = 21,
DaysOn = 31,
}
};
try
{
// Upserts a list of monthly production documents.
ProductionMultiStatusResponse result = apiInstance.PutMonthlyProductions(monthlyProduction);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MonthlyProductionsApi.PutMonthlyProductions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
monthlyProduction | List<MonthlyProductionInput> | Monthly production document(s) to upsert. See MonthlyProductionInputList. | [optional] [Max number of items is 20000] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]