Hi Malintha,

If we consider Option1 where everything goes under /policies/  it's likely
that we will have a resource which we can get all type of policies by using
the /policies

Hence +1 for option2.

Thanks & Regards,
Ishara Cooray
Associate Technical Lead
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware


On Tue, Apr 30, 2019 at 10:51 AM Malintha Amarasinghe <malint...@wso2.com>
wrote:

> Hi,
>
> In APIM Publisher REST API we have below resources. Those resources are
> policies related eg: threat protection policies, mediation policies,
> throttling policies. There is an inconsistency across the API in the way it
> is defined.
>
> For example;
> 1. We for mediation policies, we have specified the resource as
> /policies/mediation whereas threat protection policies are defined as
> /threat-protection-policies.
> 2. For throttling policies, there is no mention about "throttling" at all
> in the resource name.
>
> As we are redesigning the REST APIs for REST API v1.0 release (so far we
> are in v0.x versions) this is the ideal time to fix this inconsistency and
> make it more intuitive.
>
> *The list of resources we have this issue:*
>
> Global per-API
> /policies/mediation
> /policies/mediation/{mediationPolicyId}
> /policies/{policyLevel}
> /policies/{policyLevel}/{policyName}
> /threat-protection-policies
> /threat-protection-policies/{policyId} /apis/{apiId}/policies/mediation
> /apis/{apiId}/policies/mediation/{mediationPolicyId}
> /apis/{apiId}/threat-protection-policies
> /apis/{apiId}/resource-policies
> /apis/{apiId}/resource-policies/{resourcePolicyId}
>
> *Suggestions:*
>
> *Option 1:*
> Take everything under */policies* resource.
>
> *Option 2:*
> Remove /policies from all the resources and add *-policies* suffix.
>
> Option 1 Option 2
> /policies/mediation
> /policies/mediation/{mediationPolicyId}
> /policies/*throttling*/{policyLevel}
> /policies/*throttling*/{policyLevel}/{policyName}
> */policies/threat-protection*
> */policies/threat-protection*/{policyId}
>
> /apis/{apiId}/policies/mediation
> /apis/{apiId}/policies/mediation/{mediationPolicyId}
> /apis/{apiId}/*policies*/threat-protection
> .. */mediation-policies*
> */mediation-policies*/{mediationPolicyId}
> /*throttling*-policies/{policyLevel}
> /*throttling*-policies/{policyLevel}/{policyName}
> /threat-protection-policies
> /threat-protection-policies/{policyId}
>
> /apis/{apiId}/*mediation-policies*
> /apis/{apiId}/*mediation-policies*/{mediationPolicyId}
> /apis/{apiId}/threat-protection-policies
>
> Please let us know your thoughts
>
> Thanks!
> Malintha
>
> --
> Malintha Amarasinghe
> *WSO2, Inc. - lean | enterprise | middleware*
> http://wso2.com/
>
> Mobile : +94 712383306
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to