Add /site API (#19631)

This commit is contained in:
lexmin0412
2025-05-14 10:43:36 +08:00
committed by GitHub
parent 3c953cb0ef
commit ff20b56074
15 changed files with 740 additions and 3 deletions

View File

@@ -1305,6 +1305,64 @@ Chat applications support session persistence, allowing previous chat history to
</Row>
---
<Heading
url='/site'
method='GET'
title='Get Application WebApp Settings'
name='#site'
/>
<Row>
<Col>
Used to get the WebApp settings of the application.
### Response
- `title` (string) WebApp name
- `chat_color_theme` (string) Chat color theme, in hex format
- `chat_color_theme_inverted` (bool) Whether the chat color theme is inverted
- `icon_type` (string) Icon type, `emoji` - emoji, `image` - picture
- `icon` (string) Icon. If it's `emoji` type, it's an emoji symbol; if it's `image` type, it's an image URL
- `icon_background` (string) Background color in hex format
- `icon_url` (string) Icon URL
- `description` (string) Description
- `copyright` (string) Copyright information
- `privacy_policy` (string) Privacy policy link
- `custom_disclaimer` (string) Custom disclaimer
- `default_language` (string) Default language
- `show_workflow_steps` (bool) Whether to show workflow details
- `use_icon_as_answer_icon` (bool) Whether to replace 🤖 in chat with the WebApp icon
</Col>
<Col>
<CodeGroup title="Request" tag="POST" label="/meta" targetCode={`curl -X GET '${props.appDetail.api_base_url}/site' \\\n-H 'Authorization: Bearer {api_key}'`}>
```bash {{ title: 'cURL' }}
curl -X GET '${props.appDetail.api_base_url}/site' \
-H 'Authorization: Bearer {api_key}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Response' }}
{
"title": "My App",
"chat_color_theme": "#ff4a4a",
"chat_color_theme_inverted": false,
"icon_type": "emoji",
"icon": "😄",
"icon_background": "#FFEAD5",
"icon_url": null,
"description": "This is my app.",
"copyright": "all rights reserved",
"privacy_policy": "",
"custom_disclaimer": "All generated by AI",
"default_language": "en-US",
"show_workflow_steps": false,
"use_icon_as_answer_icon": false,
}
```
</CodeGroup>
</Col>
</Row>
___
<Heading
url='/apps/annotations'
method='GET'