combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ProjectProductionCommentsApi

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

Method HTTP request Description
DeleteProjectProductionCommentById DELETE /v1/projects/{projectId}/production-comments/{id} Deletes the production comment document that matches the given id in the specified project's scope.
DeleteProjectProductionComments DELETE /v1/projects/{projectId}/production-comments Delete production comment document(s) in project scope. Supports either `id`, or `well` with date-range filters (`startDate` and `endDate`).
GetProjectProductionCommentById GET /v1/projects/{projectId}/production-comments/{id} Returns the production comment document that matches the given id in the specified project's scope.
GetProjectProductionComments GET /v1/projects/{projectId}/production-comments Returns a list of production comment documents in the specified project's scope.
HeadProjectProductionComments HEAD /v1/projects/{projectId}/production-comments Returns metadata about the existing production comment documents in the specified project's scope.
PatchProjectProductionComments PATCH /v1/projects/{projectId}/production-comments Partially updates production comment document(s) in project scope. Requires `id` and at least one writable field.
PostProjectProductionComments POST /v1/projects/{projectId}/production-comments Creates production comment document(s) in project scope. The request body accepts either a single ProjectProductionCommentInput object or an array payload.
PutProjectProductionComments PUT /v1/projects/{projectId}/production-comments Upserts production comment document(s) in project scope. When `id` is provided, existing records are replaced or inserted if not found. Without `id`, a new record is created.

DeleteProjectProductionCommentById

void DeleteProjectProductionCommentById (string projectId, string id)

