mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
154 lines
6.3 KiB
Markdown
Generated
154 lines
6.3 KiB
Markdown
Generated
# openapi
|
|
App API
|
|
|
|
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
|
|
- API version: 0.1.0
|
|
- Generator version: 7.8.0
|
|
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
|
|
|
## Requirements
|
|
|
|
Dart 2.12 or later
|
|
|
|
## Installation & Usage
|
|
|
|
### Github
|
|
If this Dart package is published to Github, add the following dependency to your pubspec.yaml
|
|
```
|
|
dependencies:
|
|
openapi:
|
|
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
```
|
|
|
|
### Local
|
|
To use the package in your local drive, add the following dependency to your pubspec.yaml
|
|
```
|
|
dependencies:
|
|
openapi:
|
|
path: /path/to/openapi
|
|
```
|
|
|
|
## Tests
|
|
|
|
TODO
|
|
|
|
## Getting Started
|
|
|
|
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
|
|
```dart
|
|
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 = APIKeysApi();
|
|
final aPIKeyCreateDto = APIKeyCreateDto(); // APIKeyCreateDto |
|
|
|
|
try {
|
|
final result = api_instance.createApiKey(aPIKeyCreateDto);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling APIKeysApi->createApiKey: $e\n');
|
|
}
|
|
|
|
```
|
|
|
|
## Documentation for API Endpoints
|
|
|
|
All URIs are relative to */api*
|
|
|
|
Class | Method | HTTP request | Description
|
|
------------ | ------------- | ------------- | -------------
|
|
*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | Create an API key
|
|
*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | Delete an API key
|
|
*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | Retrieve an API key
|
|
*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | List all API keys
|
|
*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | Retrieve the current API key
|
|
*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key
|
|
*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | Change password
|
|
*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | Login
|
|
*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | Logout
|
|
*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | Register admin
|
|
*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | Validate access token
|
|
*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | Get server information
|
|
*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | Get config
|
|
*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | Get features
|
|
*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | Get server version
|
|
*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | Ping
|
|
*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | Create a session
|
|
*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | Delete all sessions
|
|
*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | Delete a session
|
|
*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | Retrieve sessions
|
|
*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | Get current user
|
|
*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | Retrieve a user
|
|
*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | Get all users
|
|
*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | Update current user
|
|
|
|
|
|
## Documentation For Models
|
|
|
|
- [APIKeyCreateDto](doc//APIKeyCreateDto.md)
|
|
- [APIKeyCreateResponseDto](doc//APIKeyCreateResponseDto.md)
|
|
- [APIKeyResponseDto](doc//APIKeyResponseDto.md)
|
|
- [APIKeyUpdateDto](doc//APIKeyUpdateDto.md)
|
|
- [ChangePasswordDto](doc//ChangePasswordDto.md)
|
|
- [LoginCredentialDto](doc//LoginCredentialDto.md)
|
|
- [LoginResponseDto](doc//LoginResponseDto.md)
|
|
- [LogoutResponseDto](doc//LogoutResponseDto.md)
|
|
- [Permission](doc//Permission.md)
|
|
- [ServerAboutResponseDto](doc//ServerAboutResponseDto.md)
|
|
- [ServerConfigDto](doc//ServerConfigDto.md)
|
|
- [ServerFeaturesDto](doc//ServerFeaturesDto.md)
|
|
- [ServerPingResponse](doc//ServerPingResponse.md)
|
|
- [ServerVersionResponseDto](doc//ServerVersionResponseDto.md)
|
|
- [SessionCreateDto](doc//SessionCreateDto.md)
|
|
- [SessionCreateResponseDto](doc//SessionCreateResponseDto.md)
|
|
- [SessionResponseDto](doc//SessionResponseDto.md)
|
|
- [SignUpDto](doc//SignUpDto.md)
|
|
- [UserAdminResponseDto](doc//UserAdminResponseDto.md)
|
|
- [UserResponseDto](doc//UserResponseDto.md)
|
|
- [UserStatus](doc//UserStatus.md)
|
|
- [UserUpdateMeDto](doc//UserUpdateMeDto.md)
|
|
- [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md)
|
|
|
|
|
|
## Documentation For Authorization
|
|
|
|
|
|
Authentication schemes defined for the API:
|
|
### bearer
|
|
|
|
- **Type**: HTTP Bearer authentication
|
|
|
|
### cookie
|
|
|
|
- **Type**: API key
|
|
- **API key parameter name**: immich_access_token
|
|
- **Location**:
|
|
|
|
### api_key
|
|
|
|
- **Type**: API key
|
|
- **API key parameter name**: x-api-key
|
|
- **Location**: HTTP header
|
|
|
|
|
|
## Author
|
|
|
|
|
|
|