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 |
|---|---|---|
| DeleteV2TypeCurveLookupTableById | DELETE /v2/projects/{projectId}/type-curves/lookup-tables/{id} | Deletes the type curve lookup table document that matches the given id scoped to projectId project. |
| GetV2TypeCurveLookupTableById | GET /v2/projects/{projectId}/type-curves/lookup-tables/{id} | Returns the type curve lookup table document that matches the given id scoped to projectId project. |
| GetV2TypeCurveLookupTables | GET /v2/projects/{projectId}/type-curves/lookup-tables | Returns a list of type curve lookup table documents scoped to projectId project. Rules reference type curves in the V2 collection; see the Type Curve 2.0 migration guide for the per-field changes from V1. |
| HeadV2TypeCurveLookupTables | HEAD /v2/projects/{projectId}/type-curves/lookup-tables | Returns metadata about the existing type curve lookup table documents scoped to projectId project. |
| PostV2TypeCurveLookupTable | POST /v2/projects/{projectId}/type-curves/lookup-tables | Creates a single type curve lookup table document in projectId project and returns it as stored. To create several in one request, use the batch route. |
| PostV2TypeCurveLookupTablesBatch | POST /v2/projects/{projectId}/type-curves/lookup-tables/batch | Inserts one or more type curve lookup table documents. A single object is accepted as a one-element batch. Create-only — a name already in use in the project fails that record rather than replacing it. |
| PutV2TypeCurveLookupTableById | PUT /v2/projects/{projectId}/type-curves/lookup-tables/{id} | Replaces the name, settings and rules of the type curve lookup table that matches the given id scoped to projectId project, and returns it as stored. Never creates. The table may be renamed as long as no other table in the project uses the new name. A body `id` is optional and must match the path. |
| PutV2TypeCurveLookupTablesBatch | PUT /v2/projects/{projectId}/type-curves/lookup-tables/batch | Replaces or creates one or more type curve lookup table documents, matched by name within the project. A single object is accepted as a one-element batch. A replaced document keeps its id. To replace one table by id, use `PUT /{id}` instead. |
void DeleteV2TypeCurveLookupTableById (string projectId, string id)
Deletes the type curve lookup table 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 DeleteV2TypeCurveLookupTableByIdExample
{
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 TypeCurveLookupTablesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Deletes the type curve lookup table document that matches the given id scoped to projectId project.
apiInstance.DeleteV2TypeCurveLookupTableById(projectId, id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.DeleteV2TypeCurveLookupTableById: " + 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 | * X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. 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]
TypeCurveLookupTableV2 GetV2TypeCurveLookupTableById (string projectId, string id)
Returns the type curve lookup table 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 GetV2TypeCurveLookupTableByIdExample
{
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 TypeCurveLookupTablesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Returns the type curve lookup table document that matches the given id scoped to projectId project.
TypeCurveLookupTableV2 result = apiInstance.GetV2TypeCurveLookupTableById(projectId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.GetV2TypeCurveLookupTableById: " + 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 lookup table does not exist, belongs to a different project, or is a V1 lookup table. The three 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<TypeCurveLookupTableV2> GetV2TypeCurveLookupTables (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 lookup table documents scoped to projectId project. Rules reference type curves in the V2 collection; see the Type Curve 2.0 migration guide for the per-field changes from V1.
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 GetV2TypeCurveLookupTablesExample
{
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 TypeCurveLookupTablesV2Api(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 lookup table documents scoped to projectId project. Rules reference type curves in the V2 collection; see the Type Curve 2.0 migration guide for the per-field changes from V1.
ICollection<TypeCurveLookupTableV2> result = apiInstance.GetV2TypeCurveLookupTables(projectId, skip, take, sort, cursor, name, createdAt, updatedAt);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.GetV2TypeCurveLookupTables: " + 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] |
ICollection<TypeCurveLookupTableV2>
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 HeadV2TypeCurveLookupTables (string projectId, int? skip = null, int? take = null, string name = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null)
Returns metadata about the existing type curve lookup table 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 HeadV2TypeCurveLookupTablesExample
{
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 TypeCurveLookupTablesV2Api(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 lookup table documents scoped to projectId project.
apiInstance.HeadV2TypeCurveLookupTables(projectId, skip, take, name, createdAt, updatedAt);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.HeadV2TypeCurveLookupTables: " + 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]
TypeCurveLookupTableV2 PostV2TypeCurveLookupTable (string projectId, TypeCurveLookupTableV2Input typeCurveLookupTable)
Creates a single type curve lookup table document in projectId project and returns it as stored. To create 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 PostV2TypeCurveLookupTableExample
{
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 TypeCurveLookupTablesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var typeCurveLookupTable = new TypeCurveLookupTableV2Input(); // TypeCurveLookupTableV2Input |
try
{
// Creates a single type curve lookup table document in projectId project and returns it as stored. To create several in one request, use the batch route.
TypeCurveLookupTableV2 result = apiInstance.PostV2TypeCurveLookupTable(projectId, typeCurveLookupTable);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.PostV2TypeCurveLookupTable: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| typeCurveLookupTable | TypeCurveLookupTableV2Input |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 201 | Created. The body is the stored lookup table, 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, or a rule's `typeCurve` does not exist in the project. | - | | 409 | Conflict. A type curve lookup table 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]
TypeCurveLookupTableV2MultiStatusResponse PostV2TypeCurveLookupTablesBatch (string projectId, List
typeCurveLookupTables)
Inserts one or more type curve lookup table documents. A single object is accepted as a one-element batch. Create-only — a name already in use in the project fails that record rather than replacing it.
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 PostV2TypeCurveLookupTablesBatchExample
{
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 TypeCurveLookupTablesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var typeCurveLookupTables = new List<TypeCurveLookupTableV2Input>(); // List<TypeCurveLookupTableV2Input> |
try
{
// Inserts one or more type curve lookup table documents. A single object is accepted as a one-element batch. Create-only — a name already in use in the project fails that record rather than replacing it.
TypeCurveLookupTableV2MultiStatusResponse result = apiInstance.PostV2TypeCurveLookupTablesBatch(projectId, typeCurveLookupTables);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.PostV2TypeCurveLookupTablesBatch: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| typeCurveLookupTables | List<TypeCurveLookupTableV2Input> | [Max number of items is 500] |
TypeCurveLookupTableV2MultiStatusResponse
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. A name collision is a per-record 409 and an unknown `typeCurve` a per-record 404. | - | | 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. | - | | 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]
TypeCurveLookupTableV2 PutV2TypeCurveLookupTableById (string projectId, string id, TypeCurveLookupTableV2Input typeCurveLookupTable)
Replaces the name, settings and rules of the type curve lookup table that matches the given id scoped to projectId project, and returns it as stored. Never creates. The table may be renamed as long as no other table in the project uses the new name. A body id is optional and must match the path.
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 PutV2TypeCurveLookupTableByIdExample
{
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 TypeCurveLookupTablesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var typeCurveLookupTable = new TypeCurveLookupTableV2Input(); // TypeCurveLookupTableV2Input |
try
{
// Replaces the name, settings and rules of the type curve lookup table that matches the given id scoped to projectId project, and returns it as stored. Never creates. The table may be renamed as long as no other table in the project uses the new name. A body `id` is optional and must match the path.
TypeCurveLookupTableV2 result = apiInstance.PutV2TypeCurveLookupTableById(projectId, id, typeCurveLookupTable);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.PutV2TypeCurveLookupTableById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| typeCurveLookupTable | TypeCurveLookupTableV2Input |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK. The body is the stored lookup table, read back after the write. | - | | 400 | Bad Request. The payload fails validation, the body is an array (send arrays to the batch route), or a body `id` does not match the path. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. The lookup table does not exist, belongs to a different project, or is a V1 lookup table; or a rule's `typeCurve` does not exist in the project. | - | | 409 | Conflict. Another type curve lookup table in the project already uses this name. | - | | 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]
TypeCurveLookupTableV2MultiStatusResponse PutV2TypeCurveLookupTablesBatch (string projectId, List
typeCurveLookupTables)
Replaces or creates one or more type curve lookup table documents, matched by name within the project. A single object is accepted as a one-element batch. A replaced document keeps its id. To replace one table by id, use PUT /{id} instead.
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 PutV2TypeCurveLookupTablesBatchExample
{
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 TypeCurveLookupTablesV2Api(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var typeCurveLookupTables = new List<TypeCurveLookupTableV2Input>(); // List<TypeCurveLookupTableV2Input> |
try
{
// Replaces or creates one or more type curve lookup table documents, matched by name within the project. A single object is accepted as a one-element batch. A replaced document keeps its id. To replace one table by id, use `PUT /{id}` instead.
TypeCurveLookupTableV2MultiStatusResponse result = apiInstance.PutV2TypeCurveLookupTablesBatch(projectId, typeCurveLookupTables);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TypeCurveLookupTablesV2Api.PutV2TypeCurveLookupTablesBatch: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| typeCurveLookupTables | List<TypeCurveLookupTableV2Input> | [Max number of items is 500] |
TypeCurveLookupTableV2MultiStatusResponse
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. | - | | 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]