combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.WellIndentifiersApi

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

Method HTTP request Description
PatchWellsIdentifiers PATCH /v1/wells-identifiers Updates identifiers of a list of well documents.

PatchWellsIdentifiers

WellIdentifierMultiStatusResponse PatchWellsIdentifiers (List wellIdentifiers = null)

Updates identifiers of a list of well documents.

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 PatchWellsIdentifiersExample
    {
        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 WellIndentifiersApi(serviceAccount, apiKey);

            var wellIdentifiers = new List<WellIdentifierPatchInput>(); // List<WellIdentifierPatchInput> | Well documents to update identifiers. See WellIdentifierPatchInput. (optional) 

            try
            {
                // Updates identifiers of a list of well documents.
                WellIdentifierMultiStatusResponse result = apiInstance.PatchWellsIdentifiers(wellIdentifiers);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WellIndentifiersApi.PatchWellsIdentifiers: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
wellIdentifiers List<WellIdentifierPatchInput> Well documents to update identifiers. See WellIdentifierPatchInput. [optional] [Max number of items is 200]

Return type

WellIdentifierMultiStatusResponse

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]