combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

View the Project on GitHub insidepetroleum/combocurve-client-csharp

ComboCurve.Api.Api.EconModelsAssignmentsApi

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  

DeleteEconModelAssignmentDelete

void DeleteEconModelAssignmentDelete (string projectId, string econName, string econModelId, string scenarioId, string qualifierName, string wells = null, bool? allWells = null)

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
econName string    
econModelId string    
scenarioId string    
qualifierName string    
wells string   [optional]
allWells bool?   [optional]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]

GetEconModelsAssignmentsRead

ICollection<EconModelsAssignmentsReadOKResponse> GetEconModelsAssignmentsRead (string projectId, string econName, string econModelId, int? skip = null, int? take = null, string wells = null, string scenarios = null, string sort = null)

Example

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);
            }
        }
    }
}

Parameters

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]

Return type

ICollection<EconModelsAssignmentsReadOKResponse>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]

HeadEconModelsAssignmentsCount

void HeadEconModelsAssignmentsCount (string projectId, string econName, string econModelId, string wells = null, string scenarios = null)

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
econName string    
econModelId string    
wells string   [optional]
scenarios string   [optional]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]

PostEconModelAssignmentUpsert

EconModelAssignmentUpsertMultiStatusResponse PostEconModelAssignmentUpsert (string projectId, string econName, string econModelId, List payload)

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
econName string    
econModelId string    
payload List<EconModelAssignmentUpsertPayload>    

Return type

EconModelAssignmentUpsertMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]

PutEconModelAssignmentUpsert

EconModelAssignmentUpsertMultiStatusResponse PutEconModelAssignmentUpsert (string projectId, string econName, string econModelId, List payload)

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
econName string    
econModelId string    
payload List<EconModelAssignmentUpsertPayload>    

Return type

EconModelAssignmentUpsertMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]