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 |
|---|---|---|
| DeleteForecastById | DELETE /v1/projects/{projectId}/forecasts/{id} | Delete the Forecast that matches the given id scoped to projectId project. |
| GetForecastById | GET /v1/projects/{projectId}/forecasts/{id} | Returns the forecast document that matches the given id scoped to projectId project. |
| GetForecastWells | GET /v1/projects/{projectId}/forecasts/{id}/wells | Returns a list of the well documents assigned to the forecast. |
| GetForecasts | GET /v1/projects/{projectId}/forecasts | Returns a list of forecast documents scoped to projectId project. |
| HeadForecastWells | HEAD /v1/projects/{projectId}/forecasts/{id}/wells | Returns metadata about the well documents assigned to the forecast. |
| HeadForecasts | HEAD /v1/projects/{projectId}/forecasts | Returns metadata about the existing forecast documents scoped to projectId project. |
| PatchForecast | PATCH /v1/projects/{projectId}/forecasts/{id} | Renames the forecast. Only `name` can be changed, and the new name must not be used by another forecast of the project. When the forecast cannot be updated the response is `200` with `code: 400` in the body. |
| PostForecasts | POST /v1/projects/{projectId}/forecasts | Inserts a list of forecasts documents in projectId scope. |
| PostWellsToForecast | POST /v1/projects/{projectId}/forecasts/{id}/wells | Inserts a list of well into a forecast. |
void DeleteForecastById (string projectId, string id, bool? deleteTypeCurves = null)
Delete the Forecast 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 DeleteForecastByIdExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var deleteTypeCurves = true; // bool? | deletes all type-curves associated with the forecastId (optional)
try
{
// Delete the Forecast that matches the given id scoped to projectId project.
apiInstance.DeleteForecastById(projectId, id, deleteTypeCurves);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.DeleteForecastById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| deleteTypeCurves | bool? | deletes all type-curves associated with the forecastId | [optional] |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | OK | * X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 404 | Was not found any forecast that matches the given id in the project. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Forecast GetForecastById (string projectId, string id)
Returns the forecast 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 GetForecastByIdExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Returns the forecast document that matches the given id scoped to projectId project.
Forecast result = apiInstance.GetForecastById(projectId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.GetForecastById: " + 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. | - | | 404 | Not Found | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<ProjectWell> GetForecastWells (string projectId, string id, int? skip = null, int? take = null, string sort = null, string cursor = null, string api10 = null, string api12 = null, string county = null, string state = null, string wellName = null, string chosenID = null, string inptID = null, string api14 = null, DateTimeOffset? firstProdDate = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null, string dataSource = null, string currentOperator = null)
Returns a list of the well documents assigned to the forecast.
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 GetForecastWellsExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var skip = 56; // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
var take = 56; // int? | max records to return (optional) (default to 25) (between 1 and 1000)
var sort = "sort_example"; // string | Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. (optional)
var cursor = "cursor_example"; // string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. (optional)
var api10 = new string[] { "api10_example" }; // IEnumerable<string> | filter by api10 (optional)
var api12 = new string[] { "api12_example" }; // IEnumerable<string> | filter by api12 (optional)
var county = new string[] { "county_example" }; // IEnumerable<string> | filter by county (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)
var chosenID = new string[] { "chosenID_example" }; // IEnumerable<string> | filter by chosenID (optional)
var inptID = "inptID_example"; // string | filter by inptID (optional)
var api14 = new string[] { "api14_example" }; // IEnumerable<string> | filter by api14 (optional)
var firstProdDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by firstProdDate (optional)
var createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by createdAt (optional)
var updatedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by updatedAt (optional)
var dataSource = "dataSource_example"; // string | filter by dataSource (optional)
var currentOperator = new string[] { "currentOperator_example" }; // IEnumerable<string> | filter by currentOperator (optional)
try
{
// Returns a list of the well documents assigned to the forecast.
ICollection<ProjectWell> result = apiInstance.GetForecastWells(projectId, id, skip, take, sort, cursor, api10, api12, county, state, wellName, chosenID, inptID, api14, firstProdDate, createdAt, updatedAt, dataSource, currentOperator);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.GetForecastWells: " + 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. Cannot be combined with `cursor`; sending both returns 400. | [optional] [default to 0] |
| take | int? | max records to return | [optional] [default to 25] [between 1 and 1000] |
| sort | string | Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. | [optional] |
| cursor | string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. | [optional] |
| api10 | string | filter by api10 | [optional] |
| api12 | string | filter by api12 | [optional] |
| county | string | filter by county | [optional] |
| state | string | filter by state | [optional] |
| wellName | string | filter by wellName | [optional] |
| chosenID | string | filter by chosenID | [optional] |
| inptID | string | filter by inptID | [optional] |
| api14 | string | filter by api14 | [optional] |
| firstProdDate | DateTimeOffset? | filter by firstProdDate | [optional] |
| createdAt | DateTimeOffset? | filter by createdAt | [optional] |
| updatedAt | DateTimeOffset? | filter by updatedAt | [optional] |
| dataSource | string | filter by dataSource | [optional] |
| currentOperator | string | filter by currentOperator | [optional] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * Link - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<Forecast> GetForecasts (string projectId, int? skip = null, int? take = null, string sort = null, string cursor = null, DateTimeOffset? createdAt = null, string name = null, DateTimeOffset? runDate = null, string type = null, string tag = null, DateTimeOffset? updatedAt = null)
Returns a list of forecast 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 GetForecastsExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var skip = 56; // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
var take = 56; // int? | max records to return (optional) (default to 25) (between 1 and 200)
var sort = "sort_example"; // string | Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. (optional)
var cursor = "cursor_example"; // string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. (optional)
var 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 name = "default1"; // string | filter by name (optional)
var runDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by runDate, can be used for incremental pull (optional)
var type = "probabilistic"; // string | filter by type (optional)
var tag = new string[] { "tagName" }; // IEnumerable<string> | filter by tag (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 forecast documents scoped to projectId project.
ICollection<Forecast> result = apiInstance.GetForecasts(projectId, skip, take, sort, cursor, createdAt, name, runDate, type, tag, updatedAt);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.GetForecasts: " + 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. Cannot be combined with `cursor`; sending both returns 400. | [optional] [default to 0] |
| take | int? | max records to return | [optional] [default to 25] [between 1 and 200] |
| sort | string | Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. | [optional] |
| cursor | string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. | [optional] |
| 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] |
| name | string | filter by name | [optional] |
| runDate | DateTimeOffset? | filter by runDate, can be used for incremental pull | [optional] |
| type | string | filter by type | [optional] |
| tag | string | filter by tag | [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 - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadForecastWells (string projectId, string id, int? skip = null, int? take = null, string api10 = null, string api12 = null, string county = null, string state = null, string wellName = null, string chosenID = null, string inptID = null, string api14 = null, DateTimeOffset? firstProdDate = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null, string dataSource = null, string currentOperator = null)
Returns metadata about the well documents assigned to the forecast.
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 HeadForecastWellsExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var skip = 56; // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
var take = 56; // int? | max records to return (optional) (default to 25) (between 1 and 1000)
var api10 = new string[] { "api10_example" }; // IEnumerable<string> | filter by api10 (optional)
var api12 = new string[] { "api12_example" }; // IEnumerable<string> | filter by api12 (optional)
var county = new string[] { "county_example" }; // IEnumerable<string> | filter by county (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)
var chosenID = new string[] { "chosenID_example" }; // IEnumerable<string> | filter by chosenID (optional)
var inptID = "inptID_example"; // string | filter by inptID (optional)
var api14 = new string[] { "api14_example" }; // IEnumerable<string> | filter by api14 (optional)
var firstProdDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by firstProdDate (optional)
var createdAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by createdAt (optional)
var updatedAt = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by updatedAt (optional)
var dataSource = "dataSource_example"; // string | filter by dataSource (optional)
var currentOperator = new string[] { "currentOperator_example" }; // IEnumerable<string> | filter by currentOperator (optional)
try
{
// Returns metadata about the well documents assigned to the forecast.
apiInstance.HeadForecastWells(projectId, id, skip, take, api10, api12, county, state, wellName, chosenID, inptID, api14, firstProdDate, createdAt, updatedAt, dataSource, currentOperator);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.HeadForecastWells: " + 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. Cannot be combined with `cursor`; sending both returns 400. | [optional] [default to 0] |
| take | int? | max records to return | [optional] [default to 25] [between 1 and 1000] |
| api10 | string | filter by api10 | [optional] |
| api12 | string | filter by api12 | [optional] |
| county | string | filter by county | [optional] |
| state | string | filter by state | [optional] |
| wellName | string | filter by wellName | [optional] |
| chosenID | string | filter by chosenID | [optional] |
| inptID | string | filter by inptID | [optional] |
| api14 | string | filter by api14 | [optional] |
| firstProdDate | DateTimeOffset? | filter by firstProdDate | [optional] |
| createdAt | DateTimeOffset? | filter by createdAt | [optional] |
| updatedAt | DateTimeOffset? | filter by updatedAt | [optional] |
| dataSource | string | filter by dataSource | [optional] |
| currentOperator | string | filter by currentOperator | [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 - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. |
| 400 | Bad Request. There is something wrong with the request data. | - |
| 401 | Unauthorized. Invalid or missing authentication. | - |
| 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - |
| 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadForecasts (string projectId, int? skip = null, int? take = null, DateTimeOffset? createdAt = null, string name = null, DateTimeOffset? runDate = null, string type = null, DateTimeOffset? updatedAt = null)
Returns metadata about the existing forecast 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 HeadForecastsExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var skip = 56; // int? | number of items to skip. Cannot be combined with `cursor`; sending both returns 400. (optional) (default to 0)
var take = 56; // int? | max records to return (optional) (default to 25) (between 1 and 200)
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 name = "f1"; // string | filter by name (optional)
var runDate = DateTimeOffset.Parse("2013-10-20"); // DateTimeOffset? | filter by runDate (optional)
var type = "deterministic"; // string | filter by type (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 forecast documents scoped to projectId project.
apiInstance.HeadForecasts(projectId, skip, take, createdAt, name, runDate, type, updatedAt);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.HeadForecasts: " + 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. Cannot be combined with `cursor`; sending both returns 400. | [optional] [default to 0] |
| take | int? | max records to return | [optional] [default to 25] [between 1 and 200] |
| 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] |
| name | string | filter by name | [optional] |
| runDate | DateTimeOffset? | filter by runDate | [optional] |
| type | string | filter by type | [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 - Pagination links in the RFC 8288 `Link` header: `next` (when more results remain), `prev` (not on the first page) and `first`. `last` is never returned. |
| 400 | Bad Request. There is something wrong with the request data. | - |
| 401 | Unauthorized. Invalid or missing authentication. | - |
| 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ForecastsStatus PatchForecast (string projectId, string id, ForecastPatchInput forecastInput = null)
Renames the forecast. Only name can be changed, and the new name must not be used by another forecast of the project. When the forecast cannot be updated the response is 200 with code: 400 in the body.
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 PatchForecastExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string | The project's id.
var id = "id_example"; // string | The forecast's id.
var forecastInput = new ForecastPatchInput(); // ForecastPatchInput | Forecast information to replace. See ForecastPatchInput. (optional)
try
{
// Renames the forecast. Only `name` can be changed, and the new name must not be used by another forecast of the project. When the forecast cannot be updated the response is `200` with `code: 400` in the body.
ForecastsStatus result = apiInstance.PatchForecast(projectId, id, forecastInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.PatchForecast: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | The project's id. | |
| id | string | The forecast's id. | |
| forecastInput | ForecastPatchInput | Forecast information to replace. See ForecastPatchInput. | [optional] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | Patch Status | - | | 400 | Bad Request. There is something wrong with the request data, or the name is already used by a forecast of the project. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 404 | Was not found any forecast that matches the given id in the project. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ForecastsMultiStatusResponse PostForecasts (string projectId, List
forecastInput = null)
Inserts a list of forecasts documents in projectId scope.
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 PostForecastsExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string | The project's id.
var forecastInput = new List<ForecastInput>(); // List<ForecastInput> | Forecasts to insert. See ForecastInputList. (optional)
try
{
// Inserts a list of forecasts documents in projectId scope.
ForecastsMultiStatusResponse result = apiInstance.PostForecasts(projectId, forecastInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.PostForecasts: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | The project's id. | |
| forecastInput | List<ForecastInput> | Forecasts to insert. See ForecastInputList. | [optional] [Max number of items is 500] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 400 | Bad Request. The request as a whole is not valid, for example the body is not a list or has more records than the request limit. Problems with individual records are reported in the 207 response instead. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WellMultiStatusResponse PostWellsToForecast (string projectId, string id, WellIdInput wellIds)
Inserts a list of well into a forecast.
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 PostWellsToForecastExample
{
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 ForecastsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
var wellIds = new WellIdInput(); // WellIdInput | WellIds documents to insert. See WellInputList.
try
{
// Inserts a list of well into a forecast.
WellMultiStatusResponse result = apiInstance.PostWellsToForecast(projectId, id, wellIds);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ForecastsApi.PostWellsToForecast: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| wellIds | WellIdInput | WellIds documents to insert. See WellInputList. |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 400 | Bad Request. There is something wrong with the request data. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]