Interface DifyServerClient


public interface DifyServerClient
Dify Server Client Interface Provides methods to interact with Dify's server API for managing applications, API keys, authentication, and related operations.
Since:
2025/4/9 10:14
Version:
0.8.0
Author:
yanghq
  • Method Details

    • apps

      List<AppsResponse> apps(String mode, String name)
      Retrieves a list of applications based on mode and name filter
      Parameters:
      mode - The application mode to filter by (e.g., "completion", "chat")
      name - The application name to search for
      Returns:
      List of application responses matching the criteria
    • app

      AppsResponse app(String appId)
      Retrieves detailed information about a specific application
      Parameters:
      appId - The ID of the application to retrieve
      Returns:
      The application response containing detailed information
    • getAppApiKey

      List<ApiKeyResponse> getAppApiKey(String appId)
      Retrieves existing API keys for a specific application
      Parameters:
      appId - The ID of the application to get API keys for
      Returns:
      List of API key responses associated with the application
    • initAppApiKey

      List<ApiKeyResponse> initAppApiKey(String appId)
      Initializes or regenerates API keys for a specific application
      Parameters:
      appId - The ID of the application to initialize API keys for
      Returns:
      List of newly generated API key responses
    • getDatasetApiKey

      List<DatasetApiKeyResponse> getDatasetApiKey()
      Retrieves existing API keys for datasets
      Returns:
      List of dataset API key responses
    • initDatasetApiKey

      List<DatasetApiKeyResponse> initDatasetApiKey()
      Initializes or regenerates API keys for datasets
      Returns:
      List of newly generated dataset API key responses
    • login

      LoginResponse login()
      Authenticates with the Dify server and returns login credentials
      Returns:
      Login response containing access token and refresh token
    • refreshToken

      LoginResponse refreshToken(String refreshToken)
      Refreshes an authentication token to maintain session validity
      Parameters:
      refreshToken - The refresh token used to obtain a new access token
      Returns:
      Login response containing new access token and refresh token