combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.EconSettingsApi

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

Method HTTP request Description
DeleteEconSettingsById DELETE /v1/econ-settings/{id} Delete a single econ setting by id.
GetEconSettings GET /v1/econ-settings Returns the list of econ settings in the tenant. Econ settings are company-shared: reads return every setting regardless of who created it.
GetEconSettingsById GET /v1/econ-settings/{id} Returns a single econ setting by id.
HeadEconSettings HEAD /v1/econ-settings Returns metadata about the existing econ setting documents (count and pagination links) without a body. Supports the same filters as GET.
PatchEconSettings PATCH /v1/econ-settings Bulk partial update by name (same natural key as PUT). PATCH never inserts: a name that matches no existing setting produces a `404` per-record entry. Partial only at field granularity — omitting `categories` leaves the stored selection untouched, while a provided `categories` replaces the whole selection (there is no per-column merge). A name matching more than one existing setting, or duplicated within the request, produces a per-record collision error. Any `id` supplied in the body is ignored (read-only).
PostEconSettings POST /v1/econ-settings Create one or more econ settings. The body may be a single object or an array; single-object bodies are coerced to a one-item array and the response is always 207 Multi-Status. Econ settings are company-shared, so `name` must be unique within the tenant: a name that already exists, or that is duplicated within the request, produces a per-record collision error. `id` is read-only and ignored if supplied. `createdBy`, `createdAt`, and `updatedAt` are read-only and are rejected as unknown properties if supplied.
PutEconSettings PUT /v1/econ-settings Bulk upsert by name. The natural key is `name` (econ settings are company-shared, so names are unique within the tenant on external-API writes). When a setting with the given name exists it is fully replaced (an absent `categories` clears the selection); otherwise a new setting is created. A name that matches more than one existing setting (possible with legacy data), or that is duplicated within the request, produces a per-record collision error. Any `id` supplied in the body is ignored (read-only).

DeleteEconSettingsById

void DeleteEconSettingsById (string id)

