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 |
---|---|---|
GetUsersRoles | GET /v1/users/roles | Returns a list of user resource role documents. |
ICollection<UserResourceRoles> GetUsersRoles (int? skip = null, int? take = null, string sort = null, string cursor = null, string userId = null, string email = null, string project = null, string role = null)
Returns a list of user resource role 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 GetUsersRolesExample
{
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 UserResourceRolesApi(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 userId = "userId_example"; // string | filter by userId (optional)
var email = "email_example"; // string | filter by user email (optional)
var project = "project_example"; // string | filter by project (optional)
var role = "role_example"; // string | filter by role (optional)
try
{
// Returns a list of user resource role documents.
ICollection<UserResourceRoles> result = apiInstance.GetUsersRoles(skip, take, sort, cursor, userId, email, project, role);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserResourceRolesApi.GetUsersRoles: " + 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] |
userId | string | filter by userId | [optional] |
string | filter by user email | [optional] | |
project | string | filter by project | [optional] |
role | string | filter by role | [optional] |
ICollection<UserResourceRoles>
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]