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 |
|---|---|---|
| DeleteDirectionalSurveysById | DELETE /v1/directional-surveys/{id} | Delete the directional survey document that matches the given id. |
| GetDirectionalSurveys | GET /v1/directional-surveys | Returns a list of directional surveys documents. |
| GetDirectionalSurveysById | GET /v1/directional-surveys/{id} | Returns the DS document that matches the given id. |
| HeadDirectionalSurveys | HEAD /v1/directional-surveys | Returns metadata about the existing directional surveys documents. |
| PostDirectionalSurveys | POST /v1/directional-surveys | Insert a new directional Survey. |
| PostDirectionalSurveysBatch | POST /v1/directional-surveys/batch | Upsert multiple directional surveys and return the outcome for each well. |
| PutDirectionalSurveys | PUT /v1/directional-surveys/{id} | Update a Directional Survey. |
void DeleteDirectionalSurveysById (string id)
Delete the directional survey document that matches the given id.
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 DeleteDirectionalSurveysByIdExample
{
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 DirectionalSurveysApi(serviceAccount, apiKey);
var id = "id_example"; // string | the directional survey ID
try
{
// Delete the directional survey document that matches the given id.
apiInstance.DeleteDirectionalSurveysById(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectionalSurveysApi.DeleteDirectionalSurveysById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | the directional survey ID |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | OK | * X-Delete-Count - The number of records that were deleted. | | 400 | Bad Request. There is something wrong with the request data. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<DirectionalSurveyResponse> GetDirectionalSurveys (int? skip = null, int? take = null, string sort = null, string cursor = null, string well = null, string chosenID = null, bool? measures = null, string project = null)
Returns a list of directional surveys documents.
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 GetDirectionalSurveysExample
{
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 DirectionalSurveysApi(serviceAccount, apiKey);
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 100)
var sort = "sort_example"; // string | Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. (optional)
var cursor = "cursor_example"; // string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. (optional)
var well = "well_example"; // string | filter by well ID (optional)
var chosenID = "chosenID_example"; // string | filter by well chosenID (optional)
var measures = true; // bool? | configure the measures fields to be returned (optional) (default to true)
var project = "project_example"; // string | filter by project ID (optional)
try
{
// Returns a list of directional surveys documents.
ICollection<DirectionalSurveyResponse> result = apiInstance.GetDirectionalSurveys(skip, take, sort, cursor, well, chosenID, measures, project);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectionalSurveysApi.GetDirectionalSurveys: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| 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 100] |
| sort | string | Single field to sort by, with an optional `-` prefix for descending order (ascending is the default). Multiple fields are not supported, and a field the endpoint does not allow returns 400. A literal `+` prefix in a query string is read as a space and returns 400, so send ascending as `%2B` or omit the prefix. | [optional] |
| cursor | string | Opaque cursor that returns the page after the one that produced it. Copy it from the `next` link of the previous response instead of building it. Cannot be combined with `skip`; sending both returns 400. The cursor only works when results are ordered by the endpoint's cursor field, which is the default order (`id`, or `well` on forecast volumes). With any other `sort` the cursor is ignored and the first page is returned again, so page with `skip` instead. Daily and monthly production endpoints return 400 when `sort` and `cursor` are both sent. | [optional] |
| well | string | filter by well ID | [optional] |
| chosenID | string | filter by well chosenID | [optional] |
| measures | bool? | configure the measures fields to be returned | [optional] [default to true] |
| project | string | filter by project ID | [optional] |
ICollection<DirectionalSurveyResponse>
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]
DirectionalSurveyResponse GetDirectionalSurveysById (string id)
Returns the DS document that matches the given id.
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 GetDirectionalSurveysByIdExample
{
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 DirectionalSurveysApi(serviceAccount, apiKey);
var id = "id_example"; // string | the directional survey ID
try
{
// Returns the DS document that matches the given id.
DirectionalSurveyResponse result = apiInstance.GetDirectionalSurveysById(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectionalSurveysApi.GetDirectionalSurveysById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | the directional survey ID |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 400 | Bad Request. There is something wrong with the request data. | - | | 404 | Was not found any item that matches with the given id. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadDirectionalSurveys (int? skip = null, int? take = null, string well = null, string chosenID = null, string project = null)
Returns metadata about the existing directional surveys documents.
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 HeadDirectionalSurveysExample
{
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 DirectionalSurveysApi(serviceAccount, apiKey);
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 100)
var well = "well_example"; // string | filter by well ID (optional)
var chosenID = "chosenID_example"; // string | filter by well chosenID (optional)
var project = "project_example"; // string | filter by project ID (optional)
try
{
// Returns metadata about the existing directional surveys documents.
apiInstance.HeadDirectionalSurveys(skip, take, well, chosenID, project);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectionalSurveysApi.HeadDirectionalSurveys: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| 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 100] |
| well | string | filter by well ID | [optional] |
| chosenID | string | filter by well chosenID | [optional] |
| project | string | filter by project ID | [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]
DirectionalSurveyCreatedResponse PostDirectionalSurveys (DirectionalSurveyInsertRequest well = null)
Insert a new directional Survey.
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 PostDirectionalSurveysExample
{
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 DirectionalSurveysApi(serviceAccount, apiKey);
var well = new DirectionalSurveyInsertRequest(); // DirectionalSurveyInsertRequest | Directional Survey document. (optional)
try
{
// Insert a new directional Survey.
DirectionalSurveyCreatedResponse result = apiInstance.PostDirectionalSurveys(well);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectionalSurveysApi.PostDirectionalSurveys: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| well | DirectionalSurveyInsertRequest | Directional Survey document. | [optional] |
DirectionalSurveyCreatedResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 201 | Created | - | | 400 | Bad Request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DirectionalSurveyMultiStatusResponse PostDirectionalSurveysBatch (List
wells)
Upsert multiple directional surveys and return the outcome for each well.
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 PostDirectionalSurveysBatchExample
{
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 DirectionalSurveysApi(serviceAccount, apiKey);
var wells = new List<DirectionalSurveyInsertRequest>(); // List<DirectionalSurveyInsertRequest> | Directional Survey documents to upsert.
try
{
// Upsert multiple directional surveys and return the outcome for each well.
DirectionalSurveyMultiStatusResponse result = apiInstance.PostDirectionalSurveysBatch(wells);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectionalSurveysApi.PostDirectionalSurveysBatch: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| wells | List<DirectionalSurveyInsertRequest> | Directional Survey documents to upsert. | [Max number of items is 250] |
DirectionalSurveyMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | Multi-Status | - | | 400 | Bad Request. There is something wrong with the batch request. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DirectionalSurveyCreatedResponse PutDirectionalSurveys (string id, DirectionalSurveyUpdateRequest bodyPayload = null)
Update a Directional Survey.
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 PutDirectionalSurveysExample
{
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 DirectionalSurveysApi(serviceAccount, apiKey);
var id = "id_example"; // string |
var bodyPayload = new DirectionalSurveyUpdateRequest(); // DirectionalSurveyUpdateRequest | Update Directional Survey input. (optional)
try
{
// Update a Directional Survey.
DirectionalSurveyCreatedResponse result = apiInstance.PutDirectionalSurveys(id, bodyPayload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DirectionalSurveysApi.PutDirectionalSurveys: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | ||
| bodyPayload | DirectionalSurveyUpdateRequest | Update Directional Survey input. | [optional] |
DirectionalSurveyCreatedResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 400 | Bad Request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]