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 |
|---|---|---|
| DeleteProjectFormationById | DELETE /v1/projects/{projectId}/formations/{id} | Deletes one of this project's formations. Does not cascade. |
| GetHeadProjectFormations | GET /v1/projects/{projectId}/formations/head | Same as `HEAD /v1/projects/{projectId}/formations`. |
| GetProjectFormationById | GET /v1/projects/{projectId}/formations/{id} | Returns one of this project's formations. |
| GetProjectFormationPoints | GET /v1/projects/{projectId}/formations/{id}/points | Returns one page of one of this project's formation points. See `GET /v1/formations/{id}/points`. |
| GetProjectFormations | GET /v1/projects/{projectId}/formations | Returns the summaries of this project's formations. Company formations are not included; read them from `GET /v1/formations?scope=company`. |
| GetProjectFormationsJob | GET /v1/projects/{projectId}/formations/jobs/{jobId} | Returns the status of a formations import into this project. |
| HeadProjectFormations | HEAD /v1/projects/{projectId}/formations | Returns the number of the project's formations in `X-Query-Count`, without a body. |
| PatchProjectFormations | PATCH /v1/projects/{projectId}/formations | Updates the metadata of this project's formations. Same fields and rules as `PATCH /v1/formations`; a formation outside the project returns 404 in its result. |
| PutProjectFormations | PUT /v1/projects/{projectId}/formations | Creates or replaces this project's formations by name, asynchronously. Same behaviour as `PUT /v1/formations`, in the project's scope. Overlaps are resolved against this project's formations only, not company ones. `PUT` does not set `enabled`, `maxDepth` or `maxThickness`; use `PATCH` once the job has succeeded. |
void DeleteProjectFormationById (string projectId, string id)
Deletes one of this project’s formations. Does not cascade.
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 DeleteProjectFormationByIdExample
{
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 ProjectFormationsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Deletes one of this project's formations. Does not cascade.
apiInstance.DeleteProjectFormationById(projectId, id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.DeleteProjectFormationById: " + 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 | Deleted. | * X-Delete-Count - The number of records that were deleted. | | 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void GetHeadProjectFormations (string projectId, int? skip = null, int? take = null, string name = null)
Same as HEAD /v1/projects/{projectId}/formations.
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 GetHeadProjectFormationsExample
{
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 ProjectFormationsApi(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 name = "name_example"; // string | (optional)
try
{
// Same as `HEAD /v1/projects/{projectId}/formations`.
apiInstance.GetHeadProjectFormations(projectId, skip, take, name);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.GetHeadProjectFormations: " + 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] |
| name | string | [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. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Formation GetProjectFormationById (string projectId, string id)
Returns one of this project’s formations.
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 GetProjectFormationByIdExample
{
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 ProjectFormationsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Returns one of this project's formations.
Formation result = apiInstance.GetProjectFormationById(projectId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.GetProjectFormationById: " + 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 | - | | 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<FormationPoint> GetProjectFormationPoints (string projectId, string id, int? skip = null, int? take = null)
Returns one page of one of this project’s formation points. See GET /v1/formations/{id}/points.
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 GetProjectFormationPointsExample
{
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 ProjectFormationsApi(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 points to return (optional) (default to 10000) (between 1 and 10000)
try
{
// Returns one page of one of this project's formation points. See `GET /v1/formations/{id}/points`.
ICollection<FormationPoint> result = apiInstance.GetProjectFormationPoints(projectId, id, skip, take);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.GetProjectFormationPoints: " + 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 points to return | [optional] [default to 10000] [between 1 and 10000] |
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. |
| 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<Formation> GetProjectFormations (string projectId, int? skip = null, int? take = null, string name = null)
Returns the summaries of this project’s formations. Company formations are not included; read them from GET /v1/formations?scope=company.
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 GetProjectFormationsExample
{
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 ProjectFormationsApi(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 name = "name_example"; // string | Filter by exact name. (optional)
try
{
// Returns the summaries of this project's formations. Company formations are not included; read them from `GET /v1/formations?scope=company`.
ICollection<Formation> result = apiInstance.GetProjectFormations(projectId, skip, take, name);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.GetProjectFormations: " + 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] |
| name | string | Filter by exact name. | [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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormationImportJob GetProjectFormationsJob (string projectId, string jobId)
Returns the status of a formations import into this 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 GetProjectFormationsJobExample
{
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 ProjectFormationsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var jobId = "jobId_example"; // string |
try
{
// Returns the status of a formations import into this project.
FormationImportJob result = apiInstance.GetProjectFormationsJob(projectId, jobId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.GetProjectFormationsJob: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| jobId | string |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadProjectFormations (string projectId, int? skip = null, int? take = null, string name = null)
Returns the number of the project’s formations 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 HeadProjectFormationsExample
{
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 ProjectFormationsApi(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 name = "name_example"; // string | Filter by exact name. (optional)
try
{
// Returns the number of the project's formations in `X-Query-Count`, without a body.
apiInstance.HeadProjectFormations(projectId, skip, take, name);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.HeadProjectFormations: " + 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] |
| name | string | Filter by exact name. | [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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormationMultiStatusResponse PatchProjectFormations (string projectId, List
formations)
Updates the metadata of this project’s formations. Same fields and rules as PATCH /v1/formations; a formation outside the project returns 404 in its result.
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 PatchProjectFormationsExample
{
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 ProjectFormationsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var formations = new List<FormationPatchInput>(); // List<FormationPatchInput> |
try
{
// Updates the metadata of this project's formations. Same fields and rules as `PATCH /v1/formations`; a formation outside the project returns 404 in its result.
FormationMultiStatusResponse result = apiInstance.PatchProjectFormations(projectId, formations);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.PatchProjectFormations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| formations | List<FormationPatchInput> | [Max number of items is 200] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 400 | Bad Request. There is something wrong with the request data. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormationJobAccepted PutProjectFormations (string projectId, List
formations, string overlapHandling = null)
Creates or replaces this project’s formations by name, asynchronously. Same behaviour as PUT /v1/formations, in the project’s scope. Overlaps are resolved against this project’s formations only, not company ones. PUT does not set enabled, maxDepth or maxThickness; use PATCH once the job has succeeded.
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 PutProjectFormationsExample
{
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 ProjectFormationsApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var formations = new List<FormationImportInput>(); // List<FormationImportInput> |
var overlapHandling = "overlapHandling_example"; // string | `trim` or `keep`. See `PUT /v1/formations`. (optional) (default to "trim")
try
{
// Creates or replaces this project's formations by name, asynchronously. Same behaviour as `PUT /v1/formations`, in the project's scope. Overlaps are resolved against this project's formations only, not company ones. `PUT` does not set `enabled`, `maxDepth` or `maxThickness`; use `PATCH` once the job has succeeded.
FormationJobAccepted result = apiInstance.PutProjectFormations(projectId, formations, overlapHandling);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectFormationsApi.PutProjectFormations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| formations | List<FormationImportInput> | [Max number of items is 200] | |
| overlapHandling | string | `trim` or `keep`. See `PUT /v1/formations`. | [optional] [default to "trim"] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 202 | Accepted | - | | 400 | Bad Request. There is something wrong with the request data. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]