-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Concept] Improvement of Policy Store API #561
Comments
@mkanal "Policy Object is unique in the application and only id-reference is stored for BPNLs" would a lot more than just API change, it involves changes to the underlying data storage or even a change of technology to relational DB. While it might have been good to think about this earlier I am not sure whether it is good to change this now. |
@mkanal Another important hint: currently there is no paging for GET all policies request. How many are realistically expected here? Do we need paging? |
…664-new-batch-api-endpoint feat(impl):[TRI-1664] new batch api endpoints impl
As team
I want concept how to improve the policy store api to avoid certain problems
so that we could provide a proper and suitable policy handling over the policy store api
Link
Hints / Details
Acceptance Criteria
Out of Scope
Hints
This is a proposal to be revised
Create a policy
=>
validation: if any validation error occurs nothing should be created and validation errors should be returned
other error responses return status and list of error messages
Updating a policy
Update a policy completely
PUT will remove the policy with the given ID from all not specified BPNLs (because PUT is defined as REPLACE).
validation: if any validation error occurs nothing should be created and validation errors should be returned
other error responses return status and list of error messages
Update a policies' validUntil
validation:
other error responses return status and list of error messages
Getting information about policies
Get all policies
as currently implemented:
GET /irs/policies
=>
Get policies for BPNLs
as currently implemented:
GET /irs/policies?businessPartnerNumbers=BPNL1234567890EE&businessPartnerNumbers=BPNL1234567890FF
=>
Get policy by policyId
when policy does not exist -> 404
Get the validUntil of a policy
validation:
Get the payload of a policy
validation:
Get BPNL - policy associations
Get the BPNLs for a policy
validation:
Get the policyIds for a BPNL
validation:
Update BPNL - policy associations
Remove policy from BPNL
Remove policy from BPNL
DELETE /irs/policies/<thePolicyId>/bpnl/<theBPNL>
disadvantages:
advantage:
validation:
the following PATCH requests would be more flexible:
Associate policyIds to a BPNL
validation:
in both cases response:
Associate BPNLs to a policy
validation:
in both cases response:
Delete a policy
Deletes policy from all BPNLs
DELETE /irs/policies/<thePolicyId>
validation:
response:
OK
Default policies
Create a default policy
Same as "Create a policy" but
with dedicated URL
POST /irs/default-policies/default-policy-1
and without attribute "bpnls".
Update a default policy completely
Same as "Update a policy completely" but
with dedicated URL
PUT /irs/default-policies/default-policy-1
and without attribute "bpnls".
Update a default policies' validUntil
Same as "Update a policies' validUntil" but
with dedicated URL
PATCH /irs/default-policies/default-policy-1
.Delete a default policy
Same as "Delete a policy" but
with dedicated URL
DELETE /irs/default-policies/default-policy-1
.link to this discussions page: policy store API improvements #562
for discussion of [Concept] Improvement of Policy Store API #561
todo:
for comparison:
design goals:
The text was updated successfully, but these errors were encountered: