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 |
|---|---|---|
| GetMonthlyEconResultById | GET /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs/{econRunId}/monthly-econ-results | Returns econ monthly result columns that matches the provided econ run id. When the scenario has a facility network, each facility has its own rows. A facility row holds the facility's volumes only, and its well id is the facility's id. |
EconRunResult GetMonthlyEconResultById (string econRunId, string projectId, string scenarioId, string columns, string startDate = null, string endDate = null, int? skip = null, int? take = null, string cursor = null)
Returns econ monthly result columns that matches the provided econ run id. When the scenario has a facility network, each facility has its own rows. A facility row holds the facility’s volumes only, and its well id is the facility’s 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 GetMonthlyEconResultByIdExample
{
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 EconRunResultsApi(serviceAccount, apiKey);
var econRunId = "econRunId_example"; // string | Econ Run Id
var projectId = "projectId_example"; // string | Project Id
var scenarioId = "scenarioId_example"; // string | Scenario Id
var columns = "columns_example"; // string | List of columns separated by commas, do not follow commas with spaces, e.g. \"column1,column2\"
var startDate = "startDate_example"; // string | Date at which to start the returned monthly result, e.g. \"2019-01-01\" (optional)
var endDate = "endDate_example"; // string | Date at which to end the returned monthly result, e.g. \"2020-01-01\" (optional)
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 1000) (between 1 and 1000)
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)
try
{
// Returns econ monthly result columns that matches the provided econ run id. When the scenario has a facility network, each facility has its own rows. A facility row holds the facility's volumes only, and its well id is the facility's id.
EconRunResult result = apiInstance.GetMonthlyEconResultById(econRunId, projectId, scenarioId, columns, startDate, endDate, skip, take, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunResultsApi.GetMonthlyEconResultById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| econRunId | string | Econ Run Id | |
| projectId | string | Project Id | |
| scenarioId | string | Scenario Id | |
| columns | string | List of columns separated by commas, do not follow commas with spaces, e.g. \"column1,column2\" | |
| startDate | string | Date at which to start the returned monthly result, e.g. \"2019-01-01\" | [optional] |
| endDate | string | Date at which to end the returned monthly result, e.g. \"2020-01-01\" | [optional] |
| 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 1000] [between 1 and 1000] |
| 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] |
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 | - | | 409 | Conflict. The econ run was created before econ results were stored as parquet files, so its results are not available. Re-run the scenario and use the new econ run. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]