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 |
|---|---|---|
| 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`, `createdBy`, `createdAt`, and `updatedAt` are read-only and rejected 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). |
void DeleteEconSettingsById (string id)
Delete a single econ setting by id.
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);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The econ setting's id. |
void (empty response body)
API Key, Service Account
| 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]
ICollection<EconSetting> GetEconSettings (int? skip = null, int? take = null, string cursor = 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.
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 (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 | used in pagination to get the next page (optional)
var name = "name_example"; // string | Filter by exact name. (optional)
var createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | Filter by createdAt timestamp. (optional)
var updatedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | Filter by updatedAt timestamp. (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, 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);
}
}
}
}
| 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] |
| cursor | string | used in pagination to get the next page | [optional] |
| name | string | Filter by exact name. | [optional] |
| createdAt | DateTimeOffset? | Filter by createdAt timestamp. | [optional] |
| updatedAt | DateTimeOffset? | Filter by updatedAt timestamp. | [optional] |
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]
EconSetting GetEconSettingsById (string id)
Returns a single econ setting by id.
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);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The econ setting's id. |
API Key, Service Account
| 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]
void HeadEconSettings (int? skip = null, int? take = 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.
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 (optional) (default to 0)
var take = 56; // int? | max records to return (optional) (default to 25) (between 1 and 200)
var name = "name_example"; // string | Filter by exact name. (optional)
var createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | Filter by createdAt timestamp. (optional)
var updatedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | Filter by updatedAt timestamp. (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, 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);
}
}
}
}
| 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] |
| name | string | Filter by exact name. | [optional] |
| createdAt | DateTimeOffset? | Filter by createdAt timestamp. | [optional] |
| updatedAt | DateTimeOffset? | Filter by updatedAt timestamp. | [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]
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).
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);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| econSettings | List<EconSettingInput> | A single econ setting patch or an array of patches. | [Max number of items is 100] |
EconSettingMultiStatusResponse
API Key, Service Account
| 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]
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, createdBy, createdAt, and updatedAt are read-only and rejected if supplied.
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`, `createdBy`, `createdAt`, and `updatedAt` are read-only and rejected 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);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| econSettings | List<EconSettingInput> | A single econ setting or an array of econ settings. | [Max number of items is 100] |
EconSettingMultiStatusResponse
API Key, Service Account
| 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]
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).
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);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| econSettings | List<EconSettingInput> | A single econ setting or an array of econ settings. | [Max number of items is 100] |
EconSettingMultiStatusResponse
API Key, Service Account
| 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]