重置主题

您可以清除某个租户的所有主题和模板自定义设置,从而将其自定义内容重置为开箱即用的模板。

过程

  1. 获取访问令牌。
    请使用具有 manageTemplates 权利的 API 客户机来生成访问令牌。 如需了解更多信息,请参阅 “创建 API 客户端”
    Request:
    
    curl https://<tenant-hostname>/oidc/endpoint/default/token -d 'grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>'
    
    Response:
    
    {
      "access_token": "XHwFNxa6ey9Lcb6oR8fPyNZp1tCkVPZCPSBRcrco",
      "token_type": "Bearer",
      "expires_in": 7199,
      "scope": "openid"
    }
    
     
    保存访问令牌以用于后续请求。
  2. 重置主题。
    调用 reset theme API。 它将清除租户的所有主题和模板自定义设置,并将这些自定义设置重置为开箱即用的模板。
    Request:
    
    curl -X DELETE  -H "Authorization: Bearer <access_token>" https://<tenant-hostname>/v1.0/branding/reset
    
    Response:
    
    204 No Content