-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem description
Problem Description
Our CI/CD pipeline uses apim api import
to create and update multiple APIs concurrently on the Axway Gateway. All APIs store their quotas under the system scope.
"$APIM_CLI" api import \
--host $AXWAY_HOST \
-port 443 \
--username '$AXWAY_USER' \
--password $AXWAY_PASSWORD \
--apidefinition "api-specification.json" \
--config "api-config.yaml" \
-timeout 300000 \
-retryDelay 120000 \
-ignoreCache \
-changeOrganization \
-force \
-validateRemoteHost false
-
On the first simultaneous deploy, quotas apply correctly.
-
On parallel updates of two or more APIs, the CLI writes some system quotas with value undefined, blocking any further quota deployments until those invalid entries are manually removed.
-
Versions used:
- Gateway - 7.7.20230830.
- CLI - 1.14.10 and 1.14.11.
Steps to Reproduce
- Define two or more APIs with system-level quotas in your configuration files.
- Run the provided command in parallel across all APIs.
- Observe that after import, some quotas appear as undefined.
- Any subsequent import with quotas fails until the broken quotas are deleted in the API-Manager.
Feature request
Proposed Solutions
-
Delta / PATCH-style Updates
- Instead of doing a full
PUT /quotas/0000…000
with the entireAPIQuota
JSON, expose (or leverage) aPATCH
endpoint or JSON-Patch support. - Each import sends only the specific restrictions to add, update or remove for one API.
- Benefits:
- Much smaller payloads
- Zero risk of overwriting other APIs’ entries
- Instead of doing a full
-
Optimistic Locking with ETag / If-Match
- On every quota read, capture the response’s
ETag
header. - When performing the
PUT
, includeIf-Match: <etag>
. If someone else updated in the meantime, the server returns 412 Precondition Failed. - Client logic: on 412 → re-GET → re-merge your change → retry PUT.
- Benefits: guarantee you never overwrite a newer version.
- On every quota read, capture the response’s
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request