C# client for the ComboCurve REST API
View the Project on GitHub insidepetroleum/combocurve-client-csharp
All URIs are relative to https://api.combocurve.com
| Method | HTTP request | Description |
|---|---|---|
| DeleteV2TypeCurve | DELETE /v2/projects/{projectId}/type-curves/{id} | Deletes the type curve document that matches the given id in projectId project, together with its fits, normalization and time series. Lookup table rules that pointed at it are left without a type curve. To delete several in one request, filter the collection route by `id` or `name`. |
| DeleteV2TypeCurves | DELETE /v2/projects/{projectId}/type-curves | Deletes the type curve documents in projectId project that match the given filters, together with their fits, normalization and time series. Each filter selects on its own, so `?id=a&name=b` deletes both. At least one of `id` or `name` is required. Lookup table rules that pointed at a deleted type curve are left without a type curve. |
| GetV2TypeCurveById | GET /v2/projects/{projectId}/type-curves/{id} | Returns the type curve document that matches the given id scoped to projectId project. |
| GetV2TypeCurveFits | GET /v2/projects/{projectId}/type-curves/{id}/fits | Returns the stored fits for the given type curve, keyed by phase. A phase with no stored fit is omitted. |
| GetV2TypeCurveNormalization | GET /v2/projects/{projectId}/type-curves/{id}/normalization | Returns the normalization configuration for the given type curve, keyed by phase. Each phase holds one object per normalized factor, and each factor holds up to five piecewise segments. `TypeCurveV2NormalizationPhase` has a worked example. A type curve that has never been normalized returns an empty object with a 200, not a 404: the type curve exists, it just has no configuration. Phases are never returned as `null`, because a configuration always covers all three phases. |
| GetV2TypeCurveVolumes | GET /v2/projects/{projectId}/type-curves/{id}/volumes | Returns the given type curve's volumes, one row per period, predicted from its fits over the life of the type curve. Rows start on 1 January of the current year and are returned in date order. A type curve with no fits returns an empty list. |
| GetV2TypeCurveWells | GET /v2/projects/{projectId}/type-curves/{id}/wells | Returns the wells assigned to the given type curve, as full well documents rather than ids. `GET /v2/projects/{projectId}/type-curves/{id}` returns `wells` and `excludedWells` as bare ObjectIds, and this API has no bulk id lookup to resolve them with, so this is how a caller finds out which wells a type curve actually covers. The well half of each row is the same object `/v1/projects/{projectId}/wells` returns, and supports the same `sort` and filter parameters. Every assigned well is listed by default, excluded ones included and flagged — the same property V1's `/representative-wells` has, where `rep` is a field on the row rather than a filter. Use `excluded` to narrow to one side. |
| GetV2TypeCurves | GET /v2/projects/{projectId}/type-curves | Returns a list of type curve documents scoped to projectId project. Unlike V1, fits and normalization are not embedded — they are separate sub-resources. |
| HeadV2TypeCurveWells | HEAD /v2/projects/{projectId}/type-curves/{id}/wells | Returns metadata about the wells assigned to the given type curve. |
| HeadV2TypeCurves | HEAD /v2/projects/{projectId}/type-curves | Returns metadata about the existing type curve documents scoped to projectId project. |
| PatchV2TypeCurve | PATCH /v2/projects/{projectId}/type-curves/{id} | Updates the type curve document that matches the given id in projectId project and returns it as stored. PATCH leaves omitted fields exactly as they were. The path names the type curve, so the body needs no id; one that matches the path is accepted, which lets a GET body be sent back, and one that names a different type curve is a 400. To update several in one request, use the batch route. |
| PatchV2TypeCurvesBatch | PATCH /v2/projects/{projectId}/type-curves/batch | Updates one or more type curve documents in projectId project, each identified by its own `id`. A single object is accepted as a one-element batch. PATCH leaves omitted fields exactly as they were. Records are matched by `id` rather than by name, so renaming a type curve updates it instead of creating a duplicate. |
| PostV2TypeCurve | POST /v2/projects/{projectId}/type-curves | Creates a single type curve document in projectId project and returns it as stored. To create several in one request, use the batch route. For fits you must create the type curve here, then write its fits through the fits sub-resource. |
| PostV2TypeCurvesBatch | POST /v2/projects/{projectId}/type-curves/batch | Creates one or more type curve documents in projectId project. A single object is accepted as a one-element batch. For fits you must create the type curve here, then write its fits through the fits sub-resource. |
| PutV2TypeCurveFits | PUT /v2/projects/{projectId}/type-curves/{id}/fits | Replaces the type curve's fits with the body. Phases in the body are created or replaced, and any stored phase absent from the body is deleted. To change one phase and keep the others, send the others unchanged — a `GET` body is a valid payload. Within a phase the write is also a replacement: a phase switched from `rate` to `ratio` does not keep its old series. The body is the `GET` response shape, so a `GET` body is a valid payload verbatim — `updatedAt` is accepted and ignored. Segments are validated against the shared forecast-segment rules, including segment-to-segment continuity, and the response returns them in full form read back from storage, so the derived fields a payload did not carry (`qEnd`, `diEffSec`, `slope`, and the switch fields on `arps_modified`) come back computed. Unknown fields are rejected with a `400` naming them rather than ignored. Validation is all-or-nothing: a failure anywhere in the body is one `400` and nothing is written. There is no partially applied write and no multi-status envelope, because the body is an object keyed by phase rather than a list of records. |
| PutV2TypeCurveNormalization | PUT /v2/projects/{projectId}/type-curves/{id}/normalization | Writes the normalization configuration for the given type curve, replacing any existing configuration. To set up a new type curve with normalization, create it with `POST /v2/projects/{projectId}/type-curves`, then call this endpoint. All three phases are required, which is where this differs from `PUT /{id}/fits`. That endpoint can write one phase and leave the others unchanged; this one replaces the whole configuration. Send the full configuration, in the shape `GET` returns. `xAxis` is the only field that cannot always be sent back as `GET` returns it. When `customBasisKey` is set, `GET` returns the basis's composite ratio as `xAxis`, and sending that ratio back is a 400. Omit `xAxis` when `customBasisKey` is set; otherwise `xAxis` is required. `customBasisKey` cannot be combined with `yAxis: eur_and_peak`. A basis normalizes a single factor, so the second factor would be ignored. Segment `xStart` values must increase strictly from one segment to the next. A segment ends where the next one begins, so an out-of-order or repeated value describes a segment that covers no x values. Validation is all-or-nothing: any error in the body returns one `400`, and nothing is written. This endpoint writes the configuration only. It does not recompute the per-well normalization multipliers. |
void DeleteV2TypeCurve (string projectId, string id)
Deletes the type curve document that matches the given id in projectId project, together with its fits, normalization and time series. Lookup table rules that pointed at it are left without a type curve. To delete several in one request, filter the collection route by id or name.
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 DeleteV2TypeCurveExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Deletes the type curve document that matches the given id in projectId project, together with its fits, normalization and time series. Lookup table rules that pointed at it are left without a type curve. To delete several in one request, filter the collection route by `id` or `name`.
apiInstance.DeleteV2TypeCurve(projectId, id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.DeleteV2TypeCurve: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | No Content. The type curve was deleted. | * X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. The id is malformed. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project does not exist in this tenant, or the type curve does not exist in it. A type curve in a different project is deliberately indistinguishable from one that does not exist. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteV2TypeCurves (string projectId, string id = null, string name = null)
Deletes the type curve documents in projectId project that match the given filters, together with their fits, normalization and time series. Each filter selects on its own, so ?id=a&name=b deletes both. At least one of id or name is required. Lookup table rules that pointed at a deleted type curve are left without a type curve.
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 DeleteV2TypeCurvesExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = new string[] { "id_example" }; // IEnumerable<string> | filter by id (optional)
var name = new string[] { "name_example" }; // IEnumerable<string> | filter by name (optional)
try
{
// Deletes the type curve documents in projectId project that match the given filters, together with their fits, normalization and time series. Each filter selects on its own, so `?id=a&name=b` deletes both. At least one of `id` or `name` is required. Lookup table rules that pointed at a deleted type curve are left without a type curve.
apiInstance.DeleteV2TypeCurves(projectId, id, name);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.DeleteV2TypeCurves: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | filter by id | [optional] |
| name | string | filter by name | [optional] |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | No Content. The matching type curves were deleted. | * X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. Neither `id` nor `name` was given, a filter is not recognized, or a value is malformed. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project does not exist in this tenant, or no type curve in it matches the filters. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2 GetV2TypeCurveById (string projectId, string id)
Returns the type curve document that matches the given id scoped to projectId project.
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 GetV2TypeCurveByIdExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Returns the type curve document that matches the given id scoped to projectId project.
TypeCurveV2 result = apiInstance.GetV2TypeCurveById(projectId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.GetV2TypeCurveById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string |
API Key, Service Account
| 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. Insufficient permissions to access the resource. | - | | 404 | Not Found. The type curve does not exist, or belongs to a different project. The two are deliberately indistinguishable. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2Fits GetV2TypeCurveFits (string projectId, string id, string phase = null)
Returns the stored fits for the given type curve, keyed by phase. A phase with no stored fit is omitted.
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 GetV2TypeCurveFitsExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var phase = new string[] { "phase_example" }; // IEnumerable<string> | Narrows the response to the given phases. Repeat the parameter for more than one. Omit it to return every fitted phase. A value outside the enum is a 400. (optional)
try
{
// Returns the stored fits for the given type curve, keyed by phase. A phase with no stored fit is omitted.
TypeCurveV2Fits result = apiInstance.GetV2TypeCurveFits(projectId, id, phase);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.GetV2TypeCurveFits: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| phase | string | Narrows the response to the given phases. Repeat the parameter for more than one. Omit it to return every fitted phase. A value outside the enum is a 400. | [optional] |
API Key, Service Account
| 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. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project or the type curve does not exist, or the type curve belongs to a different project. Those cases are deliberately indistinguishable. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2Normalization GetV2TypeCurveNormalization (string projectId, string id, string phase = null)
Returns the normalization configuration for the given type curve, keyed by phase. Each phase holds one object per normalized factor, and each factor holds up to five piecewise segments. TypeCurveV2NormalizationPhase has a worked example. A type curve that has never been normalized returns an empty object with a 200, not a 404: the type curve exists, it just has no configuration. Phases are never returned as null, because a configuration always covers all three phases.
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 GetV2TypeCurveNormalizationExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var phase = new string[] { "phase_example" }; // IEnumerable<string> | Narrows the response to the given phases. Repeat the parameter for more than one. Omit it to return every phase. A value outside the enum is a 400. (optional)
try
{
// Returns the normalization configuration for the given type curve, keyed by phase. Each phase holds one object per normalized factor, and each factor holds up to five piecewise segments. `TypeCurveV2NormalizationPhase` has a worked example. A type curve that has never been normalized returns an empty object with a 200, not a 404: the type curve exists, it just has no configuration. Phases are never returned as `null`, because a configuration always covers all three phases.
TypeCurveV2Normalization result = apiInstance.GetV2TypeCurveNormalization(projectId, id, phase);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.GetV2TypeCurveNormalization: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| phase | string | Narrows the response to the given phases. Repeat the parameter for more than one. Omit it to return every phase. A value outside the enum is a 400. | [optional] |
API Key, Service Account
| 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. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project or the type curve does not exist, or the type curve belongs to a different project. Those cases are deliberately indistinguishable. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<TypeCurveV2Volume> GetV2TypeCurveVolumes (string projectId, string id, string resolution, int? skip = null, int? take = null)
Returns the given type curve’s volumes, one row per period, predicted from its fits over the life of the type curve. Rows start on 1 January of the current year and are returned in date order. A type curve with no fits returns an empty list.
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 GetV2TypeCurveVolumesExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var resolution = "resolution_example"; // string | Whether to return daily or monthly volumes. Required; a missing or unknown value is a 400.
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 200)
try
{
// Returns the given type curve's volumes, one row per period, predicted from its fits over the life of the type curve. Rows start on 1 January of the current year and are returned in date order. A type curve with no fits returns an empty list.
ICollection<TypeCurveV2Volume> result = apiInstance.GetV2TypeCurveVolumes(projectId, id, resolution, skip, take);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.GetV2TypeCurveVolumes: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| resolution | string | Whether to return daily or monthly volumes. Required; a missing or unknown value is a 400. | |
| skip | int? | number of items to skip | [optional] [default to 0] |
| take | int? | max records to return | [optional] [default to 25] [between 1 and 200] |
ICollection<TypeCurveV2Volume>
API Key, Service Account
| 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. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project or the type curve does not exist, or the type curve belongs to a different project. Those cases are deliberately indistinguishable. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<TypeCurveV2Well> GetV2TypeCurveWells (string projectId, string id, int? skip = null, int? take = null, string sort = null, string cursor = null, bool? excluded = null, string api10 = null, string api12 = null, string api14 = null, string chosenID = null, string county = null, string currentOperator = null, string dataSource = null, DateTimeOffset? firstProdDate = null, string inptID = null, string state = null, string wellName = null)
Returns the wells assigned to the given type curve, as full well documents rather than ids. GET /v2/projects/{projectId}/type-curves/{id} returns wells and excludedWells as bare ObjectIds, and this API has no bulk id lookup to resolve them with, so this is how a caller finds out which wells a type curve actually covers. The well half of each row is the same object /v1/projects/{projectId}/wells returns, and supports the same sort and filter parameters. Every assigned well is listed by default, excluded ones included and flagged — the same property V1’s /representative-wells has, where rep is a field on the row rather than a filter. Use excluded to narrow to one side.
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 GetV2TypeCurveWellsExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_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 1000)
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 excluded = true; // bool? | Narrows to the excluded wells (`true`) or to the wells actually being fitted (`false`). Omit it to return every assigned well. (optional)
var api10 = new string[] { "api10_example" }; // IEnumerable<string> | filter by api10 (optional)
var api12 = new string[] { "api12_example" }; // IEnumerable<string> | filter by api12 (optional)
var api14 = new string[] { "api14_example" }; // IEnumerable<string> | filter by api14 (optional)
var chosenID = new string[] { "chosenID_example" }; // IEnumerable<string> | filter by chosenID (optional)
var county = new string[] { "county_example" }; // IEnumerable<string> | filter by county (optional)
var currentOperator = new string[] { "currentOperator_example" }; // IEnumerable<string> | filter by currentOperator (optional)
var dataSource = "dataSource_example"; // string | filter by dataSource (optional)
var firstProdDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by firstProdDate - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example firstProdDate[gt]=2018-01-01 (optional)
var inptID = "inptID_example"; // string | filter by inptID (optional)
var state = new string[] { "state_example" }; // IEnumerable<string> | filter by state (optional)
var wellName = new string[] { "wellName_example" }; // IEnumerable<string> | filter by wellName (optional)
try
{
// Returns the wells assigned to the given type curve, as full well documents rather than ids. `GET /v2/projects/{projectId}/type-curves/{id}` returns `wells` and `excludedWells` as bare ObjectIds, and this API has no bulk id lookup to resolve them with, so this is how a caller finds out which wells a type curve actually covers. The well half of each row is the same object `/v1/projects/{projectId}/wells` returns, and supports the same `sort` and filter parameters. Every assigned well is listed by default, excluded ones included and flagged — the same property V1's `/representative-wells` has, where `rep` is a field on the row rather than a filter. Use `excluded` to narrow to one side.
ICollection<TypeCurveV2Well> result = apiInstance.GetV2TypeCurveWells(projectId, id, skip, take, sort, cursor, excluded, api10, api12, api14, chosenID, county, currentOperator, dataSource, firstProdDate, inptID, state, wellName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.GetV2TypeCurveWells: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | 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 1000] |
| 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] |
| excluded | bool? | Narrows to the excluded wells (`true`) or to the wells actually being fitted (`false`). Omit it to return every assigned well. | [optional] |
| api10 | string | filter by api10 | [optional] |
| api12 | string | filter by api12 | [optional] |
| api14 | string | filter by api14 | [optional] |
| chosenID | string | filter by chosenID | [optional] |
| county | string | filter by county | [optional] |
| currentOperator | string | filter by currentOperator | [optional] |
| dataSource | string | filter by dataSource | [optional] |
| firstProdDate | DateTimeOffset? | filter by firstProdDate - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example firstProdDate[gt]=2018-01-01 | [optional] |
| inptID | string | filter by inptID | [optional] |
| state | string | filter by state | [optional] |
| wellName | string | filter by wellName | [optional] |
API Key, Service Account
| 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. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project or the type curve does not exist, or the type curve belongs to a different project. Those cases are deliberately indistinguishable. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<TypeCurveV2> GetV2TypeCurves (string projectId, int? skip = null, int? take = null, string sort = null, string cursor = null, string name = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)
Returns a list of type curve documents scoped to projectId project. Unlike V1, fits and normalization are not embedded — they are separate sub-resources.
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 GetV2TypeCurvesExample
{
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 TypeCurvesV2Api(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 200)
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 = "name_example"; // string | filter by name (optional)
var createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z (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 type curve documents scoped to projectId project. Unlike V1, fits and normalization are not embedded — they are separate sub-resources.
ICollection<TypeCurveV2> result = apiInstance.GetV2TypeCurves(projectId, skip, take, sort, cursor, name, createdAt, updatedAt);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.GetV2TypeCurves: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| 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 200] |
| 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] |
| createdAt | DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z | [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] |
API Key, Service Account
| 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. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project does not exist in this tenant. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadV2TypeCurveWells (string projectId, string id, int? skip = null, int? take = null, bool? excluded = null, string api10 = null, string api12 = null, string api14 = null, string chosenID = null, string county = null, string currentOperator = null, string dataSource = null, DateTimeOffset? firstProdDate = null, string inptID = null, string state = null, string wellName = null)
Returns metadata about the wells assigned to the given type curve.
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 HeadV2TypeCurveWellsExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_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 1000)
var excluded = true; // bool? | Narrows to the excluded wells (`true`) or to the wells actually being fitted (`false`). Omit it to return every assigned well. (optional)
var api10 = new string[] { "api10_example" }; // IEnumerable<string> | filter by api10 (optional)
var api12 = new string[] { "api12_example" }; // IEnumerable<string> | filter by api12 (optional)
var api14 = new string[] { "api14_example" }; // IEnumerable<string> | filter by api14 (optional)
var chosenID = new string[] { "chosenID_example" }; // IEnumerable<string> | filter by chosenID (optional)
var county = new string[] { "county_example" }; // IEnumerable<string> | filter by county (optional)
var currentOperator = new string[] { "currentOperator_example" }; // IEnumerable<string> | filter by currentOperator (optional)
var dataSource = "dataSource_example"; // string | filter by dataSource (optional)
var firstProdDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by firstProdDate - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example firstProdDate[gt]=2018-01-01 (optional)
var inptID = "inptID_example"; // string | filter by inptID (optional)
var state = new string[] { "state_example" }; // IEnumerable<string> | filter by state (optional)
var wellName = new string[] { "wellName_example" }; // IEnumerable<string> | filter by wellName (optional)
try
{
// Returns metadata about the wells assigned to the given type curve.
apiInstance.HeadV2TypeCurveWells(projectId, id, skip, take, excluded, api10, api12, api14, chosenID, county, currentOperator, dataSource, firstProdDate, inptID, state, wellName);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.HeadV2TypeCurveWells: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | 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 1000] |
| excluded | bool? | Narrows to the excluded wells (`true`) or to the wells actually being fitted (`false`). Omit it to return every assigned well. | [optional] |
| api10 | string | filter by api10 | [optional] |
| api12 | string | filter by api12 | [optional] |
| api14 | string | filter by api14 | [optional] |
| chosenID | string | filter by chosenID | [optional] |
| county | string | filter by county | [optional] |
| currentOperator | string | filter by currentOperator | [optional] |
| dataSource | string | filter by dataSource | [optional] |
| firstProdDate | DateTimeOffset? | filter by firstProdDate - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example firstProdDate[gt]=2018-01-01 | [optional] |
| inptID | string | filter by inptID | [optional] |
| state | string | filter by state | [optional] |
| wellName | string | filter by wellName | [optional] |
void (empty response body)
API Key, Service Account
| 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. | - |
| 401 | Unauthorized. Invalid or missing authentication. | - |
| 403 | Forbidden. Insufficient permissions to access the resource. | - |
| 404 | Not Found. The project or the type curve does not exist, or the type curve belongs to a different project. Those cases are deliberately indistinguishable. | - |
| 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - |
| 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadV2TypeCurves (string projectId, int? skip = null, int? take = null, string name = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)
Returns metadata about the existing type curve documents scoped to projectId project.
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 HeadV2TypeCurvesExample
{
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 TypeCurvesV2Api(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 200)
var name = "name_example"; // string | filter by name (optional)
var createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z (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 type curve documents scoped to projectId project.
apiInstance.HeadV2TypeCurves(projectId, skip, take, name, createdAt, updatedAt);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.HeadV2TypeCurves: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| 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 200] |
| name | string | filter by name | [optional] |
| createdAt | DateTimeOffset? | filter by createdAt - Operator values are [lt] = less than, [le] = less than or equal, [gt] = greater than, [ge] = greater than or equal, no operator = equal. Example createdAt[gt]=2018-01-01T00:00:00Z | [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] |
void (empty response body)
API Key, Service Account
| 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. | - |
| 401 | Unauthorized. Invalid or missing authentication. | - |
| 403 | Forbidden. Insufficient permissions to access the resource. | - |
| 404 | Not Found. The project does not exist in this tenant. | - |
| 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - |
| 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2 PatchV2TypeCurve (string projectId, string id, TypeCurveV2UpdateInput typeCurve)
Updates the type curve document that matches the given id in projectId project and returns it as stored. PATCH leaves omitted fields exactly as they were. The path names the type curve, so the body needs no id; one that matches the path is accepted, which lets a GET body be sent back, and one that names a different type curve is a 400. To update several in one request, use the batch route.
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 PatchV2TypeCurveExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var typeCurve = new TypeCurveV2UpdateInput(); // TypeCurveV2UpdateInput |
try
{
// Updates the type curve document that matches the given id in projectId project and returns it as stored. PATCH leaves omitted fields exactly as they were. The path names the type curve, so the body needs no id; one that matches the path is accepted, which lets a GET body be sent back, and one that names a different type curve is a 400. To update several in one request, use the batch route.
TypeCurveV2 result = apiInstance.PatchV2TypeCurve(projectId, id, typeCurve);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.PatchV2TypeCurve: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| typeCurve | TypeCurveV2UpdateInput |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK. The body is the stored type curve, read back after the write. | - | | 400 | Bad Request. The payload fails validation, the merged type curve would break a forecast or wells rule, or the body is an array (send arrays to the batch route). | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project does not exist in this tenant, or the type curve does not exist in it. A type curve in a different project is deliberately indistinguishable from one that does not exist. | - | | 409 | Conflict. The new name is already used by another type curve in the project. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2MultiStatusResponse PatchV2TypeCurvesBatch (string projectId, List
typeCurves)
Updates one or more type curve documents in projectId project, each identified by its own id. A single object is accepted as a one-element batch. PATCH leaves omitted fields exactly as they were. Records are matched by id rather than by name, so renaming a type curve updates it instead of creating a duplicate.
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 PatchV2TypeCurvesBatchExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var typeCurves = new List<TypeCurveV2PatchInput>(); // List<TypeCurveV2PatchInput> |
try
{
// Updates one or more type curve documents in projectId project, each identified by its own `id`. A single object is accepted as a one-element batch. PATCH leaves omitted fields exactly as they were. Records are matched by `id` rather than by name, so renaming a type curve updates it instead of creating a duplicate.
TypeCurveV2MultiStatusResponse result = apiInstance.PatchV2TypeCurvesBatch(projectId, typeCurves);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.PatchV2TypeCurvesBatch: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| typeCurves | List<TypeCurveV2PatchInput> | [Max number of items is 100] |
TypeCurveV2MultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status. Every record is reported individually; an `id` that does not exist in this project appears here as a per-record 404 rather than as the response status. | - | | 400 | Bad Request. The request as a whole is malformed. A record that fails validation on its own is reported inside the 207 instead. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project does not exist in this tenant. | - | | 422 | Unprocessable Entity. The payload is well-formed but describes an impossible type curve. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2 PostV2TypeCurve (string projectId, TypeCurveV2Input typeCurve)
Creates a single type curve document in projectId project and returns it as stored. To create several in one request, use the batch route. For fits you must create the type curve here, then write its fits through the fits sub-resource.
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 PostV2TypeCurveExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var typeCurve = new TypeCurveV2Input(); // TypeCurveV2Input |
try
{
// Creates a single type curve document in projectId project and returns it as stored. To create several in one request, use the batch route. For fits you must create the type curve here, then write its fits through the fits sub-resource.
TypeCurveV2 result = apiInstance.PostV2TypeCurve(projectId, typeCurve);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.PostV2TypeCurve: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| typeCurve | TypeCurveV2Input |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 201 | Created. The body is the stored type curve, read back after the write. | - | | 400 | Bad Request. The payload fails validation, or the body is an array (send arrays to the batch route). | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project does not exist in this tenant. | - | | 409 | Conflict. A type curve with this name already exists in the project. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2MultiStatusResponse PostV2TypeCurvesBatch (string projectId, List
typeCurves)
Creates one or more type curve documents in projectId project. A single object is accepted as a one-element batch. For fits you must create the type curve here, then write its fits through the fits sub-resource.
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 PostV2TypeCurvesBatchExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var typeCurves = new List<TypeCurveV2Input>(); // List<TypeCurveV2Input> |
try
{
// Creates one or more type curve documents in projectId project. A single object is accepted as a one-element batch. For fits you must create the type curve here, then write its fits through the fits sub-resource.
TypeCurveV2MultiStatusResponse result = apiInstance.PostV2TypeCurvesBatch(projectId, typeCurves);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.PostV2TypeCurvesBatch: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| typeCurves | List<TypeCurveV2Input> | [Max number of items is 100] |
TypeCurveV2MultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status. Every record is reported individually; check each entry's `code` rather than the response status. | - | | 400 | Bad Request. The request as a whole is malformed. A record that fails validation on its own is reported inside the 207 instead. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project does not exist in this tenant. | - | | 422 | Unprocessable Entity. The payload is well-formed but describes an impossible type curve. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2Fits PutV2TypeCurveFits (string projectId, string id, TypeCurveV2FitsInput fits)
Replaces the type curve’s fits with the body. Phases in the body are created or replaced, and any stored phase absent from the body is deleted. To change one phase and keep the others, send the others unchanged — a GET body is a valid payload. Within a phase the write is also a replacement: a phase switched from rate to ratio does not keep its old series. The body is the GET response shape, so a GET body is a valid payload verbatim — updatedAt is accepted and ignored. Segments are validated against the shared forecast-segment rules, including segment-to-segment continuity, and the response returns them in full form read back from storage, so the derived fields a payload did not carry (qEnd, diEffSec, slope, and the switch fields on arps_modified) come back computed. Unknown fields are rejected with a 400 naming them rather than ignored. Validation is all-or-nothing: a failure anywhere in the body is one 400 and nothing is written. There is no partially applied write and no multi-status envelope, because the body is an object keyed by phase rather than a list of records.
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 PutV2TypeCurveFitsExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var fits = new TypeCurveV2FitsInput(); // TypeCurveV2FitsInput | The complete set of fits, keyed by phase. At least one of `oil`, `gas` or `water` is required.
try
{
// Replaces the type curve's fits with the body. Phases in the body are created or replaced, and any stored phase absent from the body is **deleted**. To change one phase and keep the others, send the others unchanged — a `GET` body is a valid payload. Within a phase the write is also a replacement: a phase switched from `rate` to `ratio` does not keep its old series. The body is the `GET` response shape, so a `GET` body is a valid payload verbatim — `updatedAt` is accepted and ignored. Segments are validated against the shared forecast-segment rules, including segment-to-segment continuity, and the response returns them in full form read back from storage, so the derived fields a payload did not carry (`qEnd`, `diEffSec`, `slope`, and the switch fields on `arps_modified`) come back computed. Unknown fields are rejected with a `400` naming them rather than ignored. Validation is all-or-nothing: a failure anywhere in the body is one `400` and nothing is written. There is no partially applied write and no multi-status envelope, because the body is an object keyed by phase rather than a list of records.
TypeCurveV2Fits result = apiInstance.PutV2TypeCurveFits(projectId, id, fits);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.PutV2TypeCurveFits: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| fits | TypeCurveV2FitsInput | The complete set of fits, keyed by phase. At least one of `oil`, `gas` or `water` is required. |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK. The type curve's stored fits after the write, read back — identical to what a following `GET` returns. | - | | 400 | Bad Request. There is something wrong with the request data. Nothing was written. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project or the type curve does not exist, or the type curve belongs to a different project. Those cases are deliberately indistinguishable. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeCurveV2Normalization PutV2TypeCurveNormalization (string projectId, string id, TypeCurveV2NormalizationInput normalization)
Writes the normalization configuration for the given type curve, replacing any existing configuration. To set up a new type curve with normalization, create it with POST /v2/projects/{projectId}/type-curves, then call this endpoint. All three phases are required, which is where this differs from PUT /{id}/fits. That endpoint can write one phase and leave the others unchanged; this one replaces the whole configuration. Send the full configuration, in the shape GET returns. xAxis is the only field that cannot always be sent back as GET returns it. When customBasisKey is set, GET returns the basis’s composite ratio as xAxis, and sending that ratio back is a 400. Omit xAxis when customBasisKey is set; otherwise xAxis is required. customBasisKey cannot be combined with yAxis: eur_and_peak. A basis normalizes a single factor, so the second factor would be ignored. Segment xStart values must increase strictly from one segment to the next. A segment ends where the next one begins, so an out-of-order or repeated value describes a segment that covers no x values. Validation is all-or-nothing: any error in the body returns one 400, and nothing is written. This endpoint writes the configuration only. It does not recompute the per-well normalization multipliers.
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 PutV2TypeCurveNormalizationExample
{
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 TypeCurvesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var normalization = new TypeCurveV2NormalizationInput(); // TypeCurveV2NormalizationInput | The normalization configuration to write. All three of `oil`, `gas` and `water` are required.
try
{
// Writes the normalization configuration for the given type curve, replacing any existing configuration. To set up a new type curve with normalization, create it with `POST /v2/projects/{projectId}/type-curves`, then call this endpoint. **All three phases are required**, which is where this differs from `PUT /{id}/fits`. That endpoint can write one phase and leave the others unchanged; this one replaces the whole configuration. Send the full configuration, in the shape `GET` returns. `xAxis` is the only field that cannot always be sent back as `GET` returns it. When `customBasisKey` is set, `GET` returns the basis's composite ratio as `xAxis`, and sending that ratio back is a 400. **Omit `xAxis` when `customBasisKey` is set**; otherwise `xAxis` is required. `customBasisKey` cannot be combined with `yAxis: eur_and_peak`. A basis normalizes a single factor, so the second factor would be ignored. Segment `xStart` values must increase strictly from one segment to the next. A segment ends where the next one begins, so an out-of-order or repeated value describes a segment that covers no x values. Validation is all-or-nothing: any error in the body returns one `400`, and nothing is written. This endpoint writes the configuration only. It does not recompute the per-well normalization multipliers.
TypeCurveV2Normalization result = apiInstance.PutV2TypeCurveNormalization(projectId, id, normalization);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurvesV2Api.PutV2TypeCurveNormalization: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| normalization | TypeCurveV2NormalizationInput | The normalization configuration to write. All three of `oil`, `gas` and `water` are required. |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK. The saved configuration, exactly as a following `GET` returns it. When `customBasisKey` is set, `xAxis` comes back as the basis's composite ratio. | - | | 400 | Bad Request. There is something wrong with the request data. Nothing was written. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The project or the type curve does not exist, or the type curve belongs to a different project. Those cases are deliberately indistinguishable. | - | | 429 | Too Many Requests. The per-tenant request rate limit was exceeded. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]