apim-cli icon indicating copy to clipboard operation
apim-cli copied to clipboard

Removing existing GLOBAL quotas in Api Manager

Open lturricchia opened this issue 2 years ago • 2 comments

APIM-CLI version

1.14.3-snapshot

API-Management version

7.7.0

Bug description

Hello @rathnapandi about removing existing quotas from Api Manager, we see Apim-cli 1.14.3-snapshot is working with APPLICATION quotas and API quotas (as in https://github.com/Axway-API-Management-Plus/apim-cli/issues/434 https://github.com/Axway-API-Management-Plus/apim-cli/issues/438) but we see the problem still occurs in removing GLOBAL quotas for ALL API, i.e. the 2 cases: System quotas on ALL API and ApplicationDefault quotas on ALL API.

Below the examples in case systemQuota (we found the same behaviour with applicationQuota).

In this case, the json config file input for Apim-cli to add quotas is like:

{
  "quotas": {
    "systemQuota": {
      "api": "*",
      "method": "*",
      "type": "throttle",
      "config": {
        "messages": "250",
        "period": "second",
        "per": "1"
      }
    }
  }
}

but, since a quota is written, we found that none of the following json works with Apim-cli in removing it (tried with develop at Commits on Sep 27, 2023)


i) {
  "quotas": {
    "systemQuota": {}
  }
}

ii) {
  "quotas": {
    "systemQuota": null
  }
} 

iii) {
  "quotas": {}
}
iv) {
  "quotas": null
} 
v) {}
vi) no file

Could you please take a look at it? Are we missing something?

Steps to reproduce

No response

Relevant log output

No response

lturricchia avatar Nov 20 '23 11:11 lturricchia

Hi @lturricchia Deleting all global quotas and remote hosts are not handled. will let you know once I make some progress.

rathnapandi avatar Nov 28 '23 22:11 rathnapandi

thank you, let us know about deleting global quotas meanwhile, are you about to release the next version 1.14.3 (with fix for deleting api and application quotas)?

lturricchia avatar Dec 04 '23 11:12 lturricchia