combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.InventoryScenarioLookupTableAssignmentsApi

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

Method HTTP request Description
DeleteInventoryScenarioLookupTablesAssignments DELETE /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/assignments/lookup-tables/{lookupTableId} Unassign wells from a lookup table. Body is an array of well IDs (ObjectIds) to unassign (max 500). Clears each well's base row, or its `incrementalIndex` row when given. Clears the qualifier named by `qualifierName` in each column that defines it. If omitted, each column's active qualifier is cleared, which is not necessarily the one named `Default`. Other qualifiers are not affected. Always answers 207 with one result per well, in request order: 200 if the well held the lookup table in the targeted qualifier and it was cleared (`cleared` lists the column and qualifier), 404 if it did not, 400 if the ID is a facility. The request fails with 404 if `qualifierName` is given and no column of the scenario defines it, and with 400 if it is omitted and no column has an active qualifier. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
GetInventoryScenarioLookupTablesAssignments GET /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/assignments/lookup-tables Returns lookup table assignments for the scenario, read from each well's base row unless `incrementalIndex` is given. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
GetInventoryScenarioLookupTablesAssignmentsById GET /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/assignments/lookup-tables/{lookupTableId} Returns lookup table assignments for the given lookup table ID, read from each well's base row unless `incrementalIndex` is given. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
PutInventoryScenarioLookupTablesAssignments PUT /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/assignments/lookup-tables Create or update lookup table assignments. Accepts a single assignment object or an array (max 500). Each record writes each well's base row, or its `incrementalIndex` row when given. A well that is not in the scenario, lacks that incremental (`IncrementalNotFound`) or has duplicate rows for it (`AmbiguousIncrementalIndex`) fails the record. In the `forecast` column, the lookup table must be a type curve lookup table. Any other lookup table fails the record. A facility named in `wellIds` fails the record with `NonWellEntityNotAssignable`. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.

DeleteInventoryScenarioLookupTablesAssignments

LookupTableUnassignmentMultiStatusResponse DeleteInventoryScenarioLookupTablesAssignments (string projectId, string scenarioId, string lookupTableId, string qualifierName = null, int? incrementalIndex = null, List wellIds = null)

Unassign wells from a lookup table. Body is an array of well IDs (ObjectIds) to unassign (max 500). Clears each well’s base row, or its incrementalIndex row when given. Clears the qualifier named by qualifierName in each column that defines it. If omitted, each column’s active qualifier is cleared, which is not necessarily the one named Default. Other qualifiers are not affected. Always answers 207 with one result per well, in request order: 200 if the well held the lookup table in the targeted qualifier and it was cleared (cleared lists the column and qualifier), 404 if it did not, 400 if the ID is a facility. The request fails with 404 if qualifierName is given and no column of the scenario defines it, and with 400 if it is omitted and no column has an active qualifier. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.

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 DeleteInventoryScenarioLookupTablesAssignmentsExample
    {
        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 InventoryScenarioLookupTableAssignmentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var lookupTableId = "lookupTableId_example";  // string | 
            var qualifierName = "qualifierName_example";  // string | Qualifier to clear. If omitted, each column's active qualifier is cleared, which is not necessarily the one named `Default`. (optional)
            var incrementalIndex = 56;  // int? | Incremental to clear; omitted or 0 clears each well's base row. (optional)
            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). Clears each well's base row, or its `incrementalIndex` row when given. Clears the qualifier named by `qualifierName` in each column that defines it. If omitted, each column's active qualifier is cleared, which is not necessarily the one named `Default`. Other qualifiers are not affected. Always answers 207 with one result per well, in request order: 200 if the well held the lookup table in the targeted qualifier and it was cleared (`cleared` lists the column and qualifier), 404 if it did not, 400 if the ID is a facility. The request fails with 404 if `qualifierName` is given and no column of the scenario defines it, and with 400 if it is omitted and no column has an active qualifier. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
                LookupTableUnassignmentMultiStatusResponse result = apiInstance.DeleteInventoryScenarioLookupTablesAssignments(projectId, scenarioId, lookupTableId, qualifierName, incrementalIndex, wellIds);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InventoryScenarioLookupTableAssignmentsApi.DeleteInventoryScenarioLookupTablesAssignments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
lookupTableId string    
qualifierName string Qualifier to clear. If omitted, each column's active qualifier is cleared, which is not necessarily the one named `Default`. [optional]
incrementalIndex int? Incremental to clear; omitted or 0 clears each well's base row. [optional]
wellIds List<string> Well IDs (ObjectIds) to unassign from the lookup table. [optional] [Max number of items is 500]

Return type

LookupTableUnassignmentMultiStatusResponse

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. | - | | 404 | Not Found. Inventory Management is not enabled, the project does not exist, the inventory scenario does not exist, or no column of the scenario defines `qualifierName`. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetInventoryScenarioLookupTablesAssignments

