mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 21:28:25 +08:00
[autofix.ci] apply automated fixes (attempt 2/3)
This commit is contained in:
parent
6e1b97438d
commit
f6c474fa9b
@ -14930,3 +14930,169 @@ FastOpenAPI proof of concept for Dify API
|
||||
| release_date | string | Release date of latest version | Yes |
|
||||
| release_notes | string | Release notes for latest version | Yes |
|
||||
| version | string | Latest version number | Yes |
|
||||
|
||||
## FastOpenAPI Preview (OpenAPI 3.0)
|
||||
|
||||
### Dify API (FastOpenAPI PoC)
|
||||
FastOpenAPI proof of concept for Dify API
|
||||
|
||||
#### Version: 1.0
|
||||
|
||||
---
|
||||
|
||||
##### [GET] /console/api/init
|
||||
**Get initialization validation status.**
|
||||
|
||||
###### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | OK | **application/json**: [InitStatusResponse](#initstatusresponse)<br> |
|
||||
|
||||
##### [POST] /console/api/init
|
||||
**Validate initialization password.**
|
||||
|
||||
###### Request Body
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [InitValidatePayload](#initvalidatepayload)<br> |
|
||||
|
||||
###### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 201 | Created | **application/json**: [InitValidateResponse](#initvalidateresponse)<br> |
|
||||
|
||||
##### [GET] /console/api/ping
|
||||
**Health check endpoint for connection testing.**
|
||||
|
||||
###### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | OK | **application/json**: [PingResponse](#pingresponse)<br> |
|
||||
|
||||
##### [GET] /console/api/setup
|
||||
**Get system setup status.
|
||||
|
||||
NOTE: This endpoint is unauthenticated by design.
|
||||
|
||||
During first-time bootstrap there is no admin account yet, so frontend initialization must be
|
||||
able to query setup progress before any login flow exists.
|
||||
|
||||
Only bootstrap-safe status information should be returned by this endpoint.
|
||||
**
|
||||
|
||||
###### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | OK | **application/json**: [SetupStatusResponse](#setupstatusresponse)<br> |
|
||||
|
||||
##### [POST] /console/api/setup
|
||||
**Initialize system setup with admin account.
|
||||
|
||||
NOTE: This endpoint is unauthenticated by design for first-time bootstrap.
|
||||
Access is restricted by deployment mode (`SELF_HOSTED`), one-time setup guards,
|
||||
and init-password validation rather than user session authentication.
|
||||
**
|
||||
|
||||
###### Request Body
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [SetupRequestPayload](#setuprequestpayload)<br> |
|
||||
|
||||
###### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 201 | Created | **application/json**: [SetupResponse](#setupresponse)<br> |
|
||||
|
||||
##### [GET] /console/api/version
|
||||
**Check for application version updates.**
|
||||
|
||||
###### Parameters
|
||||
|
||||
| Name | Located in | Description | Required | Schema |
|
||||
| ---- | ---------- | ----------- | -------- | ------ |
|
||||
| current_version | query | | Yes | string |
|
||||
|
||||
###### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | OK | **application/json**: [VersionResponse](#versionresponse)<br> |
|
||||
|
||||
---
|
||||
##### Schemas
|
||||
|
||||
###### ErrorSchema
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| error | { **"details"**: string, **"message"**: string, **"status"**: integer, **"type"**: string } | | Yes |
|
||||
|
||||
###### InitStatusResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| status | string, <br>**Available values:** "finished", "not_started" | Initialization status<br>*Enum:* `"finished"`, `"not_started"` | Yes |
|
||||
|
||||
###### InitValidatePayload
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| password | string | Initialization password | Yes |
|
||||
|
||||
###### InitValidateResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| result | string | Operation result | Yes |
|
||||
|
||||
###### PingResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| result | string | Health check result | Yes |
|
||||
|
||||
###### SetupRequestPayload
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| email | string | Admin email address | Yes |
|
||||
| language | | Admin language | No |
|
||||
| name | string | Admin name (max 30 characters) | Yes |
|
||||
| password | string | Admin password | Yes |
|
||||
|
||||
###### SetupResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| result | string | Setup result | Yes |
|
||||
|
||||
###### SetupStatusResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| setup_at | | Setup completion time (ISO format) | No |
|
||||
| step | string, <br>**Available values:** "finished", "not_started" | Setup step status<br>*Enum:* `"finished"`, `"not_started"` | Yes |
|
||||
|
||||
###### VersionFeatures
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| can_replace_logo | boolean | Whether logo replacement is supported | Yes |
|
||||
| model_load_balancing_enabled | boolean | Whether model load balancing is enabled | Yes |
|
||||
|
||||
###### VersionResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| can_auto_update | boolean | Whether auto-update is supported | Yes |
|
||||
| features | [VersionFeatures](#versionfeatures) | Feature flags and capabilities | Yes |
|
||||
| release_date | string | Release date of latest version | Yes |
|
||||
| release_notes | string | Release notes for latest version | Yes |
|
||||
| version | string | Latest version number | Yes |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user