immich/mobile/openapi/doc/DatabaseBackupsAdminApi.md

9.7 KiB

openapi.api.DatabaseBackupsAdminApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to /api

Method HTTP request Description
deleteDatabaseBackup DELETE /admin/database-backups Delete database backup
downloadDatabaseBackup GET /admin/database-backups/{filename} Download database backup
listDatabaseBackups GET /admin/database-backups List database backups
startDatabaseRestoreFlow POST /admin/database-backups/start-restore Start database backup restore flow
uploadDatabaseBackup POST /admin/database-backups/upload Upload database backup

deleteDatabaseBackup

deleteDatabaseBackup(databaseBackupDeleteDto)

Delete database backup

Delete a backup by its filename

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 = DatabaseBackupsAdminApi();
final databaseBackupDeleteDto = DatabaseBackupDeleteDto(); // DatabaseBackupDeleteDto | 

try {
    api_instance.deleteDatabaseBackup(databaseBackupDeleteDto);
} catch (e) {
    print('Exception when calling DatabaseBackupsAdminApi->deleteDatabaseBackup: $e\n');
}

Parameters

Name Type Description Notes
databaseBackupDeleteDto DatabaseBackupDeleteDto

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

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

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

downloadDatabaseBackup

MultipartFile downloadDatabaseBackup(filename)

Download database backup

Downloads the database backup file

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 = DatabaseBackupsAdminApi();
final filename = filename_example; // String | 

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

Parameters

Name Type Description Notes
filename String

Return type

MultipartFile

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

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

listDatabaseBackups

DatabaseBackupListResponseDto listDatabaseBackups()

List database backups

Get the list of the successful and failed backups

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 = DatabaseBackupsAdminApi();

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

Parameters

This endpoint does not need any parameter.

Return type

DatabaseBackupListResponseDto

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]

startDatabaseRestoreFlow

startDatabaseRestoreFlow()

Start database backup restore flow

Put Immich into maintenance mode to restore a backup (Immich must not be configured)

Example

import 'package:openapi/api.dart';

final api_instance = DatabaseBackupsAdminApi();

try {
    api_instance.startDatabaseRestoreFlow();
} catch (e) {
    print('Exception when calling DatabaseBackupsAdminApi->startDatabaseRestoreFlow: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

uploadDatabaseBackup

uploadDatabaseBackup(file)

Upload database backup

Uploads .sql/.sql.gz file to restore backup from

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 = DatabaseBackupsAdminApi();
final file = BINARY_DATA_HERE; // MultipartFile | Database backup file

try {
    api_instance.uploadDatabaseBackup(file);
} catch (e) {
    print('Exception when calling DatabaseBackupsAdminApi->uploadDatabaseBackup: $e\n');
}

Parameters

Name Type Description Notes
file MultipartFile Database backup file [optional]

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

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