combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.FormationsApi

All URIs are relative to https://api.combocurve.com

Method HTTP request Description
DeleteFormationById DELETE /v1/formations/{id} Deletes a company formation. Project formations are deleted from `/v1/projects/{projectId}/formations/{id}`. Does not cascade: inventory plan landing zones that reference the formation keep their reference.
GetFormationById GET /v1/formations/{id} Returns a formation's summary. Its points are at `GET /v1/formations/{id}/points`.
GetFormationPoints GET /v1/formations/{id}/points Returns one page of a formation's points, in stored order, in the shape `PUT` accepts. Collect every page (follow the `next` link) to resend a formation. A formation re-imported while you page can mix old and new points; to check, re-read `GET /v1/formations/{id}` after the last page and compare `updatedAt` and `pointCount`.
GetFormations GET /v1/formations Returns formation summaries for the whole company: company formations and every project's. Each record carries `scope` and `projectId`. Summaries do not include points; read them from `GET /v1/formations/{id}/points`.
GetFormationsJob GET /v1/formations/jobs/{jobId} Returns the status of a formations import started with `PUT`. The result lists the formations imported, what was written, overlaps found, and any rows the import skipped, located in the original request.
GetHeadFormations GET /v1/formations/head Same as `HEAD /v1/formations`, for clients that cannot send HEAD requests.
HeadFormations HEAD /v1/formations Returns the number of formations (all formations in the company: company formations and every project's) in `X-Query-Count`, without a body. Supports the same filters as GET.
PatchFormations PATCH /v1/formations Updates formation metadata: `name`, `color`, `enabled`, `maxDepth` and `maxThickness`. Any formation in the company can be patched by id; its scope cannot be changed. Only the fields present are changed. The body is an array of records with ids (a single record is also accepted), and the response has a result for each record.
PutFormations PUT /v1/formations Creates or replaces company formations by name, asynchronously. The body is an array of formations (a single formation is also accepted). A formation whose name already exists in the company scope has its surfaces replaced; other formations in the scope are left in place, although the import may pull up placeholder bottoms of formations above the new ones (reported as `written.adjusted` on the job). `PUT` does not set `enabled`, `maxDepth` or `maxThickness`: a new formation starts with `enabled: true` and no depth constraints, and a replaced one keeps its values. These fields are left out because the import is shared with the ComboCurve app. To set them, wait for the job to succeed, look up the formation's id with `GET /v1/formations?name=…`, then `PATCH`. The whole request is validated first; problems return 400 with the location of each one and nothing is imported. Returns 202 with a job id to poll at `GET /v1/formations/jobs/{jobId}`.

DeleteFormationById

void DeleteFormationById (string id)

Deletes a company formation. Project formations are deleted from /v1/projects/{projectId}/formations/{id}. Does not cascade: inventory plan landing zones that reference the formation keep their reference.

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 DeleteFormationByIdExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            var id = "id_example";  // string | 

            try
            {
                // Deletes a company formation. Project formations are deleted from `/v1/projects/{projectId}/formations/{id}`. Does not cascade: inventory plan landing zones that reference the formation keep their reference.
                apiInstance.DeleteFormationById(id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.DeleteFormationById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]

GetFormationById

Formation GetFormationById (string id)

Returns a formation’s summary. Its points are at 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 GetFormationByIdExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            var id = "id_example";  // string | 

            try
            {
                // Returns a formation's summary. Its points are at `GET /v1/formations/{id}/points`.
                Formation result = apiInstance.GetFormationById(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.GetFormationById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]

GetFormationPoints

ICollection<FormationPoint> GetFormationPoints (string id, int? skip = null, int? take = null)

Returns one page of a formation’s points, in stored order, in the shape PUT accepts. Collect every page (follow the next link) to resend a formation. A formation re-imported while you page can mix old and new points; to check, re-read GET /v1/formations/{id} after the last page and compare updatedAt and pointCount.

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 GetFormationPointsExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            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 a formation's points, in stored order, in the shape `PUT` accepts. Collect every page (follow the `next` link) to resend a formation. A formation re-imported while you page can mix old and new points; to check, re-read `GET /v1/formations/{id}` after the last page and compare `updatedAt` and `pointCount`.
                ICollection<FormationPoint> result = apiInstance.GetFormationPoints(id, skip, take);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.GetFormationPoints: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]

GetFormations

ICollection<Formation> GetFormations (int? skip = null, int? take = null, string scope = null, string projectId = null, string name = null)

Returns formation summaries for the whole company: company formations and every project’s. Each record carries scope and projectId. Summaries do not include points; read them from 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 GetFormationsExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            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 scope = "scope_example";  // string | `company` or `project`. `project` without `projectId` matches every project formation. (optional)
            var projectId = "projectId_example";  // string | Only formations in this project. Cannot be combined with `scope=company`. (optional)
            var name = "name_example";  // string | Filter by exact name. (optional)

            try
            {
                // Returns formation summaries for the whole company: company formations and every project's. Each record carries `scope` and `projectId`. Summaries do not include points; read them from `GET /v1/formations/{id}/points`.
                ICollection<Formation> result = apiInstance.GetFormations(skip, take, scope, projectId, name);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.GetFormations: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]
scope string `company` or `project`. `project` without `projectId` matches every project formation. [optional]
projectId string Only formations in this project. Cannot be combined with `scope=company`. [optional]
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]

GetFormationsJob

FormationImportJob GetFormationsJob (string jobId)

Returns the status of a formations import started with PUT. The result lists the formations imported, what was written, overlaps found, and any rows the import skipped, located in the original request.

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 GetFormationsJobExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            var jobId = "jobId_example";  // string | 

            try
            {
                // Returns the status of a formations import started with `PUT`. The result lists the formations imported, what was written, overlaps found, and any rows the import skipped, located in the original request.
                FormationImportJob result = apiInstance.GetFormationsJob(jobId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.GetFormationsJob: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]

GetHeadFormations

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

Same as HEAD /v1/formations, for clients that cannot send HEAD requests.

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 GetHeadFormationsExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            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 scope = "scope_example";  // string |  (optional)
            var projectId = "projectId_example";  // string |  (optional)
            var name = "name_example";  // string |  (optional)

            try
            {
                // Same as `HEAD /v1/formations`, for clients that cannot send HEAD requests.
                apiInstance.GetHeadFormations(skip, take, scope, projectId, name);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.GetHeadFormations: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]
scope string   [optional]
projectId string   [optional]
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. | | 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]

HeadFormations

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

Returns the number of formations (all formations in the company: company formations and every project’s) in X-Query-Count, without a body. Supports the same filters as GET.

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 HeadFormationsExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            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 scope = "scope_example";  // string | `company` or `project`. `project` without `projectId` matches every project formation. (optional)
            var projectId = "projectId_example";  // string | Only formations in this project. Cannot be combined with `scope=company`. (optional)
            var name = "name_example";  // string | Filter by exact name. (optional)

            try
            {
                // Returns the number of formations (all formations in the company: company formations and every project's) in `X-Query-Count`, without a body. Supports the same filters as GET.
                apiInstance.HeadFormations(skip, take, scope, projectId, name);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.HeadFormations: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]
scope string `company` or `project`. `project` without `projectId` matches every project formation. [optional]
projectId string Only formations in this project. Cannot be combined with `scope=company`. [optional]
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]