Deletes the production comment document that matches the given id in the specified project’s scope.

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 DeleteProjectProductionCommentByIdExample
    {
        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 ProjectProductionCommentsApi(serviceAccount, apiKey);

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

            try
            {
                // Deletes the production comment document that matches the given id in the specified project's scope.
                apiInstance.DeleteProjectProductionCommentById(projectId, id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.DeleteProjectProductionCommentById: " + 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. | - |

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

DeleteProjectProductionComments

void DeleteProjectProductionComments (string projectId, string id = null, string well = null, DateTimeOffset? startDate = null, DateTimeOffset? endDate = null)

Delete production comment document(s) in project scope. Supports either id, or well with date-range filters (startDate and endDate).

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 DeleteProjectProductionCommentsExample
    {
        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 ProjectProductionCommentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var id = "id_example";  // string | filter by production comment id (optional)
            var well = "well_example";  // string | filter by well id (required when deleting by date range) (optional)
            var startDate = 2013-10-20T19:20:30+01:00;  // DateTimeOffset? | lower bound filter for startDate (used with well + endDate) (optional)
            var endDate = 2013-10-20T19:20:30+01:00;  // DateTimeOffset? | upper bound filter for endDate (used with well + startDate) (optional)

            try
            {
                // Delete production comment document(s) in project scope. Supports either `id`, or `well` with date-range filters (`startDate` and `endDate`).
                apiInstance.DeleteProjectProductionComments(projectId, id, well, startDate, endDate);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.DeleteProjectProductionComments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string filter by production comment id [optional]
well string filter by well id (required when deleting by date range) [optional]
startDate DateTimeOffset? lower bound filter for startDate (used with well + endDate) [optional]
endDate DateTimeOffset? upper bound filter for endDate (used with well + startDate) [optional]

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

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

GetProjectProductionCommentById

ProjectProductionComment GetProjectProductionCommentById (string projectId, string id)

Returns the production comment document that matches the given id in the specified project’s scope.

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 GetProjectProductionCommentByIdExample
    {
        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 ProjectProductionCommentsApi(serviceAccount, apiKey);

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

            try
            {
                // Returns the production comment document that matches the given id in the specified project's scope.
                ProjectProductionComment result = apiInstance.GetProjectProductionCommentById(projectId, id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.GetProjectProductionCommentById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    

Return type

ProjectProductionComment

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]

GetProjectProductionComments

ICollection<ProjectProductionComment> GetProjectProductionComments (string projectId, int? skip = null, int? take = null, string sort = null, string cursor = null, string well = null, string commentType = null, DateTimeOffset? startDate = null, DateTimeOffset? endDate = null, DateTimeOffset? updatedAt = null)

Returns a list of production comment documents in the specified project’s scope.

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 GetProjectProductionCommentsExample
    {
        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 ProjectProductionCommentsApi(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 2000)
            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 well = "well_example";  // string | filter by well (optional)
            var commentType = "commentType_example";  // string | filter by stable comment type key (for example, prod_comment_type_0) (optional)
            var startDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by startDate (optional)
            var endDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by endDate (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z (optional)

            try
            {
                // Returns a list of production comment documents in the specified project's scope.
                ICollection<ProjectProductionComment> result = apiInstance.GetProjectProductionComments(projectId, skip, take, sort, cursor, well, commentType, startDate, endDate, updatedAt);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.GetProjectProductionComments: " + 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 2000]
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]
well string filter by well [optional]
commentType string filter by stable comment type key (for example, prod_comment_type_0) [optional]
startDate DateTimeOffset? filter by startDate [optional]
endDate DateTimeOffset? filter by endDate [optional]
updatedAt DateTimeOffset? filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z [optional]

Return type

ICollection<ProjectProductionComment>

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

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

HeadProjectProductionComments

void HeadProjectProductionComments (string projectId, int? skip = null, int? take = null, string well = null, string commentType = null, DateTimeOffset? startDate = null, DateTimeOffset? endDate = null, DateTimeOffset? updatedAt = null)

Returns metadata about the existing production comment documents in the specified project’s scope.

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 HeadProjectProductionCommentsExample
    {
        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 ProjectProductionCommentsApi(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 2000)
            var well = "well_example";  // string | filter by well (optional)
            var commentType = "commentType_example";  // string | filter by stable comment type key (for example, prod_comment_type_0) (optional)
            var startDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by startDate (optional)
            var endDate = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by endDate (optional)
            var updatedAt = DateTimeOffset.Parse("2013-10-20");  // DateTimeOffset? | filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z (optional)

            try
            {
                // Returns metadata about the existing production comment documents in the specified project's scope.
                apiInstance.HeadProjectProductionComments(projectId, skip, take, well, commentType, startDate, endDate, updatedAt);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.HeadProjectProductionComments: " + 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 2000]
well string filter by well [optional]
commentType string filter by stable comment type key (for example, prod_comment_type_0) [optional]
startDate DateTimeOffset? filter by startDate [optional]
endDate DateTimeOffset? filter by endDate [optional]
updatedAt DateTimeOffset? filter by updatedAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example updatedAt[gt]=2018-01-01T00:00:00Z [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. | - |

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

PatchProjectProductionComments

ProjectProductionCommentMultiStatusResponse PatchProjectProductionComments (string projectId, List productionComments = null)

Partially updates production comment document(s) in project scope. Requires id and at least one writable field.

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 PatchProjectProductionCommentsExample
    {
        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 ProjectProductionCommentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var productionComments = new List<ProjectProductionCommentPatchInput>(); // List<ProjectProductionCommentPatchInput> | Project production comment document(s) to patch. (optional) 

            try
            {
                // Partially updates production comment document(s) in project scope. Requires `id` and at least one writable field.
                ProjectProductionCommentMultiStatusResponse result = apiInstance.PatchProjectProductionComments(projectId, productionComments);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.PatchProjectProductionComments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
productionComments List<ProjectProductionCommentPatchInput> Project production comment document(s) to patch. [optional] [Max number of items is 200]

Return type

ProjectProductionCommentMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - |

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

PostProjectProductionComments

ProjectProductionCommentMultiStatusResponse PostProjectProductionComments (string projectId, List productionComments = null)

Creates production comment document(s) in project scope. The request body accepts either a single ProjectProductionCommentInput object or an array payload.

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 PostProjectProductionCommentsExample
    {
        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 ProjectProductionCommentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var productionComments = new List<ProjectProductionCommentInput>(); // List<ProjectProductionCommentInput> | Project production comment document(s) to insert. (optional) 

            try
            {
                // Creates production comment document(s) in project scope. The request body accepts either a single ProjectProductionCommentInput object or an array payload.
                ProjectProductionCommentMultiStatusResponse result = apiInstance.PostProjectProductionComments(projectId, productionComments);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.PostProjectProductionComments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
productionComments List<ProjectProductionCommentInput> Project production comment document(s) to insert. [optional] [Max number of items is 200]

Return type

ProjectProductionCommentMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - |

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

PutProjectProductionComments

ProjectProductionCommentMultiStatusResponse PutProjectProductionComments (string projectId, List productionComments = null)

Upserts production comment document(s) in project scope. When id is provided, existing records are replaced or inserted if not found. Without id, a new record is created.

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 PutProjectProductionCommentsExample
    {
        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 ProjectProductionCommentsApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var productionComments = new List<ProjectProductionCommentPutInput>(); // List<ProjectProductionCommentPutInput> | Project production comment document(s) to replace. (optional) 

            try
            {
                // Upserts production comment document(s) in project scope. When `id` is provided, existing records are replaced or inserted if not found. Without `id`, a new record is created.
                ProjectProductionCommentMultiStatusResponse result = apiInstance.PutProjectProductionComments(projectId, productionComments);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProjectProductionCommentsApi.PutProjectProductionComments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
productionComments List<ProjectProductionCommentPutInput> Project production comment document(s) to replace. [optional] [Max number of items is 200]

Return type

ProjectProductionCommentMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - |

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