combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ScenarioLookupTableAssignmentsApi

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

Method HTTP request Description
DeleteScenarioLookupTablesAssignments DELETE /v1/projects/{projectId}/scenarios/{scenarioId}/assignments/lookup-tables/{lookupTableId} Unassign wells from a lookup table. Body is an array of well IDs (ObjectIds) to unassign (max 500).
GetScenarioLookupTablesAssignments GET /v1/projects/{projectId}/scenarios/{scenarioId}/assignments/lookup-tables Returns lookup table assignments for the scenario.
GetScenarioLookupTablesAssignmentsById GET /v1/projects/{projectId}/scenarios/{scenarioId}/assignments/lookup-tables/{lookupTableId} Returns lookup table assignments for the given lookup table ID.
PutScenarioLookupTablesAssignments PUT /v1/projects/{projectId}/scenarios/{scenarioId}/assignments/lookup-tables Create or update lookup table assignments. Accepts a single assignment object or an array (max 500).

DeleteScenarioLookupTablesAssignments

void DeleteScenarioLookupTablesAssignments (string projectId, string scenarioId, string lookupTableId, List wellIds = null)

Unassign wells from a lookup table. Body is an array of well IDs (ObjectIds) to unassign (max 500).

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 DeleteScenarioLookupTablesAssignmentsExample
    {
        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 ScenarioLookupTableAssignmentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var lookupTableId = "lookupTableId_example";  // string | 
            var wellIds = new List<string>(); // List<string> | Well IDs (ObjectIds) to unassign from the lookup table. (optional) 

            try
            {
                // Unassign wells from a lookup table. Body is an array of well IDs (ObjectIds) to unassign (max 500).
                apiInstance.DeleteScenarioLookupTablesAssignments(projectId, scenarioId, lookupTableId, wellIds);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ScenarioLookupTableAssignmentsApi.DeleteScenarioLookupTablesAssignments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
lookupTableId string    
wellIds List<string> Well IDs (ObjectIds) to unassign from the lookup table. [optional] [Max number of items is 500]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 204 | No Content | * X-Delete-Count - The number of records that match the given filters and were deleted. | | 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]

GetScenarioLookupTablesAssignments

ICollection<LookupTableAssignment> GetScenarioLookupTablesAssignments (string projectId, string scenarioId, List column = null, string qualifierName = null)

Returns lookup table assignments for the scenario.

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 GetScenarioLookupTablesAssignmentsExample
    {
        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 ScenarioLookupTableAssignmentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var column = "column_example";  // List<string> | Filter by scenario column(s). (optional)
            var qualifierName = "qualifierName_example";  // string | Filter by qualifier name. (optional)

            try
            {
                // Returns lookup table assignments for the scenario.
                ICollection<LookupTableAssignment> result = apiInstance.GetScenarioLookupTablesAssignments(projectId, scenarioId, column, qualifierName);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ScenarioLookupTableAssignmentsApi.GetScenarioLookupTablesAssignments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
column List<string> Filter by scenario column(s). [optional]
qualifierName string Filter by qualifier name. [optional]

Return type

ICollection<LookupTableAssignment>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 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]

GetScenarioLookupTablesAssignmentsById

ICollection<LookupTableAssignment> GetScenarioLookupTablesAssignmentsById (string projectId, string scenarioId, string lookupTableId, List column = null, string qualifierName = null)

Returns lookup table assignments for the given lookup table ID.

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 GetScenarioLookupTablesAssignmentsByIdExample
    {
        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 ScenarioLookupTableAssignmentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var lookupTableId = "lookupTableId_example";  // string | 
            var column = "column_example";  // List<string> | Filter by scenario column(s). (optional)
            var qualifierName = "qualifierName_example";  // string | Filter by qualifier name. (optional)

            try
            {
                // Returns lookup table assignments for the given lookup table ID.
                ICollection<LookupTableAssignment> result = apiInstance.GetScenarioLookupTablesAssignmentsById(projectId, scenarioId, lookupTableId, column, qualifierName);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ScenarioLookupTableAssignmentsApi.GetScenarioLookupTablesAssignmentsById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
lookupTableId string    
column List<string> Filter by scenario column(s). [optional]
qualifierName string Filter by qualifier name. [optional]

Return type

ICollection<LookupTableAssignment>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

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

PutScenarioLookupTablesAssignments

LookupTableAssignmentMultiStatusResponse PutScenarioLookupTablesAssignments (string projectId, string scenarioId, List lookupTablesAssignments = null)

Create or update lookup table assignments. Accepts a single assignment object or an array (max 500).

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 PutScenarioLookupTablesAssignmentsExample
    {
        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 ScenarioLookupTableAssignmentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var lookupTablesAssignments = new List<LookupTableAssignmentInput>(); // List<LookupTableAssignmentInput> | Lookup table assignment(s) to create or update. (optional) 

            try
            {
                // Create or update lookup table assignments. Accepts a single assignment object or an array (max 500).
                LookupTableAssignmentMultiStatusResponse result = apiInstance.PutScenarioLookupTablesAssignments(projectId, scenarioId, lookupTablesAssignments);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ScenarioLookupTableAssignmentsApi.PutScenarioLookupTablesAssignments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
lookupTablesAssignments List<LookupTableAssignmentInput> Lookup table assignment(s) to create or update. [optional] [Max number of items is 500]

Return type

LookupTableAssignmentMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 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]