combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ProjectFacilitiesApi

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

Method HTTP request Description
DeleteProjectFacilities DELETE /v1/projects/{projectId}/facilities Deletes the facilities that match `id`, or `dataSource` and `chosenID`. Every economics run that contains a deleted facility is deleted with its data, and the facility is removed from its scenarios and networks. `X-Delete-Count` is the number of facilities deleted; `X-Prune-Failure-Count` is the number of networks that could not be updated and still need attention.
DeleteProjectFacilityById DELETE /v1/projects/{projectId}/facilities/{id} Deletes the facility. Every economics run that contains it is deleted with its data, and the facility is removed from its scenarios and networks. A well is not deleted.
GetProjectFacilities GET /v1/projects/{projectId}/facilities Returns the facilities of the project. A facility is not a well: it appears in no well endpoint.
GetProjectFacilityById GET /v1/projects/{projectId}/facilities/{id} Returns the facility that matches the given id. A well is not found.
HeadProjectFacilities HEAD /v1/projects/{projectId}/facilities Returns the number of facilities in the project in `X-Query-Count`, without a body.
PatchProjectFacilities PATCH /v1/projects/{projectId}/facilities Renames the facilities that match a record by Chosen ID and data source. A record that matches no facility of the project is reported as an error.
PostProjectFacilities POST /v1/projects/{projectId}/facilities Creates facilities in the project. A record whose Chosen ID is held by any well or facility of the project is refused.
PutProjectFacilities PUT /v1/projects/{projectId}/facilities Updates the facilities that match a record by Chosen ID and data source, and creates the rest. A record whose Chosen ID is held by a plain well of the project is refused.

DeleteProjectFacilities

void DeleteProjectFacilities (string projectId, string id = null, string chosenID = null, string dataSource = null)

