方法路径摘要认证
GET/v1/theme/assets/{sha}—登录会话
GET/v1/theme/auth-style—登录会话
GET/v1/theme/auth-style/assets/{sha}—登录会话
GET/v1/theme/current—登录会话
GET/v1/theme/theme.{sha}.css—登录会话
GET/v1/theme/theme.{sha}.json—登录会话

契约文件:api/control-themes.openapi.yaml

接口详情

GET /v1/theme/assets/{sha}

operationId
getThemeAsset
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

A theme brand image (png/jpeg/ico). Immutable.

参数

getThemeAsset 参数
名称位置类型必填说明
shapathstring是—

响应

getThemeAsset 响应
状态码说明
200Image
404Unknown digest

失败时怎么办

  • 404 资源不存在或不属于当前租户。

↑ 回到列表

GET /v1/theme/auth-style

operationId
getThemeAuthStyle
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Public sign-in page style of the theme plugin active on the user console (site theme C, auth_style): CSS the console puts in a <style> of its own on /auth/* and the plugin's images. Forms and submission stay the platform's; nginx serves /auth/* with img-src, font-src and connect-src 'self'. An empty css without one. Cache-Control no-cache.

响应

getThemeAuthStyle 响应
状态码说明
200Sign-in style

字段:css: string images: object

405Not GET or HEAD

↑ 回到列表

GET /v1/theme/auth-style/assets/{sha}

operationId
getThemeAuthStyleAsset
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

An image of an installed plugin's sign-in style, served with a sandboxing CSP. Immutable.

参数

getThemeAuthStyleAsset 参数
名称位置类型必填说明
shapathstring是—

响应

getThemeAuthStyleAsset 响应
状态码说明
200Image
404Unknown digest

失败时怎么办

  • 404 资源不存在或不属于当前租户。

↑ 回到列表

GET /v1/theme/current

operationId
getCurrentTheme
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Public pointer to the theme the caller sees (Cache-Control no-store). A tenant session gets its tenant's theme; without a session, a Host bound to a tenant (sign-in page) gets that tenant's theme; the platform console and everyone else get the platform theme (the default theme until one is activated).

参数

getCurrentTheme 参数
名称位置类型必填说明
Authorizationheaderstring否Optional bearer session

响应

getCurrentTheme 响应
状态码说明
200Active theme

字段:schema: const cdnca.theme.current/v1 revision: integer theme_id: string version: string package_sha256: string tokens_url: string stylesheet_url: string scope?: any brand_assets?: object

↑ 回到列表

GET /v1/theme/theme.{sha}.css

operationId
getThemeStylesheet
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Rendered custom properties on :root[data-cdnca-theme], then one block per tokens_by_role role on :root[data-cdnca-theme][data-cdnca-role="admin"|"user"] carrying only that role's overrides. Immutable.

参数

getThemeStylesheet 参数
名称位置类型必填说明
shapathstring是—

响应

getThemeStylesheet 响应
状态码说明
200Stylesheet
404Unknown digest

失败时怎么办

  • 404 资源不存在或不属于当前租户。

↑ 回到列表

GET /v1/theme/theme.{sha}.json

operationId
getThemeTokens
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Rendered tokens (cdnca.theme.rendered/v1) for ConfigProvider and layout slots. Immutable.

参数

getThemeTokens 参数
名称位置类型必填说明
shapathstring是—

响应

getThemeTokens 响应
状态码说明
200Rendered theme

字段:schema: const cdnca.theme.rendered/v1 id: string version: string package_sha256: string name: object antd_tokens: object antd_tokens_by_role?: object css_variables: object layout: object brand: object

404Unknown digest

失败时怎么办

  • 404 资源不存在或不属于当前租户。

↑ 回到列表