Admin APIs
Requires Dify Enterprise version ≥ v2.2.0
Admin APIs adhere to REST API standards, enabling efficient automation and management within the Dify Enterprise platform. These APIs support querying and modifying information for the following resources:
- Workspaces: Global workspace management, including querying workspace information and performing management operations.
- Members: Global team member management, including querying team member details and managing accounts.
- Workspace Member: Management of members within a specific workspace, including querying member information and managing members.
More features will be supported with future version updates, including enhanced operations and resource management.
API Types
To avoid confusion, Dify distinguishes between different levels of API services:
- APIs provided by applications are referred to as Workspace APIs.
- APIs for managing platform-level operations are collectively called Admin APIs.
Endpoint URL
Admin APIs use the following endpoint address. When making API calls, replace your-domain
with your Dify Enterprise platform domain name and append the specific request path to form the complete API endpoint.
Authentication
API requests require a Secret Key for authentication. To obtain one, navigate to the Admin APIs page in the Dify Enterprise admin dashboard to generate and configure the Key.
Modifying data via Admin APIs may impact production data within your organization. Please proceed with caution.
Usage Example
To facilitate understanding of the Admin APIs, here is an example of how to retrieve the list of workspaces.
1. Create an API Key
- Log in to the Dify Enterprise admin dashboard.
- Navigate to the Admin APIs.
- Click the Add button in the top-right corner and follow the prompts to create a key by entering a name.
2. Import the API Collection and Configure Variables
Click the Postman Collection link on the page to download the configuration file.
Import the configuration file into Postman. Replace the base_url
and secret_key
variables in the Variables.
3. Send the Request
Send the request and receive the response. You can view the complete list of workspaces and their corresponding information within the current enterprise version in the response.