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 |
|---|---|---|
| DeleteProjectShapefileById | DELETE /v1/projects/{projectId}/shapefiles/{id} | Removes a layer from this project. A layer other projects also use is only unlinked from this one (200, with the projects it still belongs to). A layer whose last project is this one is deleted (202, with a job id). |
| GetHeadProjectShapefiles | GET /v1/projects/{projectId}/shapefiles/head | Same as `HEAD /v1/projects/{projectId}/shapefiles`. |
| GetProjectShapefileById | GET /v1/projects/{projectId}/shapefiles/{id} | Returns one of this project's map layers. |
| GetProjectShapefileFeatures | GET /v1/projects/{projectId}/shapefiles/{id}/features | Returns one page of one of this project's layer features. See `GET /v1/shapefiles/{id}/features`. |
| GetProjectShapefiles | GET /v1/projects/{projectId}/shapefiles | Returns this project's map layers, including layers shared with other projects. Company layers are not included; read them from `GET /v1/shapefiles?scope=company`. |
| GetProjectShapefilesJob | GET /v1/projects/{projectId}/shapefiles/jobs/{jobId} | Returns the status of an upload or delete job that touched this project. |
| HeadProjectShapefiles | HEAD /v1/projects/{projectId}/shapefiles | Returns the number of map layers in this project in `X-Query-Count`. |
| PostProjectShapefiles | POST /v1/projects/{projectId}/shapefiles | Creates a map layer in this project from a GeoJSON FeatureCollection. Same as `POST /v1/shapefiles`, without `scope` or `projectIds`. |
| PostProjectShapefilesUpload | POST /v1/projects/{projectId}/shapefiles/uploads | Step 1 of uploading a shapefile zip into this project. See `POST /v1/shapefiles/uploads`. The upload can only be imported through this project's route. |
| PostProjectShapefilesUploadImport | POST /v1/projects/{projectId}/shapefiles/uploads/{uploadId} | Step 3, into this project. See `POST /v1/shapefiles/uploads/{uploadId}`; `scope` and `projectIds` are not accepted. |
ShapefileUnlinked DeleteProjectShapefileById (string projectId, string id)
Removes a layer from this project. A layer other projects also use is only unlinked from this one (200, with the projects it still belongs to). A layer whose last project is this one is deleted (202, with a job 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 DeleteProjectShapefileByIdExample
{
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 ProjectShapefilesApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Removes a layer from this project. A layer other projects also use is only unlinked from this one (200, with the projects it still belongs to). A layer whose last project is this one is deleted (202, with a job id).
ShapefileUnlinked result = apiInstance.DeleteProjectShapefileById(projectId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.DeleteProjectShapefileById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | Unlinked from this project. | - | | 202 | Deleted (asynchronously). | - | | 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void GetHeadProjectShapefiles (string projectId, int? skip = null, int? take = null, string name = null)
Same as HEAD /v1/projects/{projectId}/shapefiles.
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 GetHeadProjectShapefilesExample
{
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 ProjectShapefilesApi(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}/shapefiles`.
apiInstance.GetHeadProjectShapefiles(projectId, skip, take, name);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.GetHeadProjectShapefiles: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| 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] |
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. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Shapefile GetProjectShapefileById (string projectId, string id)
Returns one of this project’s map layers.
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 GetProjectShapefileByIdExample
{
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 ProjectShapefilesApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var id = "id_example"; // string |
try
{
// Returns one of this project's map layers.
Shapefile result = apiInstance.GetProjectShapefileById(projectId, id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.GetProjectShapefileById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<ShapefileFeature> GetProjectShapefileFeatures (string projectId, string id, int? skip = null, int? take = null)
Returns one page of one of this project’s layer features. See GET /v1/shapefiles/{id}/features.
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 GetProjectShapefileFeaturesExample
{
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 ProjectShapefilesApi(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? | (optional) (default to 200) (between 1 and 200)
try
{
// Returns one page of one of this project's layer features. See `GET /v1/shapefiles/{id}/features`.
ICollection<ShapefileFeature> result = apiInstance.GetProjectShapefileFeatures(projectId, id, skip, take);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.GetProjectShapefileFeatures: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| id | string | ||
| skip | int? | number of items to skip | [optional] [default to 0] |
| take | int? | [optional] [default to 200] [between 1 and 200] |
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. |
| 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<Shapefile> GetProjectShapefiles (string projectId, int? skip = null, int? take = null, string name = null)
Returns this project’s map layers, including layers shared with other projects. Company layers are not included; read them from GET /v1/shapefiles?scope=company.
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 GetProjectShapefilesExample
{
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 ProjectShapefilesApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var skip = 56; // int? | number of items to skip (optional) (default to 0)
var take = 56; // int? | (optional) (default to 25) (between 1 and 200)
var name = "name_example"; // string | (optional)
try
{
// Returns this project's map layers, including layers shared with other projects. Company layers are not included; read them from `GET /v1/shapefiles?scope=company`.
ICollection<Shapefile> result = apiInstance.GetProjectShapefiles(projectId, skip, take, name);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.GetProjectShapefiles: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| skip | int? | number of items to skip | [optional] [default to 0] |
| take | int? | [optional] [default to 25] [between 1 and 200] | |
| name | string | [optional] |
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. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShapefileJob GetProjectShapefilesJob (string projectId, string jobId)
Returns the status of an upload or delete job that touched this project.
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 GetProjectShapefilesJobExample
{
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 ProjectShapefilesApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var jobId = "jobId_example"; // string |
try
{
// Returns the status of an upload or delete job that touched this project.
ShapefileJob result = apiInstance.GetProjectShapefilesJob(projectId, jobId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.GetProjectShapefilesJob: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| jobId | string |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 404 | Not Found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadProjectShapefiles (string projectId, int? skip = null, int? take = null, string name = null)
Returns the number of map layers in this project in X-Query-Count.
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 HeadProjectShapefilesExample
{
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 ProjectShapefilesApi(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
{
// Returns the number of map layers in this project in `X-Query-Count`.
apiInstance.HeadProjectShapefiles(projectId, skip, take, name);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.HeadProjectShapefiles: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| 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] |
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. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShapefileJobAccepted PostProjectShapefiles (string projectId, ShapefileGeoJsonInput layer)
Creates a map layer in this project from a GeoJSON FeatureCollection. Same as POST /v1/shapefiles, without scope or projectIds.
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 PostProjectShapefilesExample
{
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 ProjectShapefilesApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var layer = new ShapefileGeoJsonInput(); // ShapefileGeoJsonInput |
try
{
// Creates a map layer in this project from a GeoJSON FeatureCollection. Same as `POST /v1/shapefiles`, without `scope` or `projectIds`.
ShapefileJobAccepted result = apiInstance.PostProjectShapefiles(projectId, layer);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.PostProjectShapefiles: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| layer | ShapefileGeoJsonInput |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 202 | Accepted | - | | 400 | Bad Request. There is something wrong with the request data. | - | | 409 | The name is already used in this project or by a company layer. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShapefileUploadReservation PostProjectShapefilesUpload (string projectId, ShapefileUploadRequest upload = null)
Step 1 of uploading a shapefile zip into this project. See POST /v1/shapefiles/uploads. The upload can only be imported through this project’s route.
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 PostProjectShapefilesUploadExample
{
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 ProjectShapefilesApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var upload = new ShapefileUploadRequest(); // ShapefileUploadRequest | (optional)
try
{
// Step 1 of uploading a shapefile zip into this project. See `POST /v1/shapefiles/uploads`. The upload can only be imported through this project's route.
ShapefileUploadReservation result = apiInstance.PostProjectShapefilesUpload(projectId, upload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.PostProjectShapefilesUpload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| upload | ShapefileUploadRequest | [optional] |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 201 | Created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShapefileJobAccepted PostProjectShapefilesUploadImport (string projectId, string uploadId, ShapefileImportInput layer)
Step 3, into this project. See POST /v1/shapefiles/uploads/{uploadId}; scope and projectIds are not accepted.
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 PostProjectShapefilesUploadImportExample
{
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 ProjectShapefilesApi(serviceAccount, apiKey);
var projectId = "projectId_example"; // string |
var uploadId = "uploadId_example"; // string |
var layer = new ShapefileImportInput(); // ShapefileImportInput |
try
{
// Step 3, into this project. See `POST /v1/shapefiles/uploads/{uploadId}`; `scope` and `projectIds` are not accepted.
ShapefileJobAccepted result = apiInstance.PostProjectShapefilesUploadImport(projectId, uploadId, layer);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProjectShapefilesApi.PostProjectShapefilesUploadImport: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | string | ||
| uploadId | string | ||
| layer | ShapefileImportInput |
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 202 | Accepted | - | | 400 | Bad Request. | - | | 404 | No upload with this id. | - | | 409 | The name is already in use, or the upload was already imported. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]