PatchFormations

FormationMultiStatusResponse PatchFormations (List formations)

Updates formation metadata: name, color, enabled, maxDepth and maxThickness. Any formation in the company can be patched by id; its scope cannot be changed. Only the fields present are changed. The body is an array of records with ids (a single record is also accepted), and the response has a result for each record.

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 PatchFormationsExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            var formations = new List<FormationPatchInput>(); // List<FormationPatchInput> | 

            try
            {
                // Updates formation metadata: `name`, `color`, `enabled`, `maxDepth` and `maxThickness`. Any formation in the company can be patched by id; its scope cannot be changed. Only the fields present are changed. The body is an array of records with ids (a single record is also accepted), and the response has a result for each record.
                FormationMultiStatusResponse result = apiInstance.PatchFormations(formations);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.PatchFormations: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
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]

PutFormations

FormationJobAccepted PutFormations (List formations, string overlapHandling = null)

Creates or replaces company formations by name, asynchronously. The body is an array of formations (a single formation is also accepted). A formation whose name already exists in the company scope has its surfaces replaced; other formations in the scope are left in place, although the import may pull up placeholder bottoms of formations above the new ones (reported as written.adjusted on the job). PUT does not set enabled, maxDepth or maxThickness: a new formation starts with enabled: true and no depth constraints, and a replaced one keeps its values. These fields are left out because the import is shared with the ComboCurve app. To set them, wait for the job to succeed, look up the formation’s id with GET /v1/formations?name=..., then PATCH. The whole request is validated first; problems return 400 with the location of each one and nothing is imported. Returns 202 with a job id to poll at GET /v1/formations/jobs/{jobId}.

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 PutFormationsExample
    {
        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 FormationsApi(serviceAccount, apiKey);

            var formations = new List<FormationImportInput>(); // List<FormationImportInput> | 
            var overlapHandling = "overlapHandling_example";  // string | What to do where a formation's base extends below the top of the formation under it: `trim` shortens it to end where the next one begins; `keep` imports both depths unchanged. Only matters for formations that supply `baseTvd`. (optional) (default to "trim")

            try
            {
                // Creates or replaces company formations by name, asynchronously. The body is an array of formations (a single formation is also accepted). A formation whose name already exists in the company scope has its surfaces replaced; other formations in the scope are left in place, although the import may pull up placeholder bottoms of formations above the new ones (reported as `written.adjusted` on the job).  `PUT` does not set `enabled`, `maxDepth` or `maxThickness`: a new formation starts with `enabled: true` and no depth constraints, and a replaced one keeps its values. These fields are left out because the import is shared with the ComboCurve app. To set them, wait for the job to succeed, look up the formation's id with `GET /v1/formations?name=...`, then `PATCH`.  The whole request is validated first; problems return 400 with the location of each one and nothing is imported. Returns 202 with a job id to poll at `GET /v1/formations/jobs/{jobId}`.
                FormationJobAccepted result = apiInstance.PutFormations(formations, overlapHandling);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FormationsApi.PutFormations: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
formations List<FormationImportInput>   [Max number of items is 200]
overlapHandling string What to do where a formation's base extends below the top of the formation under it: `trim` shortens it to end where the next one begins; `keep` imports both depths unchanged. Only matters for formations that supply `baseTvd`. [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]