Deletes the facilities that match id, or dataSource and chosenID. Every economics run that contains a deleted facility is deleted with its data, and the facility is removed from its scenarios and networks. X-Delete-Count is the number of facilities deleted; X-Prune-Failure-Count is the number of networks that could not be updated and still need attention.

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 DeleteProjectFacilitiesExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = new string[] { "id_example" };  // IEnumerable<string> | filter by id (optional)
            var chosenID = new string[] { "chosenID_example" };  // IEnumerable<string> | filter by chosenID (optional)
            var dataSource = "dataSource_example";  // string | filter by dataSource (optional)

            try
            {
                // Deletes the facilities that match `id`, or `dataSource` and `chosenID`. **Every economics run that contains a deleted facility is deleted with its data**, and the facility is removed from its scenarios and networks. `X-Delete-Count` is the number of facilities deleted; `X-Prune-Failure-Count` is the number of networks that could not be updated and still need attention.
                apiInstance.DeleteProjectFacilities(projectId, id, chosenID, dataSource);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.DeleteProjectFacilities: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string filter by id [optional]
chosenID string filter by chosenID [optional]
dataSource string filter by dataSource [optional]

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-Prune-Failure-Count -
* X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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

DeleteProjectFacilityById

void DeleteProjectFacilityById (string projectId, string id)

Deletes the facility. Every economics run that contains it is deleted with its data, and the facility is removed from its scenarios and networks. A well is not deleted.

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 DeleteProjectFacilityByIdExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

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

            try
            {
                // Deletes the facility. **Every economics run that contains it is deleted with its data**, and the facility is removed from its scenarios and networks. A well is not deleted.
                apiInstance.DeleteProjectFacilityById(projectId, id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.DeleteProjectFacilityById: " + 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 | No Content | * X-Prune-Failure-Count -
* X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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

GetProjectFacilities

ICollection<Facility> GetProjectFacilities (string projectId, int? skip = null, int? take = null, string sort = null, string cursor = null, string chosenID = null, string dataSource = null, DateTimeOffset? updatedAt = null)

Returns the facilities of the project. A facility is not a well: it appears in no well endpoint.

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 GetProjectFacilitiesExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var skip = 56;  // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 1000)
            var sort = "sort_example";  // string | Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. (optional)
            var cursor = "cursor_example";  // string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. (optional)
            var chosenID = new string[] { "chosenID_example" };  // IEnumerable<string> | filter by chosenID (optional)
            var dataSource = "dataSource_example";  // string | filter by dataSource (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt (optional)

            try
            {
                // Returns the facilities of the project. A facility is not a well: it appears in no well endpoint.
                ICollection<Facility> result = apiInstance.GetProjectFacilities(projectId, skip, take, sort, cursor, chosenID, dataSource, updatedAt);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.GetProjectFacilities: " + 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. Cannot be combined with `cursor`; sending both returns 400. [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 1000]
sort string Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. [optional]
cursor string Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. [optional]
chosenID string filter by chosenID [optional]
dataSource string filter by dataSource [optional]
updatedAt DateTimeOffset? filter by updatedAt [optional]

Return type

ICollection<Facility>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * Link - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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

GetProjectFacilityById

Facility GetProjectFacilityById (string projectId, string id)

Returns the facility that matches the given id. A well 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 GetProjectFacilityByIdExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

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

            try
            {
                // Returns the facility that matches the given id. A well is not found.
                Facility result = apiInstance.GetProjectFacilityById(projectId, id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.GetProjectFacilityById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    

Return type

Facility

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. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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

HeadProjectFacilities

void HeadProjectFacilities (string projectId, int? skip = null, int? take = null, string chosenID = null, string dataSource = null, DateTimeOffset? updatedAt = null)

Returns the number of facilities in 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 HeadProjectFacilitiesExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var skip = 56;  // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 1000)
            var chosenID = new string[] { "chosenID_example" };  // IEnumerable<string> | filter by chosenID (optional)
            var dataSource = "dataSource_example";  // string | filter by dataSource (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt (optional)

            try
            {
                // Returns the number of facilities in the project in `X-Query-Count`, without a body.
                apiInstance.HeadProjectFacilities(projectId, skip, take, chosenID, dataSource, updatedAt);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.HeadProjectFacilities: " + 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. Cannot be combined with `cursor`; sending both returns 400. [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 1000]
chosenID string filter by chosenID [optional]
dataSource string filter by dataSource [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 - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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

PatchProjectFacilities

WellMultiStatusResponse PatchProjectFacilities (string projectId, List facility = null)

Renames the facilities that match a record by Chosen ID and data source. A record that matches no facility of the project is reported as an error.

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 PatchProjectFacilitiesExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var facility = new List<FacilityInput>(); // List<FacilityInput> | Facilities to rename. See FacilityInputList. (optional) 

            try
            {
                // Renames the facilities that match a record by Chosen ID and data source. A record that matches no facility of the project is reported as an error.
                WellMultiStatusResponse result = apiInstance.PatchProjectFacilities(projectId, facility);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.PatchProjectFacilities: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
facility List<FacilityInput> Facilities to rename. See FacilityInputList. [optional] [Max number of items is 1000]

Return type

WellMultiStatusResponse

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. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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

PostProjectFacilities

WellMultiStatusResponse PostProjectFacilities (string projectId, List facility = null)

Creates facilities in the project. A record whose Chosen ID is held by any well or facility of the project is refused.

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 PostProjectFacilitiesExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var facility = new List<FacilityInput>(); // List<FacilityInput> | Facilities to create. See FacilityInputList. (optional) 

            try
            {
                // Creates facilities in the project. A record whose Chosen ID is held by any well or facility of the project is refused.
                WellMultiStatusResponse result = apiInstance.PostProjectFacilities(projectId, facility);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.PostProjectFacilities: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
facility List<FacilityInput> Facilities to create. See FacilityInputList. [optional] [Max number of items is 1000]

Return type

WellMultiStatusResponse

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. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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

PutProjectFacilities

WellMultiStatusResponse PutProjectFacilities (string projectId, List facility = null)

Updates the facilities that match a record by Chosen ID and data source, and creates the rest. A record whose Chosen ID is held by a plain well of the project is refused.

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 PutProjectFacilitiesExample
    {
        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 ProjectFacilitiesApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var facility = new List<FacilityInput>(); // List<FacilityInput> | Facilities to update or create. See FacilityInputList. (optional) 

            try
            {
                // Updates the facilities that match a record by Chosen ID and data source, and creates the rest. A record whose Chosen ID is held by a plain well of the project is refused.
                WellMultiStatusResponse result = apiInstance.PutProjectFacilities(projectId, facility);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectFacilitiesApi.PutProjectFacilities: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
facility List<FacilityInput> Facilities to update or create. See FacilityInputList. [optional] [Max number of items is 1000]

Return type

WellMultiStatusResponse

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. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |

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