combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ScenarioEconModelAssignmentsApi

All URIs are relative to https://api.combocurve.com

Method HTTP request Description
GetScenarioEconModelAssignments GET /v1/projects/{projectId}/scenarios/{scenarioId}/assignments/econ-models Returns econ model assignments for the scenario, grouped by well.

GetScenarioEconModelAssignments

ICollection<EconModelWellAssignment> GetScenarioEconModelAssignments (string projectId, string scenarioId, List model = null, string qualifierName = null, List wellId = null, int? take = null, int? skip = null, string cursor = null)

Returns econ model assignments for the scenario, grouped by well.

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 GetScenarioEconModelAssignmentsExample
    {
        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 ScenarioEconModelAssignmentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var model = "model_example";  // List<string> | Filter by econ model type(s) (API camelCase name). (optional)
            var qualifierName = "qualifierName_example";  // string | Filter by qualifier name. (optional)
            var wellId = new List<string>(); // List<string> | Filter by well ID(s) (ObjectId). Up to 100 values. (optional) 
            var take = 56;  // int? | Maximum number of records to return (1–500). (optional) (between 1 and 500)
            var skip = 56;  // int? | Number of records to skip. (optional)
            var cursor = "cursor_example";  // string | Cursor for cursor-based pagination (base64-encoded). (optional)

            try
            {
                // Returns econ model assignments for the scenario, grouped by well.
                ICollection<EconModelWellAssignment> result = apiInstance.GetScenarioEconModelAssignments(projectId, scenarioId, model, qualifierName, wellId, take, skip, cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ScenarioEconModelAssignmentsApi.GetScenarioEconModelAssignments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
model List<string> Filter by econ model type(s) (API camelCase name). [optional]
qualifierName string Filter by qualifier name. [optional]
wellId List<string> Filter by well ID(s) (ObjectId). Up to 100 values. [optional]
take int? Maximum number of records to return (1–500). [optional] [between 1 and 500]
skip int? Number of records to skip. [optional]
cursor string Cursor for cursor-based pagination (base64-encoded). [optional]

Return type

ICollection<EconModelWellAssignment>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

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