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 |
---|---|---|
DeleteProjectsForecastSegmentParameters | DELETE /v1/projects/{projectId}/forecasts/{forecastId}/parameters/{wellId}/{phase}/{series} | Removes all of the segments for a defined well, phase, and series |
PostProjectsForecastSegmentParameters | POST /v1/projects/{projectId}/forecasts/{forecastId}/parameters/{wellId}/{phase}/{series} | Inserts a list of segments in a forecast for a defined well, phase, and series. |
PutProjectsForecastSegmentParameters | PUT /v1/projects/{projectId}/forecasts/{forecastId}/parameters/{wellId}/{phase}/{series} | Updates all segments with provided list of new segments for a defined well, phase, and series. |
void DeleteProjectsForecastSegmentParameters (string projectId, string forecastId, string wellId, string phase, string series)
Removes all of the segments for a defined well, phase, and series
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 DeleteProjectsForecastSegmentParametersExample
{
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 ForecastParametersApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string | The project's id.
var forecastId = "forecastId_example"; // string | The forecast's id.
var wellId = "wellId_example"; // string | The specified well's id.
var phase = "phase_example"; // string | oil | gas | water
var series = "series_example"; // string | p10 | p50 | p90 | best
try
{
// Removes all of the segments for a defined well, phase, and series
apiInstance.DeleteProjectsForecastSegmentParameters(projectId, forecastId, wellId, phase, series);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastParametersApi.DeleteProjectsForecastSegmentParameters: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes | ||
---|---|---|---|---|---|
projectId | string | The project's id. | |||
forecastId | string | The forecast's id. | |||
wellId | string | The specified well's id. | |||
phase | string | oil | gas | water | |
series | string | p10 | p50 | p90 | best |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | OK | * X-Delete-Count - The number of records that match the given filters and 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]
ForecastParametersSuccessResponse PostProjectsForecastSegmentParameters (string projectId, string forecastId, string wellId, string phase, string series, List
forecastSegments = null)
Inserts a list of segments in a forecast for a defined well, phase, and series.
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 PostProjectsForecastSegmentParametersExample
{
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 ForecastParametersApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string | The project's id.
var forecastId = "forecastId_example"; // string | The forecast's id.
var wellId = "wellId_example"; // string | The specified well's id.
var phase = "phase_example"; // string | The phase of the forecast. oil | gas | water
var series = "series_example"; // string | The series of the forecast. p10 | p50 | p90 | best. Currently only best is supported.
var forecastSegments = new List<ForecastSegmentInput>(); // List<ForecastSegmentInput> | Forecast segments to insert. See SegmentInputArray. (optional)
try
{
// Inserts a list of segments in a forecast for a defined well, phase, and series.
ForecastParametersSuccessResponse result = apiInstance.PostProjectsForecastSegmentParameters(projectId, forecastId, wellId, phase, series, forecastSegments);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastParametersApi.PostProjectsForecastSegmentParameters: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes | ||
---|---|---|---|---|---|
projectId | string | The project's id. | |||
forecastId | string | The forecast's id. | |||
wellId | string | The specified well's id. | |||
phase | string | The phase of the forecast. oil | gas | water | |
series | string | The series of the forecast. p10 | p50 | p90 | best. Currently only best is supported. |
forecastSegments | List<ForecastSegmentInput> | Forecast segments to insert. See SegmentInputArray. | [optional] [Max number of items is 25] |
ForecastParametersSuccessResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 201 | Created | - | | 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]
ForecastParametersSuccessResponse PutProjectsForecastSegmentParameters (string projectId, string forecastId, string wellId, string phase, string series, List
forecastSegments = null)
Updates all segments with provided list of new segments for a defined well, phase, and series.
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 PutProjectsForecastSegmentParametersExample
{
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 ForecastParametersApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string | The project's id.
var forecastId = "forecastId_example"; // string | The forecast's id.
var wellId = "wellId_example"; // string | The specified well's id.
var phase = "phase_example"; // string | oil | gas | water
var series = "series_example"; // string | p10 | p50 | p90 | best
var forecastSegments = new List<ForecastSegmentInput>(); // List<ForecastSegmentInput> | Forecast segments to update. See SegmentInputArray. (optional)
try
{
// Updates all segments with provided list of new segments for a defined well, phase, and series.
ForecastParametersSuccessResponse result = apiInstance.PutProjectsForecastSegmentParameters(projectId, forecastId, wellId, phase, series, forecastSegments);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastParametersApi.PutProjectsForecastSegmentParameters: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes | ||
---|---|---|---|---|---|
projectId | string | The project's id. | |||
forecastId | string | The forecast's id. | |||
wellId | string | The specified well's id. | |||
phase | string | oil | gas | water | |
series | string | p10 | p50 | p90 | best |
forecastSegments | List<ForecastSegmentInput> | Forecast segments to update. See SegmentInputArray. | [optional] [Max number of items is 25] |
ForecastParametersSuccessResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 201 | Created | - | | 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]