All URIs are relative to https://<TENANT_DOMAIN>
Method | HTTP request | Description |
---|---|---|
GetUserApiResource | GET /user | Retrieve URIs to collections of users, groups and roles |
UserApiResource GetUserApiResource ()
Retrieve URIs to collections of users, groups and roles
Retrieve URIs and URI templates to collections of users, groups, and roles, so that they can be queried.
using System.Collections.Generic;
using System.Diagnostics;
using kern.services.CumulocityClient.Api;
using kern.services.CumulocityClient.Client;
using kern.services.CumulocityClient.Model;
namespace Example
{
public class GetUserApiResourceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://<TENANT_DOMAIN>";
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
// Configure Bearer token for authorization: OAI-Secure
config.AccessToken = "YOUR_BEARER_TOKEN";
// Configure OAuth2 access token for authorization: SSO
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new UserAPIApi(config);
try
{
// Retrieve URIs to collections of users, groups and roles
UserApiResource result = apiInstance.GetUserApiResource();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserAPIApi.GetUserApiResource: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Retrieve URIs to collections of users, groups and roles
ApiResponse<UserApiResource> response = apiInstance.GetUserApiResourceWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserAPIApi.GetUserApiResourceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/vnd.com.nsn.cumulocity.userapi+json, application/vnd.com.nsn.cumulocity.error+json
Status code | Description | Response headers |
---|---|---|
200 | The request has succeeded and the URIs are sent in the response. | - |
401 | Authentication information is missing or invalid. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]