combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ProjectInventoryPlansApi

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

Method HTTP request Description
DeleteProjectInventoryPlanById DELETE /v1/projects/{projectId}/inventory/plans/{id} Deletes the inventory plan that matches the given id in the project, with all of its wells, as the app does. A well of the plan that was promoted to a project well is deleted too. An id that is not a plan of the project deletes nothing.
GetProjectInventoryPlanById GET /v1/projects/{projectId}/inventory/plans/{id} Returns the inventory plan that matches the given id in the project. A plan of another project is not found.
GetProjectInventoryPlanPromoteWellsJob GET /v1/projects/{projectId}/inventory/plans/{id}/promote-wells/{jobId} Returns the status of a promotion started with `POST /v1/projects/{projectId}/inventory/plans/{id}/promote-wells`. Read it until `status` is `successful` or `failed`. The counts and the lists are null and empty until the promotion ends. The lists hold only a sample of the wells, and the counts cover all of them. A well that the request skipped is not in this job, because it was never part of the promotion.
GetProjectInventoryPlans GET /v1/projects/{projectId}/inventory/plans Returns the inventory plans of the project, oldest first by default. Each plan lists all of its wells with their promotion status. A page holds at most 25 plans.
HeadProjectInventoryPlans HEAD /v1/projects/{projectId}/inventory/plans Returns the number of inventory plans of the project in `X-Query-Count`, without a body.
PatchProjectInventoryPlanById PATCH /v1/projects/{projectId}/inventory/plans/{id} Updates the name, color and enabled state of the inventory plan that matches the given id in the project. Fields that are not sent stay as they are. The plan is the one in the path, so an `id` in the body is ignored.
PatchProjectInventoryPlans PATCH /v1/projects/{projectId}/inventory/plans Updates the name, color and enabled state of inventory plans of the project. Each record needs the `id` of its plan. Fields that are not sent stay as they are. A request holds at most 500 plans. A record that fails validation is reported and the other records are written.
PostProjectInventoryPlanPromoteWells POST /v1/projects/{projectId}/inventory/plans/{id}/promote-wells Promotes wells of the inventory plan to project wells, as the app does. Send the ids of up to 1,000 wells of the plan, as listed in `wells` of the plan. The response says right away which wells will be promoted and which are skipped, with a reason for each. A well that is already promoted, or whose promotion is in progress, is skipped and never promoted twice. The promotion runs in the background. Follow it with the `jobId` in `GET /v1/projects/{projectId}/inventory/plans/{id}/promote-wells/{jobId}`. When no well can be promoted, nothing starts and `jobId` is null.
PostProjectInventoryPlans POST /v1/projects/{projectId}/inventory/plans Creates empty inventory plans in the project. Add wells to a plan with the proposed wells endpoints. A plan created here shows in Inventory Management Review with the Imported chip, as a plan imported from a CSV does. A request holds at most 500 plans. Plan names are unique in the project, including across the records of the request. A record that fails validation is reported and the other records are written.
PutProjectInventoryPlans PUT /v1/projects/{projectId}/inventory/plans Creates or updates inventory plans of the project by name. A name that an inventory plan of the project has exactly updates that plan. Any other name creates a plan, as POST does. The name of an existing plan does not change, so use PATCH to rename a plan. A request holds at most 500 plans. A record that fails validation is reported and the other records are written.

DeleteProjectInventoryPlanById

void DeleteProjectInventoryPlanById (string projectId, string id)

