Skip to content

Latest commit

 

History

History
103 lines (82 loc) · 3.58 KB

UserAPIApi.md

File metadata and controls

103 lines (82 loc) · 3.58 KB

kern.services.CumulocityClient.Api.UserAPIApi

All URIs are relative to https://<TENANT_DOMAIN>

Method HTTP request Description
GetUserApiResource GET /user Retrieve URIs to collections of users, groups and roles

GetUserApiResource

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.

Required roles
ROLE_USER_MANAGEMENT_READ OR ROLE_USER_MANAGEMENT_CREATE

Example

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);
            }
        }
    }
}

Using the GetUserApiResourceWithHttpInfo variant

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);
}

Parameters

This endpoint does not need any parameter.

Return type

UserApiResource

Authorization

Basic, OAI-Secure, SSO

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.com.nsn.cumulocity.userapi+json, application/vnd.com.nsn.cumulocity.error+json

HTTP response details

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]