All URIs are relative to https://localhost
Method | HTTP request | Description |
---|---|---|
ApiUsersGet | GET /api/users | Returns the collection of all registered users |
ApiUsersIdGet | GET /api/users/{id} | Return one user entity |
ApiUsersIdPatch | PATCH /api/users/{id} | Update an existing user |
ApiUsersMeGet | GET /api/users/me | Return the current user entity |
ApiUsersPost | POST /api/users | Creates a new user |
List ApiUsersGet (string visible, string orderBy, string order, string term)
Returns the collection of all registered users
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class ApiUsersGetExample
{
public void main()
{
// Configure API key authorization: apiToken
Configuration.Default.ApiKey.Add("X-AUTH-TOKEN", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-TOKEN", "Bearer");
// Configure API key authorization: apiUser
Configuration.Default.ApiKey.Add("X-AUTH-USER", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-USER", "Bearer");
var apiInstance = new UserApi();
var visible = visible_example; // string | Visibility status to filter users. Allowed values: 1=visible, 2=hidden, 3=all (default: 1) (optional)
var orderBy = orderBy_example; // string | The field by which results will be ordered. Allowed values: id, username, alias, email (default: username) (optional)
var order = order_example; // string | The result order. Allowed values: ASC, DESC (default: ASC) (optional)
var term = term_example; // string | Free search term (optional)
try
{
// Returns the collection of all registered users
List<UserCollection> result = apiInstance.ApiUsersGet(visible, orderBy, order, term);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.ApiUsersGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
visible | string | Visibility status to filter users. Allowed values: 1=visible, 2=hidden, 3=all (default: 1) | [optional] |
orderBy | string | The field by which results will be ordered. Allowed values: id, username, alias, email (default: username) | [optional] |
order | string | The result order. Allowed values: ASC, DESC (default: ASC) | [optional] |
term | string | Free search term | [optional] |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserEntity ApiUsersIdGet (int? id)
Return one user entity
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class ApiUsersIdGetExample
{
public void main()
{
// Configure API key authorization: apiToken
Configuration.Default.ApiKey.Add("X-AUTH-TOKEN", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-TOKEN", "Bearer");
// Configure API key authorization: apiUser
Configuration.Default.ApiKey.Add("X-AUTH-USER", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-USER", "Bearer");
var apiInstance = new UserApi();
var id = 56; // int? | User ID to fetch
try
{
// Return one user entity
UserEntity result = apiInstance.ApiUsersIdGet(id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.ApiUsersIdGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | int? | User ID to fetch |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserEntity ApiUsersIdPatch (UserEditForm body, int? id)
Update an existing user
Update an existing user, you can pass all or just a subset of all attributes (passing roles will replace all existing ones)
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class ApiUsersIdPatchExample
{
public void main()
{
// Configure API key authorization: apiToken
Configuration.Default.ApiKey.Add("X-AUTH-TOKEN", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-TOKEN", "Bearer");
// Configure API key authorization: apiUser
Configuration.Default.ApiKey.Add("X-AUTH-USER", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-USER", "Bearer");
var apiInstance = new UserApi();
var body = new UserEditForm(); // UserEditForm |
var id = 56; // int? | User ID to update
try
{
// Update an existing user
UserEntity result = apiInstance.ApiUsersIdPatch(body, id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.ApiUsersIdPatch: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | UserEditForm | ||
id | int? | User ID to update |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserEntity ApiUsersMeGet ()
Return the current user entity
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class ApiUsersMeGetExample
{
public void main()
{
// Configure API key authorization: apiToken
Configuration.Default.ApiKey.Add("X-AUTH-TOKEN", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-TOKEN", "Bearer");
// Configure API key authorization: apiUser
Configuration.Default.ApiKey.Add("X-AUTH-USER", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-USER", "Bearer");
var apiInstance = new UserApi();
try
{
// Return the current user entity
UserEntity result = apiInstance.ApiUsersMeGet();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.ApiUsersMeGet: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserEntity ApiUsersPost (UserCreateForm body)
Creates a new user
Creates a new user and returns it afterwards
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class ApiUsersPostExample
{
public void main()
{
// Configure API key authorization: apiToken
Configuration.Default.ApiKey.Add("X-AUTH-TOKEN", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-TOKEN", "Bearer");
// Configure API key authorization: apiUser
Configuration.Default.ApiKey.Add("X-AUTH-USER", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-AUTH-USER", "Bearer");
var apiInstance = new UserApi();
var body = new UserCreateForm(); // UserCreateForm |
try
{
// Creates a new user
UserEntity result = apiInstance.ApiUsersPost(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.ApiUsersPost: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | UserCreateForm |
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]