限制 WSO2 api 管理器中的应用程序数量

Limit number of applications in WSO2 api manager

我正在使用 wso2 api manager.In 是否可以限制租户或用户在 devportal 中创建的应用程序数量?

默认情况下,无法限制可创建的应用程序数量。一种可能的方法是通过 UI 自定义来实现它。 Devportal REST API - GET /applications 可用于检索所有应用程序详细信息。此资源的响应如下所示:

{
  "count": 1,
  "list": [
    {
      "applicationId": "xxxxx",
      "name": "xxxxxx",
      "throttlingPolicy": "Unlimited",
      "description": "",
      "status": "APPROVED",
      "groups": "",
      "subscriptionCount": 0,
      "attributes": "",
      "owner": "admin"
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 1,
    "total": 10,
    "next": "",
    "previous": ""
  }
}

如果 应用程序数量超过您想要的值,您可以从 UI 禁用 Add new application 按钮。

在 devportal 中列出的应用程序的默认限制是 25 个。您仍然可以创建超过 25 个的新应用程序,但它们不会在 UI 中列出,除非您删除较早的应用程序。

若要在超过首选限制后完全禁止用户创建新应用程序,在超过限制后禁用 Add new application 按钮并显示警告消息即可解决。