企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# Appearance API > 原文:[https://docs.gitlab.com/ee/api/appearance.html](https://docs.gitlab.com/ee/api/appearance.html) * [Get current appearance configuration](#get-current-appearance-configuration) * [Change appearance configuration](#change-appearance-configuration) # Appearance API[](#appearance-api-core-only "Permalink") 在 GitLab 12.7 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/16647) . Appearance API 使您可以像在`/admin/appearance`使用 GitLab UI 一样维护 GitLab 的`/admin/appearance` . 该 API 需要管理员权限. ## Get current appearance configuration[](#get-current-appearance-configuration "Permalink") 列出 GitLab 实例的当前外观配置. ``` GET /application/appearance ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/application/appearance" ``` 响应示例: ``` { "title": "GitLab Test Instance", "description": "gitlab-test.example.com", "logo": "/uploads/-/system/appearance/logo/1/logo.png", "header_logo": "/uploads/-/system/appearance/header_logo/1/header.png", "favicon": "/uploads/-/system/appearance/favicon/1/favicon.png", "new_project_guidelines": "Please read the FAQs for help.", "profile_image_guidelines": "Custom profile image guidelines", "header_message": "", "footer_message": "", "message_background_color": "#e75e40", "message_font_color": "#ffffff", "email_header_and_footer_enabled": false } ``` ## Change appearance configuration[](#change-appearance-configuration "Permalink") 使用 API​​调用来修改 GitLab 实例外观配置. ``` PUT /application/appearance ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `title` | string | no | 登录/注册页面上的实例标题 | | `description` | string | no | 降价文字显示在登录/注册页面上 | | `logo` | mixed | no | 登录/注册页面上使用的实例图像 | | `header_logo` | mixed | no | 用于主导航栏的实例图像 | | `favicon` | mixed | no | `.ico`或`.png`格式的实例图标 | | `new_project_guidelines` | string | no | 新项目页面上显示的降价文字 | | `profile_image_guidelines` | string | no | 降价文字显示在个人头像下方的个人资料页面上 | | `header_message` | string | no | 系统标题栏中的消息 | | `footer_message` | string | no | 系统页脚栏中的消息 | | `message_background_color` | string | no | 系统页眉/页脚栏的背景颜色 | | `message_font_color` | string | no | 系统页眉/页脚栏的字体颜色 | | `email_header_and_footer_enabled` | boolean | no | 如果启用,则在所有外发电子邮件中添加页眉和页脚 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/application/appearance?email_header_and_footer_enabled=true&header_message=test" ``` 响应示例: ``` { "title": "GitLab Test Instance", "description": "gitlab-test.example.com", "logo": "/uploads/-/system/appearance/logo/1/logo.png", "header_logo": "/uploads/-/system/appearance/header_logo/1/header.png", "favicon": "/uploads/-/system/appearance/favicon/1/favicon.png", "new_project_guidelines": "Please read the FAQs for help.", "profile_image_guidelines": "Custom profile image guidelines", "header_message": "test", "footer_message": "", "message_background_color": "#e75e40", "message_font_color": "#ffffff", "email_header_and_footer_enabled": true } ```