61 KiB
openapi.api.AssetsApi
Load the API package
import 'package:openapi/api.dart';
All URIs are relative to /api
| Method | HTTP request | Description |
|---|---|---|
| checkBulkUpload | POST /assets/bulk-upload-check | Check bulk upload |
| copyAsset | PUT /assets/copy | Copy asset |
| deleteAssetMetadata | DELETE /assets/{id}/metadata/{key} | Delete asset metadata by key |
| deleteAssets | DELETE /assets | Delete assets |
| deleteBulkAssetMetadata | DELETE /assets/metadata | Delete asset metadata |
| downloadAsset | GET /assets/{id}/original | Download original asset |
| editAsset | PUT /assets/{id}/edits | Apply edits to an existing asset |
| endSession | DELETE /assets/{id}/video/stream/{sessionId} | End HLS streaming session |
| getAssetEdits | GET /assets/{id}/edits | Retrieve edits for an existing asset |
| getAssetInfo | GET /assets/{id} | Retrieve an asset |
| getAssetMetadata | GET /assets/{id}/metadata | Get asset metadata |
| getAssetMetadataByKey | GET /assets/{id}/metadata/{key} | Retrieve asset metadata by key |
| getAssetOcr | GET /assets/{id}/ocr | Retrieve asset OCR data |
| getAssetStatistics | GET /assets/statistics | Get asset statistics |
| getMainPlaylist | GET /assets/{id}/video/stream/main.m3u8 | Get HLS main playlist |
| getMediaPlaylist | GET /assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8 | Get HLS media playlist |
| getSegment | GET /assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename} | Get HLS segment or init file |
| playAssetVideo | GET /assets/{id}/video/playback | Play asset video |
| removeAssetEdits | DELETE /assets/{id}/edits | Remove edits from an existing asset |
| runAssetJobs | POST /assets/jobs | Run an asset job |
| updateAsset | PUT /assets/{id} | Update an asset |
| updateAssetMetadata | PUT /assets/{id}/metadata | Update asset metadata |
| updateAssets | PUT /assets | Update assets |
| updateBulkAssetMetadata | PUT /assets/metadata | Upsert asset metadata |
| uploadAsset | POST /assets | Upload asset |
| viewAsset | GET /assets/{id}/thumbnail | View asset thumbnail |
checkBulkUpload
AssetBulkUploadCheckResponseDto checkBulkUpload(assetBulkUploadCheckDto)
Check bulk upload
Determine which assets have already been uploaded to the server based on their SHA1 checksums.
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 = AssetsApi();
final assetBulkUploadCheckDto = AssetBulkUploadCheckDto(); // AssetBulkUploadCheckDto |
try {
final result = api_instance.checkBulkUpload(assetBulkUploadCheckDto);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->checkBulkUpload: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetBulkUploadCheckDto | AssetBulkUploadCheckDto |
Return type
AssetBulkUploadCheckResponseDto
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
copyAsset
copyAsset(assetCopyDto)
Copy asset
Copy asset information like albums, tags, etc. from one asset to another.
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 = AssetsApi();
final assetCopyDto = AssetCopyDto(); // AssetCopyDto |
try {
api_instance.copyAsset(assetCopyDto);
} catch (e) {
print('Exception when calling AssetsApi->copyAsset: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetCopyDto | AssetCopyDto |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteAssetMetadata
deleteAssetMetadata(id, key)
Delete asset metadata by key
Delete a specific metadata key-value pair associated with the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Asset ID
final key = key_example; // String | Metadata key
try {
api_instance.deleteAssetMetadata(id, key);
} catch (e) {
print('Exception when calling AssetsApi->deleteAssetMetadata: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Asset ID | |
| key | String | Metadata key |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteAssets
deleteAssets(assetBulkDeleteDto)
Delete assets
Deletes multiple assets at the same time.
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 = AssetsApi();
final assetBulkDeleteDto = AssetBulkDeleteDto(); // AssetBulkDeleteDto |
try {
api_instance.deleteAssets(assetBulkDeleteDto);
} catch (e) {
print('Exception when calling AssetsApi->deleteAssets: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetBulkDeleteDto | AssetBulkDeleteDto |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteBulkAssetMetadata
deleteBulkAssetMetadata(assetMetadataBulkDeleteDto)
Delete asset metadata
Delete metadata key-value pairs for multiple assets.
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 = AssetsApi();
final assetMetadataBulkDeleteDto = AssetMetadataBulkDeleteDto(); // AssetMetadataBulkDeleteDto |
try {
api_instance.deleteBulkAssetMetadata(assetMetadataBulkDeleteDto);
} catch (e) {
print('Exception when calling AssetsApi->deleteBulkAssetMetadata: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetMetadataBulkDeleteDto | AssetMetadataBulkDeleteDto |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
downloadAsset
MultipartFile downloadAsset(id, edited, key, slug)
Download original asset
Downloads the original file of the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final edited = true; // bool | Return edited asset if available
final key = key_example; // String |
final slug = slug_example; // String |
try {
final result = api_instance.downloadAsset(id, edited, key, slug);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->downloadAsset: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| edited | bool | Return edited asset if available | [optional] [default to false] |
| key | String | [optional] | |
| slug | String | [optional] |
Return type
Authorization
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]
editAsset
AssetEditsResponseDto editAsset(id, assetEditsCreateDto)
Apply edits to an existing asset
Apply a series of edit actions (crop, rotate, mirror) to the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final assetEditsCreateDto = AssetEditsCreateDto(); // AssetEditsCreateDto |
try {
final result = api_instance.editAsset(id, assetEditsCreateDto);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->editAsset: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| assetEditsCreateDto | AssetEditsCreateDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
endSession
endSession(id, sessionId, key, slug)
End HLS streaming session
Releases server resources for the streaming session.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final sessionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final key = key_example; // String |
final slug = slug_example; // String |
try {
api_instance.endSession(id, sessionId, key, slug);
} catch (e) {
print('Exception when calling AssetsApi->endSession: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| sessionId | String | ||
| key | String | [optional] | |
| slug | String | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAssetEdits
AssetEditsResponseDto getAssetEdits(id)
Retrieve edits for an existing asset
Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
final result = api_instance.getAssetEdits(id);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getAssetEdits: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAssetInfo
AssetResponseDto getAssetInfo(id, key, slug)
Retrieve an asset
Retrieve detailed information about a specific asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final key = key_example; // String |
final slug = slug_example; // String |
try {
final result = api_instance.getAssetInfo(id, key, slug);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getAssetInfo: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| key | String | [optional] | |
| slug | String | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAssetMetadata
List getAssetMetadata(id)
Get asset metadata
Retrieve all metadata key-value pairs associated with the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
final result = api_instance.getAssetMetadata(id);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getAssetMetadata: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAssetMetadataByKey
AssetMetadataResponseDto getAssetMetadataByKey(id, key)
Retrieve asset metadata by key
Retrieve the value of a specific metadata key associated with the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Asset ID
final key = key_example; // String | Metadata key
try {
final result = api_instance.getAssetMetadataByKey(id, key);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getAssetMetadataByKey: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Asset ID | |
| key | String | Metadata key |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAssetOcr
List getAssetOcr(id)
Retrieve asset OCR data
Retrieve all OCR (Optical Character Recognition) data associated with the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
final result = api_instance.getAssetOcr(id);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getAssetOcr: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAssetStatistics
AssetStatsResponseDto getAssetStatistics(isFavorite, isTrashed, visibility)
Get asset statistics
Retrieve various statistics about the assets owned by the authenticated 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 = AssetsApi();
final isFavorite = true; // bool | Filter by favorite status
final isTrashed = true; // bool | Filter by trash status
final visibility = ; // AssetVisibility |
try {
final result = api_instance.getAssetStatistics(isFavorite, isTrashed, visibility);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getAssetStatistics: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| isFavorite | bool | Filter by favorite status | [optional] |
| isTrashed | bool | Filter by trash status | [optional] |
| visibility | AssetVisibility | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getMainPlaylist
String getMainPlaylist(id, key, slug)
Get HLS main playlist
Returns an HLS main playlist with all available variants for the asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final key = key_example; // String |
final slug = slug_example; // String |
try {
final result = api_instance.getMainPlaylist(id, key, slug);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getMainPlaylist: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| key | String | [optional] | |
| slug | String | [optional] |
Return type
String
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/vnd.apple.mpegurl
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getMediaPlaylist
String getMediaPlaylist(id, sessionId, variantIndex, key, slug, xImmichHlsPos)
Get HLS media playlist
Returns an HLS media playlist for one variant of the streaming session.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final sessionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final variantIndex = 56; // int |
final key = key_example; // String |
final slug = slug_example; // String |
final xImmichHlsPos = 8.14; // num |
try {
final result = api_instance.getMediaPlaylist(id, sessionId, variantIndex, key, slug, xImmichHlsPos);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getMediaPlaylist: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| sessionId | String | ||
| variantIndex | int | ||
| key | String | [optional] | |
| slug | String | [optional] | |
| xImmichHlsPos | num | [optional] |
Return type
String
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/vnd.apple.mpegurl
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSegment
MultipartFile getSegment(filename, id, sessionId, variantIndex, key, slug, xImmichHlsMsn)
Get HLS segment or init file
Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s).
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 = AssetsApi();
final filename = filename_example; // String |
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final sessionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final variantIndex = 56; // int |
final key = key_example; // String |
final slug = slug_example; // String |
final xImmichHlsMsn = 56; // int |
try {
final result = api_instance.getSegment(filename, id, sessionId, variantIndex, key, slug, xImmichHlsMsn);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->getSegment: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| filename | String | ||
| id | String | ||
| sessionId | String | ||
| variantIndex | int | ||
| key | String | [optional] | |
| slug | String | [optional] | |
| xImmichHlsMsn | int | [optional] |
Return type
Authorization
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]
playAssetVideo
MultipartFile playAssetVideo(id, key, slug)
Play asset video
Streams the video file for the specified asset. This endpoint also supports byte range requests.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final key = key_example; // String |
final slug = slug_example; // String |
try {
final result = api_instance.playAssetVideo(id, key, slug);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->playAssetVideo: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| key | String | [optional] | |
| slug | String | [optional] |
Return type
Authorization
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]
removeAssetEdits
removeAssetEdits(id)
Remove edits from an existing asset
Removes all edit actions (crop, rotate, mirror) associated with the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
api_instance.removeAssetEdits(id);
} catch (e) {
print('Exception when calling AssetsApi->removeAssetEdits: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
runAssetJobs
runAssetJobs(assetJobsDto)
Run an asset job
Run a specific job on a set of assets.
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 = AssetsApi();
final assetJobsDto = AssetJobsDto(); // AssetJobsDto |
try {
api_instance.runAssetJobs(assetJobsDto);
} catch (e) {
print('Exception when calling AssetsApi->runAssetJobs: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetJobsDto | AssetJobsDto |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateAsset
AssetResponseDto updateAsset(id, updateAssetDto)
Update an asset
Update information of a specific asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final updateAssetDto = UpdateAssetDto(); // UpdateAssetDto |
try {
final result = api_instance.updateAsset(id, updateAssetDto);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->updateAsset: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| updateAssetDto | UpdateAssetDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateAssetMetadata
List updateAssetMetadata(id, assetMetadataUpsertDto)
Update asset metadata
Update or add metadata key-value pairs for the specified asset.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final assetMetadataUpsertDto = AssetMetadataUpsertDto(); // AssetMetadataUpsertDto |
try {
final result = api_instance.updateAssetMetadata(id, assetMetadataUpsertDto);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->updateAssetMetadata: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| assetMetadataUpsertDto | AssetMetadataUpsertDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateAssets
updateAssets(assetBulkUpdateDto)
Update assets
Updates multiple assets at the same time.
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 = AssetsApi();
final assetBulkUpdateDto = AssetBulkUpdateDto(); // AssetBulkUpdateDto |
try {
api_instance.updateAssets(assetBulkUpdateDto);
} catch (e) {
print('Exception when calling AssetsApi->updateAssets: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetBulkUpdateDto | AssetBulkUpdateDto |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateBulkAssetMetadata
List updateBulkAssetMetadata(assetMetadataBulkUpsertDto)
Upsert asset metadata
Upsert metadata key-value pairs for multiple assets.
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 = AssetsApi();
final assetMetadataBulkUpsertDto = AssetMetadataBulkUpsertDto(); // AssetMetadataBulkUpsertDto |
try {
final result = api_instance.updateBulkAssetMetadata(assetMetadataBulkUpsertDto);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->updateBulkAssetMetadata: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetMetadataBulkUpsertDto | AssetMetadataBulkUpsertDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
uploadAsset
AssetMediaResponseDto uploadAsset(assetData, fileCreatedAt, fileModifiedAt, key, slug, xImmichChecksum, duration, filename, isFavorite, livePhotoVideoId, metadata, sidecarData, visibility)
Upload asset
Uploads a new asset to the server.
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 = AssetsApi();
final assetData = BINARY_DATA_HERE; // MultipartFile | Asset file data
final fileCreatedAt = 2013-10-20T19:20:30+01:00; // DateTime | File creation date
final fileModifiedAt = 2013-10-20T19:20:30+01:00; // DateTime | File modification date
final key = key_example; // String |
final slug = slug_example; // String |
final xImmichChecksum = xImmichChecksum_example; // String | sha1 checksum that can be used for duplicate detection before the file is uploaded
final duration = 56; // int | Duration in milliseconds (for videos)
final filename = filename_example; // String | Filename
final isFavorite = true; // bool | Mark as favorite
final livePhotoVideoId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Live photo video ID
final metadata = []; // List<AssetMetadataUpsertItemDto> | Asset metadata items
final sidecarData = BINARY_DATA_HERE; // MultipartFile | Sidecar file data
final visibility = ; // AssetVisibility |
try {
final result = api_instance.uploadAsset(assetData, fileCreatedAt, fileModifiedAt, key, slug, xImmichChecksum, duration, filename, isFavorite, livePhotoVideoId, metadata, sidecarData, visibility);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->uploadAsset: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| assetData | MultipartFile | Asset file data | |
| fileCreatedAt | DateTime | File creation date | |
| fileModifiedAt | DateTime | File modification date | |
| key | String | [optional] | |
| slug | String | [optional] | |
| xImmichChecksum | String | sha1 checksum that can be used for duplicate detection before the file is uploaded | [optional] |
| duration | int | Duration in milliseconds (for videos) | [optional] |
| filename | String | Filename | [optional] |
| isFavorite | bool | Mark as favorite | [optional] |
| livePhotoVideoId | String | Live photo video ID | [optional] |
| metadata | List | Asset metadata items | [optional] |
| sidecarData | MultipartFile | Sidecar file data | [optional] |
| visibility | AssetVisibility | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
viewAsset
MultipartFile viewAsset(id, edited, key, size, slug)
View asset thumbnail
Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission.
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 = AssetsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final edited = true; // bool | Return edited asset if available
final key = key_example; // String |
final size = ; // AssetMediaSize |
final slug = slug_example; // String |
try {
final result = api_instance.viewAsset(id, edited, key, size, slug);
print(result);
} catch (e) {
print('Exception when calling AssetsApi->viewAsset: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| edited | bool | Return edited asset if available | [optional] [default to false] |
| key | String | [optional] | |
| size | AssetMediaSize | [optional] | |
| slug | String | [optional] |
Return type
Authorization
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]