Deletes the inventory plan that matches the given id in the project, with all of its wells, as the app does. A well of the plan that was promoted to a project well is deleted too. An id that is not a plan of the project deletes nothing.

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 DeleteProjectInventoryPlanByIdExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 

            try
            {
                // Deletes the inventory plan that matches the given id in the project, with all of its wells, as the app does. A well of the plan that was promoted to a project well is deleted too. An id that is not a plan of the project deletes nothing.
                apiInstance.DeleteProjectInventoryPlanById(projectId, id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.DeleteProjectInventoryPlanById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 204 | OK | * X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - | | 404 | Not Found. Inventory Management is not enabled, or the project does not exist. | - |

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

GetProjectInventoryPlanById

InventoryPlan GetProjectInventoryPlanById (string projectId, string id)

Returns the inventory plan that matches the given id in the project. A plan of another project 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 GetProjectInventoryPlanByIdExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 

            try
            {
                // Returns the inventory plan that matches the given id in the project. A plan of another project is not found.
                InventoryPlan result = apiInstance.GetProjectInventoryPlanById(projectId, id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.GetProjectInventoryPlanById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    

Return type

InventoryPlan

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 plan does not exist. | - |

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

GetProjectInventoryPlanPromoteWellsJob

InventoryPlanPromoteWellsJob GetProjectInventoryPlanPromoteWellsJob (string projectId, string id, string jobId)

Returns the status of a promotion started with POST /v1/projects/{projectId}/inventory/plans/{id}/promote-wells. Read it until status is successful or failed. The counts and the lists are null and empty until the promotion ends. The lists hold only a sample of the wells, and the counts cover all of them. A well that the request skipped is not in this job, because it was never part of the promotion.

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 GetProjectInventoryPlanPromoteWellsJobExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 
            var jobId = "jobId_example";  // string | 

            try
            {
                // Returns the status of a promotion started with `POST /v1/projects/{projectId}/inventory/plans/{id}/promote-wells`. Read it until `status` is `successful` or `failed`. The counts and the lists are null and empty until the promotion ends. The lists hold only a sample of the wells, and the counts cover all of them. A well that the request skipped is not in this job, because it was never part of the promotion.
                InventoryPlanPromoteWellsJob result = apiInstance.GetProjectInventoryPlanPromoteWellsJob(projectId, id, jobId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.GetProjectInventoryPlanPromoteWellsJob: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    
jobId string    

Return type

InventoryPlanPromoteWellsJob

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 plan has no promotion with that job id. | - |

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

GetProjectInventoryPlans

ICollection<InventoryPlan> GetProjectInventoryPlans (string projectId, int? skip = null, int? take = null, string sort = null, string cursor = null, string name = null, bool? enabled = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)

Returns the inventory plans of the project, oldest first by default. Each plan lists all of its wells with their promotion status. A page holds at most 25 plans.

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 GetProjectInventoryPlansExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var skip = 56;  // int? | number of items to skip (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 25)
            var sort = "sort_example";  // string | field to sort by, including + or - at the beginning for ascending or descending order, respectively (optional)
            var cursor = "cursor_example";  // string | used in pagination to get the next page (optional)
            var name = new string[] { "name_example" };  // IEnumerable<string> | filter by name (optional)
            var enabled = true;  // bool? | filter by enabled (optional)
            var createdAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by createdAt (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt (optional)

            try
            {
                // Returns the inventory plans of the project, oldest first by default. Each plan lists all of its wells with their promotion status. A page holds at most 25 plans.
                ICollection<InventoryPlan> result = apiInstance.GetProjectInventoryPlans(projectId, skip, take, sort, cursor, name, enabled, createdAt, updatedAt);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.GetProjectInventoryPlans: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
skip int? number of items to skip [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 25]
sort string field to sort by, including + or - at the beginning for ascending or descending order, respectively [optional]
cursor string used in pagination to get the next page [optional]
name string filter by name [optional]
enabled bool? filter by enabled [optional]
createdAt DateTimeOffset? filter by createdAt [optional]
updatedAt DateTimeOffset? filter by updatedAt [optional]

Return type

ICollection<InventoryPlan>

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. | - | | 404 | Not Found. Inventory Management is not enabled, or the project does not exist. | - |

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

HeadProjectInventoryPlans

void HeadProjectInventoryPlans (string projectId, int? skip = null, int? take = null, string name = null, bool? enabled = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)

Returns the number of inventory plans of the project in X-Query-Count, without a body.

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 HeadProjectInventoryPlansExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var skip = 56;  // int? | number of items to skip (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 25)
            var name = new string[] { "name_example" };  // IEnumerable<string> | filter by name (optional)
            var enabled = true;  // bool? | filter by enabled (optional)
            var createdAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by createdAt (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt (optional)

            try
            {
                // Returns the number of inventory plans of the project in `X-Query-Count`, without a body.
                apiInstance.HeadProjectInventoryPlans(projectId, skip, take, name, enabled, createdAt, updatedAt);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.HeadProjectInventoryPlans: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
skip int? number of items to skip [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 25]
name string filter by name [optional]
enabled bool? filter by enabled [optional]
createdAt DateTimeOffset? filter by createdAt [optional]
updatedAt DateTimeOffset? filter by updatedAt [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 | * X-Query-Count - The number of records in this resource. When filters are provided only matching records are counted.
* 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. | - | | 404 | Not Found. Inventory Management is not enabled, or the project does not exist. | - |

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

PatchProjectInventoryPlanById

InventoryPlanStatus PatchProjectInventoryPlanById (string projectId, string id, InventoryPlanUpdateInput inventoryPlan = null)

Updates the name, color and enabled state of the inventory plan that matches the given id in the project. Fields that are not sent stay as they are. The plan is the one in the path, so an id in the body is ignored.

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 PatchProjectInventoryPlanByIdExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 
            var inventoryPlan = new InventoryPlanUpdateInput(); // InventoryPlanUpdateInput |  (optional) 

            try
            {
                // Updates the name, color and enabled state of the inventory plan that matches the given id in the project. Fields that are not sent stay as they are. The plan is the one in the path, so an `id` in the body is ignored.
                InventoryPlanStatus result = apiInstance.PatchProjectInventoryPlanById(projectId, id, inventoryPlan);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.PatchProjectInventoryPlanById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    
inventoryPlan InventoryPlanUpdateInput   [optional]

Return type

InventoryPlanStatus

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, or another plan of the project has the name. | - | | 404 | Not Found. Inventory Management is not enabled, the project does not exist, or the inventory plan does not exist. | - |

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

PatchProjectInventoryPlans

InventoryPlanMultiStatusResponse PatchProjectInventoryPlans (string projectId, List inventoryPlan = null)

Updates the name, color and enabled state of inventory plans of the project. Each record needs the id of its plan. Fields that are not sent stay as they are. A request holds at most 500 plans. A record that fails validation is reported and the other records are written.

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 PatchProjectInventoryPlansExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var inventoryPlan = new List<InventoryPlanPatchInput>(); // List<InventoryPlanPatchInput> | Inventory plans to update. See InventoryPlanPatchInputList. (optional) 

            try
            {
                // Updates the name, color and enabled state of inventory plans of the project. Each record needs the `id` of its plan. Fields that are not sent stay as they are. A request holds at most 500 plans. A record that fails validation is reported and the other records are written.
                InventoryPlanMultiStatusResponse result = apiInstance.PatchProjectInventoryPlans(projectId, inventoryPlan);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.PatchProjectInventoryPlans: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
inventoryPlan List<InventoryPlanPatchInput> Inventory plans to update. See InventoryPlanPatchInputList. [optional] [Max number of items is 500]

Return type

InventoryPlanMultiStatusResponse

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, or the project does not exist. | - |

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

PostProjectInventoryPlanPromoteWells

InventoryPlanPromoteWellsResponse PostProjectInventoryPlanPromoteWells (string projectId, string id, InventoryPlanPromoteWellsInput promoteWells)

Promotes wells of the inventory plan to project wells, as the app does. Send the ids of up to 1,000 wells of the plan, as listed in wells of the plan. The response says right away which wells will be promoted and which are skipped, with a reason for each. A well that is already promoted, or whose promotion is in progress, is skipped and never promoted twice. The promotion runs in the background. Follow it with the jobId in GET /v1/projects/{projectId}/inventory/plans/{id}/promote-wells/{jobId}. When no well can be promoted, nothing starts and jobId is 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 PostProjectInventoryPlanPromoteWellsExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | 
            var promoteWells = new InventoryPlanPromoteWellsInput(); // InventoryPlanPromoteWellsInput | 

            try
            {
                // Promotes wells of the inventory plan to project wells, as the app does. Send the ids of up to 1,000 wells of the plan, as listed in `wells` of the plan. The response says right away which wells will be promoted and which are skipped, with a reason for each. A well that is already promoted, or whose promotion is in progress, is skipped and never promoted twice. The promotion runs in the background. Follow it with the `jobId` in `GET /v1/projects/{projectId}/inventory/plans/{id}/promote-wells/{jobId}`. When no well can be promoted, nothing starts and `jobId` is null.
                InventoryPlanPromoteWellsResponse result = apiInstance.PostProjectInventoryPlanPromoteWells(projectId, id, promoteWells);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.PostProjectInventoryPlanPromoteWells: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    
promoteWells InventoryPlanPromoteWellsInput    

Return type

InventoryPlanPromoteWellsResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK. No well can be promoted, so nothing started and `jobId` is null. | - | | 202 | Accepted. The promotion of the wells in `willCreate` started. | - | | 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 plan does not exist. | - |

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

PostProjectInventoryPlans

InventoryPlanMultiStatusResponse PostProjectInventoryPlans (string projectId, List inventoryPlan = null)

Creates empty inventory plans in the project. Add wells to a plan with the proposed wells endpoints. A plan created here shows in Inventory Management Review with the Imported chip, as a plan imported from a CSV does. A request holds at most 500 plans. Plan names are unique in the project, including across the records of the request. A record that fails validation is reported and the other records are written.

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 PostProjectInventoryPlansExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var inventoryPlan = new List<InventoryPlanInput>(); // List<InventoryPlanInput> | Inventory plans to create. See InventoryPlanInputList. (optional) 

            try
            {
                // Creates empty inventory plans in the project. Add wells to a plan with the proposed wells endpoints. A plan created here shows in Inventory Management Review with the Imported chip, as a plan imported from a CSV does. A request holds at most 500 plans. Plan names are unique in the project, including across the records of the request. A record that fails validation is reported and the other records are written.
                InventoryPlanMultiStatusResponse result = apiInstance.PostProjectInventoryPlans(projectId, inventoryPlan);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.PostProjectInventoryPlans: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
inventoryPlan List<InventoryPlanInput> Inventory plans to create. See InventoryPlanInputList. [optional] [Max number of items is 500]

Return type

InventoryPlanMultiStatusResponse

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, or the project does not exist. | - |

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

PutProjectInventoryPlans

InventoryPlanMultiStatusResponse PutProjectInventoryPlans (string projectId, List inventoryPlan = null)

Creates or updates inventory plans of the project by name. A name that an inventory plan of the project has exactly updates that plan. Any other name creates a plan, as POST does. The name of an existing plan does not change, so use PATCH to rename a plan. A request holds at most 500 plans. A record that fails validation is reported and the other records are written.

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 PutProjectInventoryPlansExample
    {
        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 ProjectInventoryPlansApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var inventoryPlan = new List<InventoryPlanInput>(); // List<InventoryPlanInput> | Inventory plans to create or update. See InventoryPlanInputList. (optional) 

            try
            {
                // Creates or updates inventory plans of the project by name. A name that an inventory plan of the project has exactly updates that plan. Any other name creates a plan, as POST does. The name of an existing plan does not change, so use PATCH to rename a plan. A request holds at most 500 plans. A record that fails validation is reported and the other records are written.
                InventoryPlanMultiStatusResponse result = apiInstance.PutProjectInventoryPlans(projectId, inventoryPlan);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectInventoryPlansApi.PutProjectInventoryPlans: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
inventoryPlan List<InventoryPlanInput> Inventory plans to create or update. See InventoryPlanInputList. [optional] [Max number of items is 500]

Return type

InventoryPlanMultiStatusResponse

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, or the project does not exist. | - |

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