immich/mobile/openapi/doc/SearchApi.md

27 KiB

openapi.api.SearchApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to /api

Method HTTP request Description
getAssetsByCity GET /search/cities Retrieve assets by city
getExploreData GET /search/explore Retrieve explore data
getSearchSuggestions GET /search/suggestions Retrieve search suggestions
searchAssetStatistics POST /search/statistics Search asset statistics
searchAssets POST /search/metadata Search assets by metadata
searchLargeAssets POST /search/large-assets Search large assets
searchPerson GET /search/person Search people
searchPlaces GET /search/places Search places
searchRandom POST /search/random Search random assets
searchSmart POST /search/smart Smart asset search

getAssetsByCity

List getAssetsByCity()

Retrieve assets by city

Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.

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

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

Parameters

This endpoint does not need any parameter.

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]

getExploreData

List getExploreData()

Retrieve explore data

Retrieve data for the explore section, such as popular people and places.

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

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

Parameters

This endpoint does not need any parameter.

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]

getSearchSuggestions

List getSearchSuggestions(type, country, includeNull, lensModel, make, model, state)

Retrieve search suggestions

Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.

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 = SearchApi();
final type = ; // SearchSuggestionType | 
final country = country_example; // String | Filter by country
final includeNull = true; // bool | Include null values in suggestions
final lensModel = lensModel_example; // String | Filter by lens model
final make = make_example; // String | Filter by camera make
final model = model_example; // String | Filter by camera model
final state = state_example; // String | Filter by state/province

try {
    final result = api_instance.getSearchSuggestions(type, country, includeNull, lensModel, make, model, state);
    print(result);
} catch (e) {
    print('Exception when calling SearchApi->getSearchSuggestions: $e\n');
}

Parameters

Name Type Description Notes
type SearchSuggestionType
country String Filter by country [optional]
includeNull bool Include null values in suggestions [optional]
lensModel String Filter by lens model [optional]
make String Filter by camera make [optional]
model String Filter by camera model [optional]
state String Filter by state/province [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]

searchAssetStatistics

SearchStatisticsResponseDto searchAssetStatistics(statisticsSearchDto)

Search asset statistics

Retrieve statistical data about assets based on search criteria, such as the total matching count.

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 = SearchApi();
final statisticsSearchDto = StatisticsSearchDto(); // StatisticsSearchDto | 

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

Parameters

Name Type Description Notes
statisticsSearchDto StatisticsSearchDto

Return type

SearchStatisticsResponseDto

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]

searchAssets

SearchResponseDto searchAssets(metadataSearchDto, key, slug)

Search assets by metadata

Search for assets based on various metadata criteria.

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 = SearchApi();
final metadataSearchDto = MetadataSearchDto(); // MetadataSearchDto | 
final key = key_example; // String | 
final slug = slug_example; // String | 

try {
    final result = api_instance.searchAssets(metadataSearchDto, key, slug);
    print(result);
} catch (e) {
    print('Exception when calling SearchApi->searchAssets: $e\n');
}

Parameters

Name Type Description Notes
metadataSearchDto MetadataSearchDto
key String [optional]
slug String [optional]

Return type

SearchResponseDto

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]

searchLargeAssets

List searchLargeAssets(albumIds, city, country, createdAfter, createdBefore, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, ocr, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, visibility, withDeleted, withExif)

Search large assets