ICollection<LookupTableAssignment> GetInventoryScenarioLookupTablesAssignments (string projectId, string scenarioId, List column = null, string qualifierName = null, int? incrementalIndex = null)

Returns lookup table assignments for the scenario, read from each well’s base row unless incrementalIndex is given. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.

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 GetInventoryScenarioLookupTablesAssignmentsExample
    {
        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 InventoryScenarioLookupTableAssignmentsApi(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. If omitted, each column's active qualifier is used, which is not necessarily the one named `Default`. (optional)
            var incrementalIndex = 56;  // int? | Incremental to read; omitted or 0 reads each well's base row. Results for an incremental carry `incrementalIndex`. List a scenario's incrementals with `.../well-assignments/incrementals`. (optional)

            try
            {
                // Returns lookup table assignments for the scenario, read from each well's base row unless `incrementalIndex` is given. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
                ICollection<LookupTableAssignment> result = apiInstance.GetInventoryScenarioLookupTablesAssignments(projectId, scenarioId, column, qualifierName, incrementalIndex);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InventoryScenarioLookupTableAssignmentsApi.GetInventoryScenarioLookupTablesAssignments: " + 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. If omitted, each column's active qualifier is used, which is not necessarily the one named `Default`. [optional]
incrementalIndex int? Incremental to read; omitted or 0 reads each well's base row. Results for an incremental carry `incrementalIndex`. List a scenario's incrementals with `…/well-assignments/incrementals`. [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. Inventory Management is not enabled, the project does not exist, or the inventory scenario does not exist. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetInventoryScenarioLookupTablesAssignmentsById

ICollection<LookupTableAssignment> GetInventoryScenarioLookupTablesAssignmentsById (string projectId, string scenarioId, string lookupTableId, List column = null, string qualifierName = null, int? incrementalIndex = null)

Returns lookup table assignments for the given lookup table ID, read from each well’s base row unless incrementalIndex is given. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.

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 GetInventoryScenarioLookupTablesAssignmentsByIdExample
    {
        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 InventoryScenarioLookupTableAssignmentsApi(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. If omitted, each column's active qualifier is used, which is not necessarily the one named `Default`. (optional)
            var incrementalIndex = 56;  // int? | Incremental to read; omitted or 0 reads each well's base row. Results for an incremental carry `incrementalIndex`. List a scenario's incrementals with `.../well-assignments/incrementals`. (optional)

            try
            {
                // Returns lookup table assignments for the given lookup table ID, read from each well's base row unless `incrementalIndex` is given. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
                ICollection<LookupTableAssignment> result = apiInstance.GetInventoryScenarioLookupTablesAssignmentsById(projectId, scenarioId, lookupTableId, column, qualifierName, incrementalIndex);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InventoryScenarioLookupTableAssignmentsApi.GetInventoryScenarioLookupTablesAssignmentsById: " + 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. If omitted, each column's active qualifier is used, which is not necessarily the one named `Default`. [optional]
incrementalIndex int? Incremental to read; omitted or 0 reads each well's base row. Results for an incremental carry `incrementalIndex`. List a scenario's incrementals with `…/well-assignments/incrementals`. [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]

PutInventoryScenarioLookupTablesAssignments

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

Create or update lookup table assignments. Accepts a single assignment object or an array (max 500). Each record writes each well’s base row, or its incrementalIndex row when given. A well that is not in the scenario, lacks that incremental (IncrementalNotFound) or has duplicate rows for it (AmbiguousIncrementalIndex) fails the record. In the forecast column, the lookup table must be a type curve lookup table. Any other lookup table fails the record. A facility named in wellIds fails the record with NonWellEntityNotAssignable. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.

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 PutInventoryScenarioLookupTablesAssignmentsExample
    {
        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 InventoryScenarioLookupTableAssignmentsApi(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). Each record writes each well's base row, or its `incrementalIndex` row when given. A well that is not in the scenario, lacks that incremental (`IncrementalNotFound`) or has duplicate rows for it (`AmbiguousIncrementalIndex`) fails the record. In the `forecast` column, the lookup table must be a type curve lookup table. Any other lookup table fails the record. A facility named in `wellIds` fails the record with `NonWellEntityNotAssignable`. Applies to an inventory scenario, which can hold proposed wells. A regular scenario is not found.
                LookupTableAssignmentMultiStatusResponse result = apiInstance.PutInventoryScenarioLookupTablesAssignments(projectId, scenarioId, lookupTablesAssignments);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InventoryScenarioLookupTableAssignmentsApi.PutInventoryScenarioLookupTablesAssignments: " + 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. | - | | 404 | Not Found. Inventory Management is not enabled, the project does not exist, or the inventory scenario does not exist. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]