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 |
---|---|---|
GetEconRunById | GET /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs/{id} | Returns the econ run document that matches the given id scoped to projectId project and scenarioId scenario. |
GetEconRuns | GET /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs | Returns a list of econ run documents scoped to projectId project and scenarioId scenario. |
GetRootEconRunById | GET /v1/econ-runs/{id} | Returns the econ run document that matches the given id. |
GetRootEconRuns | GET /v1/econ-runs | Returns a list of econ run documents. |
HeadEconRuns | HEAD /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs | Returns metadata about the existing econ run documents scoped to projectId project and scenarioId scenario. |
HeadRootEconRuns | HEAD /v1/econ-runs | Returns metadata about the existing econ run documents. |
EconRun GetEconRunById (string projectId, string scenarioId, string id)
Returns the econ run document that matches the given id scoped to projectId project and scenarioId scenario.
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 GetEconRunByIdExample
{
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 EconRunsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var id = "id_example"; // string |
try
{
// Returns the econ run document that matches the given id scoped to projectId project and scenarioId scenario.
EconRun result = apiInstance.GetEconRunById(projectId, scenarioId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunsApi.GetEconRunById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
scenarioId | 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<EconRun> GetEconRuns (string projectId, string scenarioId, int? skip = null, int? take = null, string sort = null, string cursor = null, DateTimeOffset? runDate = null, string tags = null)
Returns a list of econ run documents scoped to projectId project and scenarioId scenario.
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 GetEconRunsExample
{
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 EconRunsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_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 runDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by runDate (optional)
var tags = "tags_example"; // string | filter by tag name (optional)
try
{
// Returns a list of econ run documents scoped to projectId project and scenarioId scenario.
ICollection<EconRun> result = apiInstance.GetEconRuns(projectId, scenarioId, skip, take, sort, cursor, runDate, tags);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunsApi.GetEconRuns: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
scenarioId | 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] |
runDate | DateTimeOffset? | filter by runDate | [optional] |
tags | string | filter by tag name | [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]
EconRun GetRootEconRunById (string id)
Returns the econ run document that matches the given 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 GetRootEconRunByIdExample
{
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 EconRunsApi(serviceAccount, apiKey);
var id = "id_example"; // string | ID
try
{
// Returns the econ run document that matches the given id.
EconRun result = apiInstance.GetRootEconRunById(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunsApi.GetRootEconRunById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | ID |
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<EconRun> GetRootEconRuns (string project = null, string scenario = null, int? skip = null, int? take = null, string sort = null, string cursor = null, DateTimeOffset? runDate = null, string tags = null)
Returns a list of econ run documents.
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 GetRootEconRunsExample
{
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 EconRunsApi(serviceAccount, apiKey);
var project = "project_example"; // string | filter by project id (optional)
var scenario = "scenario_example"; // string | filter by scenario id (optional)
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 runDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by runDate (optional)
var tags = "tags_example"; // string | filter by tag name (optional)
try
{
// Returns a list of econ run documents.
ICollection<EconRun> result = apiInstance.GetRootEconRuns(project, scenario, skip, take, sort, cursor, runDate, tags);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunsApi.GetRootEconRuns: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
project | string | filter by project id | [optional] |
scenario | string | filter by scenario id | [optional] |
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] |
runDate | DateTimeOffset? | filter by runDate | [optional] |
tags | string | filter by tag name | [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 HeadEconRuns (string projectId, string scenarioId, int? skip = null, int? take = null, DateTimeOffset? runDate = null, string tags = null)
Returns metadata about the existing econ run documents scoped to projectId project and scenarioId scenario.
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 HeadEconRunsExample
{
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 EconRunsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_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 runDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by runDate, can be used for incremental pull (optional)
var tags = "tags_example"; // string | filter by tag name (optional)
try
{
// Returns metadata about the existing econ run documents scoped to projectId project and scenarioId scenario.
apiInstance.HeadEconRuns(projectId, scenarioId, skip, take, runDate, tags);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunsApi.HeadEconRuns: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
scenarioId | 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] |
runDate | DateTimeOffset? | filter by runDate, can be used for incremental pull | [optional] |
tags | string | filter by tag name | [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]
void HeadRootEconRuns (string project = null, string scenario = null, int? skip = null, int? take = null, DateTimeOffset? runDate = null, string tags = null)
Returns metadata about the existing econ run documents.
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 HeadRootEconRunsExample
{
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 EconRunsApi(serviceAccount, apiKey);
var project = "project_example"; // string | filter by project id (optional)
var scenario = "scenario_example"; // string | filter by scenario id (optional)
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 runDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by runDate, can be used for incremental pull (optional)
var tags = "tags_example"; // string | filter by tag name (optional)
try
{
// Returns metadata about the existing econ run documents.
apiInstance.HeadRootEconRuns(project, scenario, skip, take, runDate, tags);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunsApi.HeadRootEconRuns: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
project | string | filter by project id | [optional] |
scenario | string | filter by scenario id | [optional] |
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] |
runDate | DateTimeOffset? | filter by runDate, can be used for incremental pull | [optional] |
tags | string | filter by tag name | [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]