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 |
|---|---|---|
| DeleteForecastConfigurationById | DELETE /v1/forecast-configurations/{id} | Delete a single forecast configuration by id. Only configurations owned by the API user may be deleted. |
| DeleteForecastConfigurations | DELETE /v1/forecast-configurations | Bulk delete by id. Pass one or more forecast configuration ids as repeated `id` query parameters. Configurations owned by other users return a `403` per-record multi-status entry; ids that do not exist return `404`. |
| GetForecastConfigurationById | GET /v1/forecast-configurations/{id} | Returns a single forecast configuration by id. |
| GetForecastConfigurations | GET /v1/forecast-configurations | Returns the list of forecast configurations visible to the API user. Reads are tenant-wide regardless of the configuration's `project` field. |
| HeadForecastConfigurations | HEAD /v1/forecast-configurations | Returns metadata about the existing forecast configuration documents (count and pagination links) without a body. Supports the same filters as GET. |
| PatchForecastConfigurations | PATCH /v1/forecast-configurations | Bulk partial update by natural key. The natural key is the same as for PUT: `(name, project)` for deterministic configurations and `(name, createdBy)` for probabilistic configurations. Records whose natural key does not match an existing configuration produce a `404` per-record multi-status entry (PATCH never inserts). `forecastType` is required for routing; it cannot be changed. |
| PostForecastConfigurations | POST /v1/forecast-configurations | Create one or more forecast configurations. 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. `forecastType` is required and immutable. For `deterministic` configurations `project` is required; for `probabilistic` configurations `project` is prohibited (probabilistic configurations are user-scoped). `isAdmin` and `userDefault` in the request body are rejected. |
| PutForecastConfigurations | PUT /v1/forecast-configurations | Bulk upsert by natural key. The natural key is `(name, project)` for deterministic configurations and `(name, createdBy)` for probabilistic configurations. When a matching configuration owned by the API user exists it is replaced; otherwise a new configuration is created. Any `id` supplied in the body is ignored (read-only). Configurations matched by natural key but owned by a different user produce a `403` per-record multi-status entry. |
void DeleteForecastConfigurationById (string id)
Delete a single forecast configuration by id. Only configurations owned by the API user may be deleted.
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 DeleteForecastConfigurationByIdExample
{
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 ForecastConfigurationsApi(serviceAccount, apiKey);
var id = "id_example"; // string | The forecast configuration's id.
try
{
// Delete a single forecast configuration by id. Only configurations owned by the API user may be deleted.
apiInstance.DeleteForecastConfigurationById(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.DeleteForecastConfigurationById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The forecast configuration'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. | - | | 403 | Forbidden — not owned by the API user. | - | | 404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ForecastConfigurationMultiStatusResponse DeleteForecastConfigurations (string id = null)
Bulk delete by id. Pass one or more forecast configuration ids as repeated id query parameters. Configurations owned by other users return a 403 per-record multi-status entry; ids that do not exist return 404.
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 DeleteForecastConfigurationsExample
{
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 ForecastConfigurationsApi(serviceAccount, apiKey);
var id = new string[] { "id_example" }; // IEnumerable<string> | One or more forecast configuration ids to delete. (optional)
try
{
// Bulk delete by id. Pass one or more forecast configuration ids as repeated `id` query parameters. Configurations owned by other users return a `403` per-record multi-status entry; ids that do not exist return `404`.
ForecastConfigurationMultiStatusResponse result = apiInstance.DeleteForecastConfigurations(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.DeleteForecastConfigurations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | One or more forecast configuration ids to delete. | [optional] |
ForecastConfigurationMultiStatusResponse
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]
ForecastConfiguration GetForecastConfigurationById (string id)
Returns a single forecast configuration 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 GetForecastConfigurationByIdExample
{
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 ForecastConfigurationsApi(serviceAccount, apiKey);
var id = "id_example"; // string | The forecast configuration's id.
try
{
// Returns a single forecast configuration by id.
ForecastConfiguration result = apiInstance.GetForecastConfigurationById(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.GetForecastConfigurationById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The forecast configuration'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]
ICollection<ForecastConfiguration> GetForecastConfigurations (int? skip = null, int? take = null, string cursor = null, string forecastType = null, string name = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)
Returns the list of forecast configurations visible to the API user. Reads are tenant-wide regardless of the configuration’s project field.
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 GetForecastConfigurationsExample
{
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 ForecastConfigurationsApi(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 forecastType = "forecastType_example"; // string | Filter by forecast type: probabilistic | deterministic. (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 forecast configurations visible to the API user. Reads are tenant-wide regardless of the configuration's `project` field.
ICollection<ForecastConfiguration> result = apiInstance.GetForecastConfigurations(skip, take, cursor, forecastType, name, createdAt, updatedAt);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.GetForecastConfigurations: " + 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] | |
| forecastType | string | Filter by forecast type: probabilistic | deterministic. | [optional] |
| name | string | Filter by exact name. | [optional] | |
| createdAt | DateTimeOffset? | Filter by createdAt timestamp. | [optional] | |
| updatedAt | DateTimeOffset? | Filter by updatedAt timestamp. | [optional] |
ICollection<ForecastConfiguration>
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 HeadForecastConfigurations (int? skip = null, int? take = null, string forecastType = null, string name = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)
Returns metadata about the existing forecast configuration 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 HeadForecastConfigurationsExample
{
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 ForecastConfigurationsApi(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 forecastType = "forecastType_example"; // string | Filter by forecast type: probabilistic | deterministic. (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 metadata about the existing forecast configuration documents (count and pagination links) without a body. Supports the same filters as GET.
apiInstance.HeadForecastConfigurations(skip, take, forecastType, name, createdAt, updatedAt);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.HeadForecastConfigurations: " + 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] | |
| forecastType | string | Filter by forecast type: probabilistic | deterministic. | [optional] |
| 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]
ForecastConfigurationMultiStatusResponse PatchForecastConfigurations (List
configurations)
Bulk partial update by natural key. The natural key is the same as for PUT: (name, project) for deterministic configurations and (name, createdBy) for probabilistic configurations. Records whose natural key does not match an existing configuration produce a 404 per-record multi-status entry (PATCH never inserts). forecastType is required for routing; it cannot be changed.
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 PatchForecastConfigurationsExample
{
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 ForecastConfigurationsApi(serviceAccount, apiKey);
var configurations = new List<ForecastConfigurationPatchInput>(); // List<ForecastConfigurationPatchInput> | A single forecast configuration patch or an array of patches.
try
{
// Bulk partial update by natural key. The natural key is the same as for PUT: `(name, project)` for deterministic configurations and `(name, createdBy)` for probabilistic configurations. Records whose natural key does not match an existing configuration produce a `404` per-record multi-status entry (PATCH never inserts). `forecastType` is required for routing; it cannot be changed.
ForecastConfigurationMultiStatusResponse result = apiInstance.PatchForecastConfigurations(configurations);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.PatchForecastConfigurations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| configurations | List<ForecastConfigurationPatchInput> | A single forecast configuration patch or an array of patches. | [Max number of items is 100] |
ForecastConfigurationMultiStatusResponse
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]
ForecastConfigurationMultiStatusResponse PostForecastConfigurations (List
configurations)
Create one or more forecast configurations. 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. forecastType is required and immutable. For deterministic configurations project is required; for probabilistic configurations project is prohibited (probabilistic configurations are user-scoped). isAdmin and userDefault in the request body are rejected.
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 PostForecastConfigurationsExample
{
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 ForecastConfigurationsApi(serviceAccount, apiKey);
var configurations = new List<ForecastConfigurationInput>(); // List<ForecastConfigurationInput> | A single forecast configuration or an array of configurations.
try
{
// Create one or more forecast configurations. 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. `forecastType` is required and immutable. For `deterministic` configurations `project` is required; for `probabilistic` configurations `project` is prohibited (probabilistic configurations are user-scoped). `isAdmin` and `userDefault` in the request body are rejected.
ForecastConfigurationMultiStatusResponse result = apiInstance.PostForecastConfigurations(configurations);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.PostForecastConfigurations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| configurations | List<ForecastConfigurationInput> | A single forecast configuration or an array of configurations. | [Max number of items is 100] |
ForecastConfigurationMultiStatusResponse
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]
ForecastConfigurationMultiStatusResponse PutForecastConfigurations (List
configurations)
Bulk upsert by natural key. The natural key is (name, project) for deterministic configurations and (name, createdBy) for probabilistic configurations. When a matching configuration owned by the API user exists it is replaced; otherwise a new configuration is created. Any id supplied in the body is ignored (read-only). Configurations matched by natural key but owned by a different user produce a 403 per-record multi-status entry.
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 PutForecastConfigurationsExample
{
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 ForecastConfigurationsApi(serviceAccount, apiKey);
var configurations = new List<ForecastConfigurationInput>(); // List<ForecastConfigurationInput> | A single forecast configuration or an array of configurations.
try
{
// Bulk upsert by natural key. The natural key is `(name, project)` for deterministic configurations and `(name, createdBy)` for probabilistic configurations. When a matching configuration owned by the API user exists it is replaced; otherwise a new configuration is created. Any `id` supplied in the body is ignored (read-only). Configurations matched by natural key but owned by a different user produce a `403` per-record multi-status entry.
ForecastConfigurationMultiStatusResponse result = apiInstance.PutForecastConfigurations(configurations);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastConfigurationsApi.PutForecastConfigurations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| configurations | List<ForecastConfigurationInput> | A single forecast configuration or an array of configurations. | [Max number of items is 100] |
ForecastConfigurationMultiStatusResponse
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]