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 |
|---|---|---|
| DeleteScenarioWellsDelete | DELETE /v1/projects/{projectId}/scenarios/{scenarioId}/well-assignments | |
| GetScenarioWellIncrementals | GET /v1/projects/{projectId}/scenarios/{scenarioId}/well-assignments/incrementals | Lists the incrementals in the scenario: one item per well that has at least one, with the incremental indexes it has. Wells without incrementals are left out. Use an index as `incrementalIndex` to read or write that incremental's assignments through `…/assignments/econ-models`, `…/assignments/models` and `…/assignments/lookup-tables`; without it those routes target each well's base row. An incremental's economics are reported as the difference against its base row, and only incremental 1 is evaluated. |
| GetScenarioWellsRead | GET /v1/projects/{projectId}/scenarios/{scenarioId}/well-assignments | |
| PostScenarioWellsUpsert | POST /v1/projects/{projectId}/scenarios/{scenarioId}/well-assignments | |
| PutScenarioWellsUpsert | PUT /v1/projects/{projectId}/scenarios/{scenarioId}/well-assignments |
void DeleteScenarioWellsDelete (string scenarioId, string projectId, string wells)
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 DeleteScenarioWellsDeleteExample
{
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 ScenarioWellAssignmentsApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var wells = new string[] { "wells_example" }; // IEnumerable<string> |
try
{
apiInstance.DeleteScenarioWellsDelete(scenarioId, projectId, wells);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioWellAssignmentsApi.DeleteScenarioWellsDelete: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string | ||
| wells | string |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | NoContent Response | * x-delete-count - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<WellIncrementals> GetScenarioWellIncrementals (string projectId, string scenarioId, List
wellId = null, int? incrementalIndex = null, int? take = null, int? skip = null, string cursor = null)
Lists the incrementals in the scenario: one item per well that has at least one, with the incremental indexes it has. Wells without incrementals are left out. Use an index as incrementalIndex to read or write that incremental’s assignments through .../assignments/econ-models, .../assignments/models and .../assignments/lookup-tables; without it those routes target each well’s base row. An incremental’s economics are reported as the difference against its base row, and only incremental 1 is evaluated.
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 GetScenarioWellIncrementalsExample
{
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 ScenarioWellAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var wellId = new List<string>(); // List<string> | Filter by well ID(s) (ObjectId). Up to 100 values. (optional)
var incrementalIndex = 56; // int? | Only wells that have this incremental, listing only it. (optional)
var take = 56; // int? | Maximum number of wells to return (1–500). (optional) (between 1 and 500)
var skip = 56; // int? | Number of wells to skip. (optional)
var cursor = "cursor_example"; // string | Cursor for cursor-based pagination (base64-encoded). Recommended for large scenarios. (optional)
try
{
// Lists the incrementals in the scenario: one item per well that has at least one, with the incremental indexes it has. Wells without incrementals are left out. Use an index as `incrementalIndex` to read or write that incremental's assignments through `.../assignments/econ-models`, `.../assignments/models` and `.../assignments/lookup-tables`; without it those routes target each well's base row. An incremental's economics are reported as the difference against its base row, and only incremental 1 is evaluated.
ICollection<WellIncrementals> result = apiInstance.GetScenarioWellIncrementals(projectId, scenarioId, wellId, incrementalIndex, take, skip, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioWellAssignmentsApi.GetScenarioWellIncrementals: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| wellId | List<string> | Filter by well ID(s) (ObjectId). Up to 100 values. | [optional] |
| incrementalIndex | int? | Only wells that have this incremental, listing only it. | [optional] |
| take | int? | Maximum number of wells to return (1–500). | [optional] [between 1 and 500] |
| skip | int? | Number of wells to skip. | [optional] |
| cursor | string | Cursor for cursor-based pagination (base64-encoded). Recommended for large scenarios. | [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. | - | | 404 | Not Found. The scenario does not exist in the project. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ScenarioWellsReadOKResponse GetScenarioWellsRead (string scenarioId, string projectId)
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 GetScenarioWellsReadExample
{
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 ScenarioWellAssignmentsApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
try
{
ScenarioWellsReadOKResponse result = apiInstance.GetScenarioWellsRead(scenarioId, projectId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioWellAssignmentsApi.GetScenarioWellsRead: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ScenarioWellsUpsertMultiStatusResponse PostScenarioWellsUpsert (string scenarioId, string projectId, List
wells)
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 PostScenarioWellsUpsertExample
{
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 ScenarioWellAssignmentsApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var wells = new List<string>(); // List<string> |
try
{
ScenarioWellsUpsertMultiStatusResponse result = apiInstance.PostScenarioWellsUpsert(scenarioId, projectId, wells);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioWellAssignmentsApi.PostScenarioWellsUpsert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string | ||
| wells | List<string> |
ScenarioWellsUpsertMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 400 | BadRequest Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ScenarioWellsUpsertMultiStatusResponse PutScenarioWellsUpsert (string scenarioId, string projectId, List
wells)
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 PutScenarioWellsUpsertExample
{
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 ScenarioWellAssignmentsApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var wells = new List<string>(); // List<string> |
try
{
ScenarioWellsUpsertMultiStatusResponse result = apiInstance.PutScenarioWellsUpsert(scenarioId, projectId, wells);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioWellAssignmentsApi.PutScenarioWellsUpsert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string | ||
| wells | List<string> |
ScenarioWellsUpsertMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 400 | BadRequest Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]