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. |
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 match the given filters and 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 (optional) (default to 0)
var take = 56; // int? | max records to return (optional) (default to 25) (between 1 and 200)
var sort = "sort_example"; // string | field to sort by, including + or - at the beginning for ascending or descending order, respectively (optional)
var cursor = "cursor_example"; // string | used in pagination to get the next page (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 | [optional] [default to 0] |
take | int? | max records to return | [optional] [default to 25] [between 1 and 200] |
sort | string | field to sort by, including + or - at the beginning for ascending or descending order, respectively | [optional] |
cursor | string | used in pagination to get the next page | [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 - 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]
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 (optional) (default to 0)
var take = 56; // int? | max records to return (optional) (default to 25) (between 1 and 200)
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 | [optional] [default to 0] |
take | int? | max records to return | [optional] [default to 25] [between 1 and 200] |
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 - 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]
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]
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]