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 |
|---|---|---|
| DeleteProjectScenarioFacilityNetworkWellGroupById | DELETE /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups/{wellGroupId} | Deletes the well group, its edges, and its member list (the wells themselves stay). The request is refused with 400 when the network that remains is not valid. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it. |
| GetProjectScenarioFacilityNetworkWellGroups | GET /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups | Returns the network's well groups, ordered by name. The `id` addresses a group in the other well-group endpoints; `updatedAt` moves when the group's members or settings change, so a client can pull only what changed. A group lists its member count, never its wells. |
| HeadProjectScenarioFacilityNetworkWellGroups | HEAD /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups | Returns the number of the network's well groups in `X-Query-Count`, without a body. |
| PatchProjectScenarioFacilityNetworkWellGroupById | PATCH /v1/projects/{projectId}/scenarios/{scenarioId}/facility-networks/{networkId}/well-groups/{wellGroupId} | Changes a well group's name, description or stream distribution. This is the only way to rename a group: a network update matches groups by name. The name must stay non-blank and unique within the network. The group's wells are not touched. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it. |
void DeleteProjectScenarioFacilityNetworkWellGroupById (string projectId, string scenarioId, string networkId, string wellGroupId)
Deletes the well group, its edges, and its member list (the wells themselves stay). The request is refused with 400 when the network that remains is not valid. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces 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 DeleteProjectScenarioFacilityNetworkWellGroupByIdExample
{
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 ProjectScenarioFacilityNetworkWellGroupsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var networkId = "networkId_example"; // string |
var wellGroupId = "wellGroupId_example"; // string | The well group's id, as listed by the well-groups endpoint.
try
{
// Deletes the well group, its edges, and its member list (the wells themselves stay). The request is refused with 400 when the network that remains is not valid. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.
apiInstance.DeleteProjectScenarioFacilityNetworkWellGroupById(projectId, scenarioId, networkId, wellGroupId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupsApi.DeleteProjectScenarioFacilityNetworkWellGroupById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| networkId | string | ||
| wellGroupId | string | The well group's id, as listed by the well-groups endpoint. |
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. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project, scenario, network or well group does not exist. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<FacilityNetworkWellGroupRead> GetProjectScenarioFacilityNetworkWellGroups (string projectId, string scenarioId, string networkId, int? skip = null, int? take = null, string name = null, DateTimeOffset? updatedAt = null)
Returns the network’s well groups, ordered by name. The id addresses a group in the other well-group endpoints; updatedAt moves when the group’s members or settings change, so a client can pull only what changed. A group lists its member count, never its wells.
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 GetProjectScenarioFacilityNetworkWellGroupsExample
{
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 ProjectScenarioFacilityNetworkWellGroupsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var networkId = "networkId_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 name = new string[] { "name_example" }; // IEnumerable<string> | filter by name (optional)
var updatedAt = 2013-10-20T19:20:30+01:00; // DateTimeOffset? | Filter by when the group's members or settings last changed, with the gt, ge, lt and le operators. (optional)
try
{
// Returns the network's well groups, ordered by name. The `id` addresses a group in the other well-group endpoints; `updatedAt` moves when the group's members or settings change, so a client can pull only what changed. A group lists its member count, never its wells.
ICollection<FacilityNetworkWellGroupRead> result = apiInstance.GetProjectScenarioFacilityNetworkWellGroups(projectId, scenarioId, networkId, skip, take, name, updatedAt);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupsApi.GetProjectScenarioFacilityNetworkWellGroups: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| networkId | 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] |
| name | string | filter by name | [optional] |
| updatedAt | DateTimeOffset? | Filter by when the group's members or settings last changed, with the gt, ge, lt and le operators. | [optional] |
ICollection<FacilityNetworkWellGroupRead>
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. | - |
| 403 | Forbidden. Facility networks are not enabled for the company. | - |
| 404 | Not Found. The project, scenario, network or well group does not exist. | - |
| 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - |
| 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadProjectScenarioFacilityNetworkWellGroups (string projectId, string scenarioId, string networkId, int? skip = null, int? take = null, string name = null, DateTimeOffset? updatedAt = null)
Returns the number of the network’s well groups in X-Query-Count, without a 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 HeadProjectScenarioFacilityNetworkWellGroupsExample
{
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 ProjectScenarioFacilityNetworkWellGroupsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var networkId = "networkId_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 name = new string[] { "name_example" }; // IEnumerable<string> | filter by name (optional)
var updatedAt = 2013-10-20T19:20:30+01:00; // DateTimeOffset? | Filter by when the group's members or settings last changed, with the gt, ge, lt and le operators. (optional)
try
{
// Returns the number of the network's well groups in `X-Query-Count`, without a body.
apiInstance.HeadProjectScenarioFacilityNetworkWellGroups(projectId, scenarioId, networkId, skip, take, name, updatedAt);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupsApi.HeadProjectScenarioFacilityNetworkWellGroups: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| networkId | 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] |
| name | string | filter by name | [optional] |
| updatedAt | DateTimeOffset? | Filter by when the group's members or settings last changed, with the gt, ge, lt and le operators. | [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. | - |
| 403 | Forbidden. Facility networks are not enabled for the company. | - |
| 404 | Not Found. The project, scenario, network or well group does not exist. | - |
| 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FacilityNetworkWellGroupRead PatchProjectScenarioFacilityNetworkWellGroupById (string projectId, string scenarioId, string networkId, string wellGroupId, FacilityNetworkWellGroupPatch wellGroup = null)
Changes a well group’s name, description or stream distribution. This is the only way to rename a group: a network update matches groups by name. The name must stay non-blank and unique within the network. The group’s wells are not touched. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces 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 PatchProjectScenarioFacilityNetworkWellGroupByIdExample
{
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 ProjectScenarioFacilityNetworkWellGroupsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var scenarioId = "scenarioId_example"; // string |
var networkId = "networkId_example"; // string |
var wellGroupId = "wellGroupId_example"; // string | The well group's id, as listed by the well-groups endpoint.
var wellGroup = new FacilityNetworkWellGroupPatch(); // FacilityNetworkWellGroupPatch | The fields to change. (optional)
try
{
// Changes a well group's name, description or stream distribution. This is the only way to rename a group: a network update matches groups by name. The name must stay non-blank and unique within the network. The group's wells are not touched. Integrations and the canvas can overlap: a change made here is not checked against the version a user has open, and a save from an open canvas replaces it.
FacilityNetworkWellGroupRead result = apiInstance.PatchProjectScenarioFacilityNetworkWellGroupById(projectId, scenarioId, networkId, wellGroupId, wellGroup);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectScenarioFacilityNetworkWellGroupsApi.PatchProjectScenarioFacilityNetworkWellGroupById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| scenarioId | string | ||
| networkId | string | ||
| wellGroupId | string | The well group's id, as listed by the well-groups endpoint. | |
| wellGroup | FacilityNetworkWellGroupPatch | The fields to change. | [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. Facility networks are not enabled for the company. | - | | 404 | Not Found. The project, scenario, network or well group does not exist. | - | | 429 | Too Many Requests. The read or write request rate limit for the project was exceeded. Wait and retry. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]