immich/mobile/openapi/doc/UsersAdminApi.md

25 KiB

openapi.api.UsersAdminApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to /api

Method HTTP request Description
createUserAdmin POST /admin/users Create a user
deleteUserAdmin DELETE /admin/users/{id} Delete a user
getUserAdmin GET /admin/users/{id} Retrieve a user
getUserCalendarHeatmapAdmin GET /admin/users/{id}/calendar-heatmap Retrieve calendar heatmap activity
getUserPreferencesAdmin GET /admin/users/{id}/preferences Retrieve user preferences
getUserSessionsAdmin GET /admin/users/{id}/sessions Retrieve user sessions
getUserStatisticsAdmin GET /admin/users/{id}/statistics Retrieve user statistics
restoreUserAdmin POST /admin/users/{id}/restore Restore a deleted user
searchUsersAdmin GET /admin/users Search users
updateUserAdmin PUT /admin/users/{id} Update a user
updateUserPreferencesAdmin PUT /admin/users/{id}/preferences Update user preferences

createUserAdmin

UserAdminResponseDto createUserAdmin(userAdminCreateDto)

Create a user

Create a new user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final userAdminCreateDto = UserAdminCreateDto(); // UserAdminCreateDto | 

try {
    final result = api_instance.createUserAdmin(userAdminCreateDto);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->createUserAdmin: $e\n');
}

Parameters

Name Type Description Notes
userAdminCreateDto UserAdminCreateDto

Return type

UserAdminResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteUserAdmin

UserAdminResponseDto deleteUserAdmin(id, userAdminDeleteDto)

Delete a user

Delete a user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final userAdminDeleteDto = UserAdminDeleteDto(); // UserAdminDeleteDto | 

try {
    final result = api_instance.deleteUserAdmin(id, userAdminDeleteDto);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->deleteUserAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String
userAdminDeleteDto UserAdminDeleteDto

Return type

UserAdminResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserAdmin

UserAdminResponseDto getUserAdmin(id)

Retrieve a user

Retrieve a specific user by their ID.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    final result = api_instance.getUserAdmin(id);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->getUserAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

UserAdminResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserCalendarHeatmapAdmin

CalendarHeatmapResponseDto getUserCalendarHeatmapAdmin(id, from, to, type)

Retrieve calendar heatmap activity

Retrieve activity counts for a specified period, in a calendar heatmap format.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final from = Mon Jan 01 00:00:00 UTC 2024; // DateTime | Start date in UTC
final to = Mon Jan 01 00:00:00 UTC 2024; // DateTime | End date in UTC
final type = ; // CalendarHeatmapType | 

try {
    final result = api_instance.getUserCalendarHeatmapAdmin(id, from, to, type);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->getUserCalendarHeatmapAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String
from DateTime Start date in UTC [optional]
to DateTime End date in UTC [optional]
type CalendarHeatmapType [optional]

Return type

CalendarHeatmapResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserPreferencesAdmin

UserPreferencesResponseDto getUserPreferencesAdmin(id)

Retrieve user preferences

Retrieve the preferences of a specific user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    final result = api_instance.getUserPreferencesAdmin(id);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->getUserPreferencesAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

UserPreferencesResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserSessionsAdmin

List getUserSessionsAdmin(id)

Retrieve user sessions

Retrieve all sessions for a specific user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    final result = api_instance.getUserSessionsAdmin(id);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->getUserSessionsAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

List

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserStatisticsAdmin

AssetStatsResponseDto getUserStatisticsAdmin(id, isFavorite, isTrashed, visibility)

Retrieve user statistics

Retrieve asset statistics for a specific user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final isFavorite = true; // bool | Filter by favorite status
final isTrashed = true; // bool | Filter by trash status
final visibility = ; // AssetVisibility | 

try {
    final result = api_instance.getUserStatisticsAdmin(id, isFavorite, isTrashed, visibility);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->getUserStatisticsAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String
isFavorite bool Filter by favorite status [optional]
isTrashed bool Filter by trash status [optional]
visibility AssetVisibility [optional]

Return type

AssetStatsResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restoreUserAdmin

UserAdminResponseDto restoreUserAdmin(id)

Restore a deleted user

Restore a previously deleted user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    final result = api_instance.restoreUserAdmin(id);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->restoreUserAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

UserAdminResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

searchUsersAdmin

List searchUsersAdmin(id, withDeleted)

Search users

Search for users.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | User ID filter
final withDeleted = true; // bool | Include deleted users

try {
    final result = api_instance.searchUsersAdmin(id, withDeleted);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->searchUsersAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String User ID filter [optional]
withDeleted bool Include deleted users [optional]

Return type

List

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUserAdmin

UserAdminResponseDto updateUserAdmin(id, userAdminUpdateDto)

Update a user

Update an existing user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final userAdminUpdateDto = UserAdminUpdateDto(); // UserAdminUpdateDto | 

try {
    final result = api_instance.updateUserAdmin(id, userAdminUpdateDto);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->updateUserAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String
userAdminUpdateDto UserAdminUpdateDto

Return type

UserAdminResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUserPreferencesAdmin

UserPreferencesResponseDto updateUserPreferencesAdmin(id, userPreferencesUpdateDto)

Update user preferences

Update the preferences of a specific user.

Example

import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = UsersAdminApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final userPreferencesUpdateDto = UserPreferencesUpdateDto(); // UserPreferencesUpdateDto | 

try {
    final result = api_instance.updateUserPreferencesAdmin(id, userPreferencesUpdateDto);
    print(result);
} catch (e) {
    print('Exception when calling UsersAdminApi->updateUserPreferencesAdmin: $e\n');
}

Parameters

Name Type Description Notes
id String
userPreferencesUpdateDto UserPreferencesUpdateDto

Return type

UserPreferencesResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]