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 |
---|---|---|
DeleteEconModelAssignmentDelete | DELETE /v1/projects/{projectId}/econ-models/{econName}/{econModelId}/assignments | |
GetEconModelsAssignmentsRead | GET /v1/projects/{projectId}/econ-models/{econName}/{econModelId}/assignments | |
HeadEconModelsAssignmentsCount | HEAD /v1/projects/{projectId}/econ-models/{econName}/{econModelId}/assignments | |
PostEconModelAssignmentUpsert | POST /v1/projects/{projectId}/econ-models/{econName}/{econModelId}/assignments | |
PutEconModelAssignmentUpsert | PUT /v1/projects/{projectId}/econ-models/{econName}/{econModelId}/assignments |
void DeleteEconModelAssignmentDelete (string projectId, string econName, string econModelId, string scenarioId, string qualifierName, string wells = null, bool? allWells = null)
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 DeleteEconModelAssignmentDeleteExample
{
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 EconModelsAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var econName = "econName_example"; // string |
var econModelId = "econModelId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var qualifierName = "qualifierName_example"; // string |
var wells = new string[] { "wells_example" }; // IEnumerable<string> | (optional)
var allWells = true; // bool? | (optional)
try
{
apiInstance.DeleteEconModelAssignmentDelete(projectId, econName, econModelId, scenarioId, qualifierName, wells, allWells);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconModelsAssignmentsApi.DeleteEconModelAssignmentDelete: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
econName | string | ||
econModelId | string | ||
scenarioId | string | ||
qualifierName | string | ||
wells | string | [optional] | |
allWells | bool? | [optional] |
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<EconModelsAssignmentsReadOKResponse> GetEconModelsAssignmentsRead (string projectId, string econName, string econModelId, int? skip = null, int? take = null, string wells = null, string scenarios = null, string sort = null)
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 GetEconModelsAssignmentsReadExample
{
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 EconModelsAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var econName = "econName_example"; // string |
var econModelId = "econModelId_example"; // string |
var skip = 56; // int? | number of items to skip (optional)
var take = 56; // int? | max records to return (optional) (between 1 and 200)
var wells = new string[] { "wells_example" }; // IEnumerable<string> | (optional)
var scenarios = new string[] { "scenarios_example" }; // IEnumerable<string> | (optional)
var sort = "sort_example"; // string | field to sort by, including + or - at the beginning for ascending or descending order, respectively (optional)
try
{
ICollection<EconModelsAssignmentsReadOKResponse> result = apiInstance.GetEconModelsAssignmentsRead(projectId, econName, econModelId, skip, take, wells, scenarios, sort);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconModelsAssignmentsApi.GetEconModelsAssignmentsRead: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
econName | string | ||
econModelId | string | ||
skip | int? | number of items to skip | [optional] |
take | int? | max records to return | [optional] [between 1 and 200] |
wells | string | [optional] | |
scenarios | string | [optional] | |
sort | string | field to sort by, including + or - at the beginning for ascending or descending order, respectively | [optional] |
ICollection<EconModelsAssignmentsReadOKResponse>
API Key, Service Account
| Status code | Description | Response headers |
|————-|————-|——————|
| 200 | OK Response | * X-Query-Count -
* 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 | BadRequest Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadEconModelsAssignmentsCount (string projectId, string econName, string econModelId, string wells = null, string scenarios = null)
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 HeadEconModelsAssignmentsCountExample
{
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 EconModelsAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var econName = "econName_example"; // string |
var econModelId = "econModelId_example"; // string |
var wells = new string[] { "wells_example" }; // IEnumerable<string> | (optional)
var scenarios = new string[] { "scenarios_example" }; // IEnumerable<string> | (optional)
try
{
apiInstance.HeadEconModelsAssignmentsCount(projectId, econName, econModelId, wells, scenarios);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconModelsAssignmentsApi.HeadEconModelsAssignmentsCount: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
econName | string | ||
econModelId | string | ||
wells | string | [optional] | |
scenarios | string | [optional] |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK Response | * X-Query-Count - | | 400 | BadRequest Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EconModelAssignmentUpsertMultiStatusResponse PostEconModelAssignmentUpsert (string projectId, string econName, string econModelId, List
payload)
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 PostEconModelAssignmentUpsertExample
{
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 EconModelsAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var econName = "econName_example"; // string |
var econModelId = "econModelId_example"; // string |
var payload = new List<EconModelAssignmentUpsertPayload>(); // List<EconModelAssignmentUpsertPayload> |
try
{
EconModelAssignmentUpsertMultiStatusResponse result = apiInstance.PostEconModelAssignmentUpsert(projectId, econName, econModelId, payload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconModelsAssignmentsApi.PostEconModelAssignmentUpsert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
econName | string | ||
econModelId | string | ||
payload | List<EconModelAssignmentUpsertPayload> |
EconModelAssignmentUpsertMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EconModelAssignmentUpsertMultiStatusResponse PutEconModelAssignmentUpsert (string projectId, string econName, string econModelId, List
payload)
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 PutEconModelAssignmentUpsertExample
{
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 EconModelsAssignmentsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var econName = "econName_example"; // string |
var econModelId = "econModelId_example"; // string |
var payload = new List<EconModelAssignmentUpsertPayload>(); // List<EconModelAssignmentUpsertPayload> |
try
{
EconModelAssignmentUpsertMultiStatusResponse result = apiInstance.PutEconModelAssignmentUpsert(projectId, econName, econModelId, payload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconModelsAssignmentsApi.PutEconModelAssignmentUpsert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | ||
econName | string | ||
econModelId | string | ||
payload | List<EconModelAssignmentUpsertPayload> |
EconModelAssignmentUpsertMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]