combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

View the Project on GitHub insidepetroleum/combocurve-client-csharp

ComboCurve.Api.Api.ProjectFormationsApi

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.

DeleteProjectFormationById

void DeleteProjectFormationById (string projectId, string id)

Deletes one of this project’s formations. Does not cascade.

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]

GetHeadProjectFormations

void GetHeadProjectFormations (string projectId, int? skip = null, int? take = null, string name = null)

Same as HEAD /v1/projects/{projectId}/formations.

Example

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 (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);
            }
        }
    }
}

Parameters

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   [optional]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]

GetProjectFormationById

Formation GetProjectFormationById (string projectId, string id)

Returns one of this project’s formations.

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    

Return type

Formation

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 404 | Not Found. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetProjectFormationPoints

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.

Example

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 (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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
id string    
skip int? number of items to skip [optional] [default to 0]
take int? max points to return [optional] [default to 10000] [between 1 and 10000]

Return type

ICollection<FormationPoint>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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. | | 404 | Not Found. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetProjectFormations

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.

Example

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 (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);
            }
        }
    }
}

Parameters

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 exact name. [optional]

Return type

ICollection<Formation>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetProjectFormationsJob

FormationImportJob GetProjectFormationsJob (string projectId, string jobId)

Returns the status of a formations import into this project.

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
jobId string    

Return type

FormationImportJob

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 404 | Not Found. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

HeadProjectFormations

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.

Example

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 (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);
            }
        }
    }
}

Parameters

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 exact name. [optional]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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. | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PatchProjectFormations

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.

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
formations List<FormationPatchInput>   [Max number of items is 200]

Return type

FormationMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]

PutProjectFormations

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.

Example

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);
            }
        }
    }
}

Parameters

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"]

Return type

FormationJobAccepted

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| 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]