Delete a single econ setting by id.

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 DeleteEconSettingsByIdExample
    {
        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 EconSettingsApi(serviceAccount, apiKey);

            var id = "id_example";  // string | The econ setting's id.

            try
            {
                // Delete a single econ setting by id.
                apiInstance.DeleteEconSettingsById(id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EconSettingsApi.DeleteEconSettingsById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The econ setting's id.  

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 204 | No Content | * X-Delete-Count - The number of records that were deleted. | | 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]

GetEconSettings

ICollection<EconSetting> GetEconSettings (int? skip = null, int? take = null, string cursor = null, string id = null, string name = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)

Returns the list of econ settings in the tenant. Econ settings are company-shared: reads return every setting regardless of who created it.

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 GetEconSettingsExample
    {
        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 EconSettingsApi(serviceAccount, apiKey);

            var skip = 56;  // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 200)
            var cursor = "cursor_example";  // string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. (optional)
            var id = "id_example";  // string | Filter by id. (optional)
            var name = "name_example";  // string | Filter by exact name. (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 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 the list of econ settings in the tenant. Econ settings are company-shared: reads return every setting regardless of who created it.
                ICollection<EconSetting> result = apiInstance.GetEconSettings(skip, take, cursor, id, name, createdAt, updatedAt);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EconSettingsApi.GetEconSettings: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
skip int? number of items to skip. Cannot be combined with `cursor`; sending both returns 400. [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 200]
cursor string Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. [optional]
id string Filter by id. [optional]
name string Filter by exact name. [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]
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<EconSetting>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * Link - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. | | 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]

GetEconSettingsById

EconSetting GetEconSettingsById (string id)

Returns a single econ setting by id.

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 GetEconSettingsByIdExample
    {
        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 EconSettingsApi(serviceAccount, apiKey);

            var id = "id_example";  // string | The econ setting's id.

            try
            {
                // Returns a single econ setting by id.
                EconSetting result = apiInstance.GetEconSettingsById(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EconSettingsApi.GetEconSettingsById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The econ setting's id.  

Return type

EconSetting

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]

HeadEconSettings

void HeadEconSettings (int? skip = null, int? take = null, string id = null, string name = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)

Returns metadata about the existing econ setting documents (count and pagination links) without a body. Supports the same filters as GET.

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 HeadEconSettingsExample
    {
        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 EconSettingsApi(serviceAccount, apiKey);

            var skip = 56;  // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 200)
            var id = "id_example";  // string | Filter by id. (optional)
            var name = "name_example";  // string | Filter by exact name. (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 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 econ setting documents (count and pagination links) without a body. Supports the same filters as GET.
                apiInstance.HeadEconSettings(skip, take, id, name, createdAt, updatedAt);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EconSettingsApi.HeadEconSettings: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
skip int? number of items to skip. Cannot be combined with `cursor`; sending both returns 400. [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 200]
id string Filter by id. [optional]
name string Filter by exact name. [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]
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 - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. | | 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]

PatchEconSettings

EconSettingMultiStatusResponse PatchEconSettings (List econSettings)

Bulk partial update by name (same natural key as PUT). PATCH never inserts: a name that matches no existing setting produces a 404 per-record entry. Partial only at field granularity — omitting categories leaves the stored selection untouched, while a provided categories replaces the whole selection (there is no per-column merge). A name matching more than one existing setting, or duplicated within the request, produces a per-record collision error. Any id supplied in the body is ignored (read-only).

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 PatchEconSettingsExample
    {
        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 EconSettingsApi(serviceAccount, apiKey);

            var econSettings = new List<EconSettingInput>(); // List<EconSettingInput> | A single econ setting patch or an array of patches.

            try
            {
                // Bulk partial update by name (same natural key as PUT). PATCH never inserts: a name that matches no existing setting produces a `404` per-record entry. Partial only at field granularity — omitting `categories` leaves the stored selection untouched, while a provided `categories` replaces the whole selection (there is no per-column merge). A name matching more than one existing setting, or duplicated within the request, produces a per-record collision error. Any `id` supplied in the body is ignored (read-only).
                EconSettingMultiStatusResponse result = apiInstance.PatchEconSettings(econSettings);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EconSettingsApi.PatchEconSettings: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
econSettings List<EconSettingInput> A single econ setting patch or an array of patches. [Max number of items is 100]

Return type

EconSettingMultiStatusResponse

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]

PostEconSettings

EconSettingMultiStatusResponse PostEconSettings (List econSettings)

Create one or more econ settings. The body may be a single object or an array; single-object bodies are coerced to a one-item array and the response is always 207 Multi-Status. Econ settings are company-shared, so name must be unique within the tenant: a name that already exists, or that is duplicated within the request, produces a per-record collision error. id is read-only and ignored if supplied. createdBy, createdAt, and updatedAt are read-only and are rejected as unknown properties if supplied.

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 PostEconSettingsExample
    {
        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 EconSettingsApi(serviceAccount, apiKey);

            var econSettings = new List<EconSettingInput>(); // List<EconSettingInput> | A single econ setting or an array of econ settings.

            try
            {
                // Create one or more econ settings. The body may be a single object or an array; single-object bodies are coerced to a one-item array and the response is always 207 Multi-Status. Econ settings are company-shared, so `name` must be unique within the tenant: a name that already exists, or that is duplicated within the request, produces a per-record collision error. `id` is read-only and ignored if supplied. `createdBy`, `createdAt`, and `updatedAt` are read-only and are rejected as unknown properties if supplied.
                EconSettingMultiStatusResponse result = apiInstance.PostEconSettings(econSettings);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EconSettingsApi.PostEconSettings: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
econSettings List<EconSettingInput> A single econ setting or an array of econ settings. [Max number of items is 100]

Return type

EconSettingMultiStatusResponse

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]

PutEconSettings

EconSettingMultiStatusResponse PutEconSettings (List econSettings)

Bulk upsert by name. The natural key is name (econ settings are company-shared, so names are unique within the tenant on external-API writes). When a setting with the given name exists it is fully replaced (an absent categories clears the selection); otherwise a new setting is created. A name that matches more than one existing setting (possible with legacy data), or that is duplicated within the request, produces a per-record collision error. Any id supplied in the body is ignored (read-only).

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 PutEconSettingsExample
    {
        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 EconSettingsApi(serviceAccount, apiKey);

            var econSettings = new List<EconSettingInput>(); // List<EconSettingInput> | A single econ setting or an array of econ settings.

            try
            {
                // Bulk upsert by name. The natural key is `name` (econ settings are company-shared, so names are unique within the tenant on external-API writes). When a setting with the given name exists it is fully replaced (an absent `categories` clears the selection); otherwise a new setting is created. A name that matches more than one existing setting (possible with legacy data), or that is duplicated within the request, produces a per-record collision error. Any `id` supplied in the body is ignored (read-only).
                EconSettingMultiStatusResponse result = apiInstance.PutEconSettings(econSettings);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EconSettingsApi.PutEconSettings: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
econSettings List<EconSettingInput> A single econ setting or an array of econ settings. [Max number of items is 100]

Return type

EconSettingMultiStatusResponse

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]