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 |
|---|---|---|
| DeleteInventoryScenarioEconModelAssignments | DELETE /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/assignments/econ-models | Clears econ model assignments. Each record clears one column and qualifier for `wellIds` or `allWells`; with `econModelId`, only slots holding that econ model are cleared. All-or-nothing: if any record or well is invalid, nothing is cleared. Accepts an array of records (max 500), targeting at most 325,000 scenario-well-assignments in total, an `allWells` record counting as every row it resolves to. Without `qualifierName`, a record uses the column's active qualifier. A facility named in `wellIds` is invalid (`NonWellEntityNotAssignable`), so nothing is cleared. An `allWells` record clears every row in the scenario, facilities included. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found. |
| GetInventoryScenarioEconModelAssignments | GET /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/assignments/econ-models | Returns econ model assignments for the scenario, grouped by well. Reads each well's base row unless `incrementalIndex` is given. Forecast and p-series assignments are served by `…/assignments/models`. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found. |
| PutInventoryScenarioEconModelAssignments | PUT /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/assignments/econ-models | Assigns econ models to wells in the scenario. Each record assigns one econ model, in one column and qualifier, to `wellIds` (up to 25,000 across the request) or to every well in the scenario (`allWells`). Records target each well's base row unless `incrementalIndex` is given. Accepts an array of records (max 500), targeting at most 325,000 scenario-well-assignments in total, an `allWells` record counting as every row it resolves to. Returns one result per record; wells a record could not write are listed in its `errors` and the rest are written. Without `qualifierName`, a record uses the column's active qualifier. A facility named in `wellIds` is not written; the record lists it in `errors` as `NonWellEntityNotAssignable`. A proposed well is written. An `allWells` record writes every row in the scenario, facilities included. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found. |
void DeleteInventoryScenarioEconModelAssignments (string projectId, string scenarioId, List
econModelAssignments = null)
Clears econ model assignments. Each record clears one column and qualifier for wellIds or allWells; with econModelId, only slots holding that econ model are cleared. All-or-nothing: if any record or well is invalid, nothing is cleared. Accepts an array of records (max 500), targeting at most 325,000 scenario-well-assignments in total, an allWells record counting as every row it resolves to. Without qualifierName, a record uses the column’s active qualifier. A facility named in wellIds is invalid (NonWellEntityNotAssignable), so nothing is cleared. An allWells record clears every row in the scenario, facilities included. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
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 DeleteInventoryScenarioEconModelAssignmentsExample
{
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 InventoryScenarioEconModelAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var econModelAssignments = new List<EconModelAssignmentDelete>(); // List<EconModelAssignmentDelete> | Econ model assignment record(s) to clear. (optional)
try
{
// Clears econ model assignments. Each record clears one column and qualifier for `wellIds` or `allWells`; with `econModelId`, only slots holding that econ model are cleared. All-or-nothing: if any record or well is invalid, nothing is cleared. Accepts an array of records (max 500), targeting at most 325,000 scenario-well-assignments in total, an `allWells` record counting as every row it resolves to. Without `qualifierName`, a record uses the column's active qualifier. A facility named in `wellIds` is invalid (`NonWellEntityNotAssignable`), so nothing is cleared. An `allWells` record clears every row in the scenario, facilities included. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
apiInstance.DeleteInventoryScenarioEconModelAssignments(projectId, scenarioId, econModelAssignments);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InventoryScenarioEconModelAssignmentsApi.DeleteInventoryScenarioEconModelAssignments: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| econModelAssignments | List<EconModelAssignmentDelete> | Econ model assignment record(s) to clear. | [optional] [Max number of items is 500] |
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. Inventory Management is not enabled, the project does not exist, or the inventory scenario does not exist. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<EconModelWellAssignment> GetInventoryScenarioEconModelAssignments (string projectId, string scenarioId, List
model = null, string qualifierName = null, List wellId = null, int? incrementalIndex = null, int? take = null, int? skip = null, string cursor = null)
Returns econ model assignments for the scenario, grouped by well. Reads each well’s base row unless incrementalIndex is given. Forecast and p-series assignments are served by .../assignments/models. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
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 GetInventoryScenarioEconModelAssignmentsExample
{
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 InventoryScenarioEconModelAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var model = "model_example"; // List<string> | Filter by econ model type(s) (API camelCase name). (optional)
var qualifierName = "qualifierName_example"; // string | Filter by qualifier name. (optional)
var wellId = new List<string>(); // List<string> | Filter by well ID(s) (ObjectId). Up to 100 values. (optional)
var incrementalIndex = 56; // int? | Incremental to read; omitted or 0 reads each well's base row. Matching wells are echoed with `incrementalIndex`. (optional)
var take = 56; // int? | Maximum number of records to return (1–500). (optional) (default to 25) (between 1 and 500)
var skip = 56; // int? | Number of records to skip. Omit it to page by cursor. Cannot be combined with `cursor`; sending both returns 400. (optional)
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. (optional)
try
{
// Returns econ model assignments for the scenario, grouped by well. Reads each well's base row unless `incrementalIndex` is given. Forecast and p-series assignments are served by `.../assignments/models`. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
ICollection<EconModelWellAssignment> result = apiInstance.GetInventoryScenarioEconModelAssignments(projectId, scenarioId, model, qualifierName, wellId, incrementalIndex, take, skip, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InventoryScenarioEconModelAssignmentsApi.GetInventoryScenarioEconModelAssignments: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| model | List<string> | Filter by econ model type(s) (API camelCase name). | [optional] |
| qualifierName | string | Filter by qualifier name. | [optional] |
| wellId | List<string> | Filter by well ID(s) (ObjectId). Up to 100 values. | [optional] |
| incrementalIndex | int? | Incremental to read; omitted or 0 reads each well's base row. Matching wells are echoed with `incrementalIndex`. | [optional] |
| take | int? | Maximum number of records to return (1–500). | [optional] [default to 25] [between 1 and 500] |
| skip | int? | Number of records to skip. Omit it to page by cursor. Cannot be combined with `cursor`; sending both returns 400. | [optional] |
| 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. | [optional] |
ICollection<EconModelWellAssignment>
API Key, Service Account
| 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. | - | | 404 | Not Found. Inventory Management is not enabled, the project does not exist, or the inventory scenario does not exist. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EconModelAssignmentMultiStatusResponse PutInventoryScenarioEconModelAssignments (string projectId, string scenarioId, List
econModelAssignments = null)
Assigns econ models to wells in the scenario. Each record assigns one econ model, in one column and qualifier, to wellIds (up to 25,000 across the request) or to every well in the scenario (allWells). Records target each well’s base row unless incrementalIndex is given. Accepts an array of records (max 500), targeting at most 325,000 scenario-well-assignments in total, an allWells record counting as every row it resolves to. Returns one result per record; wells a record could not write are listed in its errors and the rest are written. Without qualifierName, a record uses the column’s active qualifier. A facility named in wellIds is not written; the record lists it in errors as NonWellEntityNotAssignable. A proposed well is written. An allWells record writes every row in the scenario, facilities included. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
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 PutInventoryScenarioEconModelAssignmentsExample
{
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 InventoryScenarioEconModelAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var econModelAssignments = new List<EconModelAssignmentInput>(); // List<EconModelAssignmentInput> | Econ model assignment record(s). (optional)
try
{
// Assigns econ models to wells in the scenario. Each record assigns one econ model, in one column and qualifier, to `wellIds` (up to 25,000 across the request) or to every well in the scenario (`allWells`). Records target each well's base row unless `incrementalIndex` is given. Accepts an array of records (max 500), targeting at most 325,000 scenario-well-assignments in total, an `allWells` record counting as every row it resolves to. Returns one result per record; wells a record could not write are listed in its `errors` and the rest are written. Without `qualifierName`, a record uses the column's active qualifier. A facility named in `wellIds` is not written; the record lists it in `errors` as `NonWellEntityNotAssignable`. A proposed well is written. An `allWells` record writes every row in the scenario, facilities included. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
EconModelAssignmentMultiStatusResponse result = apiInstance.PutInventoryScenarioEconModelAssignments(projectId, scenarioId, econModelAssignments);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InventoryScenarioEconModelAssignmentsApi.PutInventoryScenarioEconModelAssignments: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| econModelAssignments | List<EconModelAssignmentInput> | Econ model assignment record(s). | [optional] [Max number of items is 500] |
EconModelAssignmentMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 400 | Bad Request. There is something wrong with the request data. | - | | 404 | Not Found. Inventory Management is not enabled, the project does not exist, or the inventory scenario does not exist. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]