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 |
---|---|---|
GetV2ExportsForecastParametersStatus | GET /v2/exports/forecast-parameters/{jobId} | Get forecast parameters export job status |
PostV2ExportsForecastParameters | POST /v2/exports/forecast-parameters | Trigger a forecast parameters export job |
ForecastParametersStatusResponse GetV2ExportsForecastParametersStatus (string jobId, int? expirationHours = null)
Get forecast parameters export job status
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 GetV2ExportsForecastParametersStatusExample
{
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 ExportsV2Api(serviceAccount, apiKey);
var jobId = "jobId_example"; // string | The unique identifier of the export job
var expirationHours = 56; // int? | Number of hours the signed URL will remain valid (default 24) (optional) (between 1 and 24)
try
{
// Get forecast parameters export job status
ForecastParametersStatusResponse result = apiInstance.GetV2ExportsForecastParametersStatus(jobId, expirationHours);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExportsV2Api.GetV2ExportsForecastParametersStatus: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
jobId | string | The unique identifier of the export job | |
expirationHours | int? | Number of hours the signed URL will remain valid (default 24) | [optional] [between 1 and 24] |
ForecastParametersStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | Export job status retrieved successfully | - | | 400 | Bad Request. Invalid jobId format. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 404 | Not Found. Export job not found or does not exist. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ForecastParametersTriggerResponse PostV2ExportsForecastParameters (ForecastParametersExport exportRequest)
Trigger a forecast parameters export job
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 PostV2ExportsForecastParametersExample
{
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 ExportsV2Api(serviceAccount, apiKey);
var exportRequest = new ForecastParametersExport(); // ForecastParametersExport | Forecast parameters export configuration
try
{
// Trigger a forecast parameters export job
ForecastParametersTriggerResponse result = apiInstance.PostV2ExportsForecastParameters(exportRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExportsV2Api.PostV2ExportsForecastParameters: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
exportRequest | ForecastParametersExport | Forecast parameters export configuration |
ForecastParametersTriggerResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 202 | Export job successfully triggered | - | | 400 | Bad Request. Invalid request data or missing required fields. | - | | 401 | Unauthorized. Invalid or missing authentication. | - | | 403 | Forbidden. Insufficient permissions to access the resource. | - | | 422 | Unprocessable Entity. Request validation failed. | - | | 500 | Internal Server Error. Something went wrong on the server. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]