1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

feat(web,server): api keys (#1244)

* feat(server): api keys

* chore: open-api

* feat(web): api keys

* fix: remove keys when deleting a user
This commit is contained in:
Jason Rasmussen
2023-01-02 15:22:33 -05:00
committed by GitHub
parent 9edbff0ec0
commit 9e6d6b2532
51 changed files with 2586 additions and 35 deletions

View File

@@ -39,22 +39,15 @@ Please follow the [installation procedure](#installation--usage) and then run th
```dart
import 'package:openapi/api.dart';
// 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 = AlbumApi();
final albumId = albumId_example; // String |
final addAssetsDto = AddAssetsDto(); // AddAssetsDto |
final api_instance = APIKeyApi();
final aPIKeyCreateDto = APIKeyCreateDto(); // APIKeyCreateDto |
try {
final result = api_instance.addAssetsToAlbum(albumId, addAssetsDto);
final result = api_instance.createKey(aPIKeyCreateDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->addAssetsToAlbum: $e\n');
print('Exception when calling APIKeyApi->createKey: $e\n');
}
```
@@ -65,6 +58,11 @@ All URIs are relative to */api*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*APIKeyApi* | [**createKey**](doc//APIKeyApi.md#createkey) | **POST** /api-key |
*APIKeyApi* | [**deleteKey**](doc//APIKeyApi.md#deletekey) | **DELETE** /api-key/{id} |
*APIKeyApi* | [**getKey**](doc//APIKeyApi.md#getkey) | **GET** /api-key/{id} |
*APIKeyApi* | [**getKeys**](doc//APIKeyApi.md#getkeys) | **GET** /api-key |
*APIKeyApi* | [**updateKey**](doc//APIKeyApi.md#updatekey) | **PUT** /api-key/{id} |
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /album/{albumId}/assets |
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /album/{albumId}/users |
*AlbumApi* | [**createAlbum**](doc//AlbumApi.md#createalbum) | **POST** /album |
@@ -138,6 +136,10 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [APIKeyCreateDto](doc//APIKeyCreateDto.md)
- [APIKeyCreateResponseDto](doc//APIKeyCreateResponseDto.md)
- [APIKeyResponseDto](doc//APIKeyResponseDto.md)
- [APIKeyUpdateDto](doc//APIKeyUpdateDto.md)
- [AddAssetsDto](doc//AddAssetsDto.md)
- [AddAssetsResponseDto](doc//AddAssetsResponseDto.md)
- [AddUsersDto](doc//AddUsersDto.md)