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 |
---|---|---|
GetForecastOutputById | GET /v1/projects/{projectId}/forecasts/{forecastId}/outputs/{id} | Returns the forecast data document that matches the given id scoped to projectId project and forecastId forecast. |
GetForecastOutputs | GET /v1/projects/{projectId}/forecasts/{forecastId}/outputs | Returns a list of forecast data documents scoped to projectId project and forecastId forecast. |
HeadForecastOutputs | HEAD /v1/projects/{projectId}/forecasts/{forecastId}/outputs | Returns metadata about the existing forecast data documents scoped to projectId project and forecastId forecast. |
ForecastOutput GetForecastOutputById (string projectId, string forecastId, string id)
Returns the forecast data document that matches the given id scoped to projectId project and forecastId forecast.
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 GetForecastOutputByIdExample
{
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 ForecastOutputApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var forecastId = "forecastId_example"; // string |
var id = "id_example"; // string |
try
{
// Returns the forecast data document that matches the given id scoped to projectId project and forecastId forecast.
ForecastOutput result = apiInstance.GetForecastOutputById(projectId, forecastId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastOutputApi.GetForecastOutputById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
forecastId | string | ||
id | string |
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<ForecastOutput> GetForecastOutputs (string projectId, string forecastId, int? skip = null, int? take = null, string sort = null, string cursor = null, DateTimeOffset? createdAt = null, DateTimeOffset? forecastedAt = null, string phase = null, DateTimeOffset? reviewedAt = null, DateTimeOffset? updatedAt = null, string well = null)
Returns a list of forecast data documents scoped to projectId project and forecastId forecast.
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 GetForecastOutputsExample
{
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 ForecastOutputApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var forecastId = "forecastId_example"; // string |
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 sort = "sort_example"; // string | field to sort by, including + or - at the beginning for ascending or descending order, respectively (optional)
var cursor = "cursor_example"; // string | used in pagination to get the next page (optional)
var createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z (optional)
var forecastedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by forecastedAt, can be used for incremental pull (optional)
var phase = "phase_example"; // string | filter by phase (optional)
var reviewedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by reviewedAt, can be used for incremental pull (optional)
var updatedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z (optional)
var well = "well_example"; // string | filter by well (optional)
try
{
// Returns a list of forecast data documents scoped to projectId project and forecastId forecast.
ICollection<ForecastOutput> result = apiInstance.GetForecastOutputs(projectId, forecastId, skip, take, sort, cursor, createdAt, forecastedAt, phase, reviewedAt, updatedAt, well);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastOutputApi.GetForecastOutputs: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
forecastId | string | ||
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] |
sort | string | field to sort by, including + or - at the beginning for ascending or descending order, respectively | [optional] |
cursor | string | used in pagination to get the next page | [optional] |
createdAt | DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z | [optional] |
forecastedAt | DateTimeOffset? | filter by forecastedAt, can be used for incremental pull | [optional] |
phase | string | filter by phase | [optional] |
reviewedAt | DateTimeOffset? | filter by reviewedAt, can be used for incremental pull | [optional] |
updatedAt | DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z | [optional] |
well | string | filter by well | [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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadForecastOutputs (string projectId, string forecastId, int? skip = null, int? take = null, DateTimeOffset? createdAt = null, DateTimeOffset? forecastedAt = null, string phase = null, DateTimeOffset? reviewedAt = null, DateTimeOffset? updatedAt = null, string well = null)
Returns metadata about the existing forecast data documents scoped to projectId project and forecastId forecast.
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 HeadForecastOutputsExample
{
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 ForecastOutputApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var forecastId = "forecastId_example"; // string |
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 createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z (optional)
var forecastedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by forecastedAt (optional)
var phase = "phase_example"; // string | filter by phase (optional)
var reviewedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by reviewedAt (optional)
var updatedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z (optional)
var well = "well_example"; // string | filter by well (optional)
try
{
// Returns metadata about the existing forecast data documents scoped to projectId project and forecastId forecast.
apiInstance.HeadForecastOutputs(projectId, forecastId, skip, take, createdAt, forecastedAt, phase, reviewedAt, updatedAt, well);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastOutputApi.HeadForecastOutputs: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
forecastId | string | ||
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] |
createdAt | DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z | [optional] |
forecastedAt | DateTimeOffset? | filter by forecastedAt | [optional] |
phase | string | filter by phase | [optional] |
reviewedAt | DateTimeOffset? | filter by reviewedAt | [optional] |
updatedAt | DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z | [optional] |
well | string | filter by well | [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]