Files
immich/mobile/openapi/README.md
2026-02-06 22:00:56 +00:00

6.3 KiB
Generated

openapi

App API

This Dart package is automatically generated by the OpenAPI Generator 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 and then run the following:

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 POST /api-keys Create an API key
APIKeysApi deleteApiKey DELETE /api-keys/{id} Delete an API key
APIKeysApi getApiKey GET /api-keys/{id} Retrieve an API key
APIKeysApi getApiKeys GET /api-keys List all API keys
APIKeysApi getMyApiKey GET /api-keys/me Retrieve the current API key
APIKeysApi updateApiKey PUT /api-keys/{id} Update an API key
AuthenticationApi changePassword POST /auth/change-password Change password
AuthenticationApi login POST /auth/login Login
AuthenticationApi logout POST /auth/logout Logout
AuthenticationApi signUpAdmin POST /auth/admin-sign-up Register admin
AuthenticationApi validateAccessToken POST /auth/validateToken Validate access token
ServerApi getAboutInfo GET /server/about Get server information
ServerApi getServerConfig GET /server/config Get config
ServerApi getServerFeatures GET /server/features Get features
ServerApi getServerVersion GET /server/version Get server version
ServerApi pingServer GET /server/ping Ping
SessionsApi createSession POST /sessions Create a session
SessionsApi deleteAllSessions DELETE /sessions Delete all sessions
SessionsApi deleteSession DELETE /sessions/{id} Delete a session
SessionsApi getSessions GET /sessions Retrieve sessions
UsersApi getMyUser GET /users/me Get current user
UsersApi getUser GET /users/{id} Retrieve a user
UsersApi searchUsers GET /users Get all users
UsersApi updateMyUser PUT /users/me Update current user

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearer

  • Type: HTTP Bearer authentication
  • 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