Search for assets that are considered large based on specified criteria.

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 = SearchApi();
final albumIds = []; // List<String> | Filter by album IDs
final city = city_example; // String | Filter by city name
final country = country_example; // String | Filter by country name
final createdAfter = 2024-01-01T00:00Z; // DateTime | Filter by creation date (after)
final createdBefore = 2024-01-01T00:00Z; // DateTime | Filter by creation date (before)
final isEncoded = true; // bool | Filter by encoded status
final isFavorite = true; // bool | Filter by favorite status
final isMotion = true; // bool | Filter by motion photo status
final isNotInAlbum = true; // bool | Filter assets not in any album
final isOffline = true; // bool | Filter by offline status
final lensModel = lensModel_example; // String | Filter by lens model
final libraryId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Library ID to filter by
final make = make_example; // String | Filter by camera make
final minFileSize = 56; // int | Minimum file size in bytes
final model = model_example; // String | Filter by camera model
final ocr = ocr_example; // String | Filter by OCR text content
final personIds = []; // List<String> | Filter by person IDs
final rating = 56; // int | Filter by rating [1-5], or null for unrated
final size = 56; // int | Number of results to return
final state = state_example; // String | Filter by state/province name
final tagIds = []; // List<String> | Filter by tag IDs
final takenAfter = 2024-01-01T00:00Z; // DateTime | Filter by taken date (after)
final takenBefore = 2024-01-01T00:00Z; // DateTime | Filter by taken date (before)
final trashedAfter = 2024-01-01T00:00Z; // DateTime | Filter by trash date (after)
final trashedBefore = 2024-01-01T00:00Z; // DateTime | Filter by trash date (before)
final type = ; // AssetTypeEnum | 
final updatedAfter = 2024-01-01T00:00Z; // DateTime | Filter by update date (after)
final updatedBefore = 2024-01-01T00:00Z; // DateTime | Filter by update date (before)
final visibility = ; // AssetVisibility | 
final withDeleted = true; // bool | Include deleted assets
final withExif = true; // bool | Include EXIF data in response

try {
    final result = api_instance.searchLargeAssets(albumIds, city, country, createdAfter, createdBefore, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, ocr, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, type, updatedAfter, updatedBefore, visibility, withDeleted, withExif);
    print(result);
} catch (e) {
    print('Exception when calling SearchApi->searchLargeAssets: $e\n');
}

Parameters

Name Type Description Notes
albumIds List Filter by album IDs [optional] [default to const []]
city String Filter by city name [optional]
country String Filter by country name [optional]
createdAfter DateTime Filter by creation date (after) [optional]
createdBefore DateTime Filter by creation date (before) [optional]
isEncoded bool Filter by encoded status [optional]
isFavorite bool Filter by favorite status [optional]
isMotion bool Filter by motion photo status [optional]
isNotInAlbum bool Filter assets not in any album [optional]
isOffline bool Filter by offline status [optional]
lensModel String Filter by lens model [optional]
libraryId String Library ID to filter by [optional]
make String Filter by camera make [optional]
minFileSize int Minimum file size in bytes [optional]
model String Filter by camera model [optional]
ocr String Filter by OCR text content [optional]
personIds List Filter by person IDs [optional] [default to const []]
rating int Filter by rating [1-5], or null for unrated [optional]
size int Number of results to return [optional]
state String Filter by state/province name [optional]
tagIds List Filter by tag IDs [optional] [default to const []]
takenAfter DateTime Filter by taken date (after) [optional]
takenBefore DateTime Filter by taken date (before) [optional]
trashedAfter DateTime Filter by trash date (after) [optional]
trashedBefore DateTime Filter by trash date (before) [optional]
type AssetTypeEnum [optional]
updatedAfter DateTime Filter by update date (after) [optional]
updatedBefore DateTime Filter by update date (before) [optional]
visibility AssetVisibility [optional]
withDeleted bool Include deleted assets [optional]
withExif bool Include EXIF data in response [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]

searchPerson

List searchPerson(name, withHidden)

Search people

Search for people by name.

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 = SearchApi();
final name = name_example; // String | Person name to search for
final withHidden = true; // bool | Include hidden people

try {
    final result = api_instance.searchPerson(name, withHidden);
    print(result);
} catch (e) {
    print('Exception when calling SearchApi->searchPerson: $e\n');
}

Parameters

Name Type Description Notes
name String Person name to search for
withHidden bool Include hidden people [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]

searchPlaces

List searchPlaces(name)

Search places

Search for places by name.

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 = SearchApi();
final name = name_example; // String | Place name to search for

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

Parameters

Name Type Description Notes
name String Place name to search for

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]

searchRandom

List searchRandom(randomSearchDto)

Search random assets

Retrieve a random selection of assets based on the provided criteria.

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 = SearchApi();
final randomSearchDto = RandomSearchDto(); // RandomSearchDto | 

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

Parameters

Name Type Description Notes
randomSearchDto RandomSearchDto

Return type

List

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]

searchSmart

SearchResponseDto searchSmart(smartSearchDto)

Smart asset search

Perform a smart search for assets by using machine learning vectors to determine relevance.

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 = SearchApi();
final smartSearchDto = SmartSearchDto(); // SmartSearchDto | 

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

Parameters

Name Type Description Notes
smartSearchDto SmartSearchDto

Return type

SearchResponseDto

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]