Yes i also think same way. I believe we should add sub resources only if it has its own life cycles and its own usage even without dependency to root resource. But for me endpoints are tightly bound to API unlike other sub resources. If we consider image like resource then even without API dependency it has its own mean. Same applies for swagger definition etc. But IMO sub resources and its attributes are bit different from them and more like API meta data. WDYT?
Thanks, sanjeewa. On Tue, Dec 20, 2016 at 11:25 AM, Joseph Fonseka <[email protected]> wrote: > Hi Tharindu > > Instead of exposing new API resources can we use API Definition to capture > those details for example scopes and authentication types are already > captured in the API Definition ( Swagger ) with vendor extension attributes. > > In the above case If a client want to update any of the resource values > they can simply submit the updated API Definition. > > Thanks > Jo > > On Tue, Dec 20, 2016 at 10:39 AM, Tharindu Dharmarathna < > [email protected]> wrote: > >> Hi All, >> >> We are going to implement REST API to do the following functionality on >> C5. >> >> *Functionality* >> >> 1. Add API Resource >> >> 1. Endpoint configuration >> 2. Resource level policy >> 3. Authentication Type for resource (Any,Application user ,etc.) >> 4. Scope >> >> 2. Update API Resource >> 3. Delete API Resource >> 4. GET API Resource. >> >> We had concern of following approaches to handle the above resource. >> >> 1. Handle as element in the API as [1]. >> >> 2. Make SubResource of the API. >> >> - /apis/{API_ID}/resources - Post (Add resource) >> - /apis/{API_ID}/resources/{resourceid} - GET (Get Specific Resource) >> - /apis/{API_ID}/resources/{resourceid} - PUT (Update Specific >> Resource) >> - /apis/{API_ID}/resources/{resourceid} - Delete (Delete Specific >> Resource) >> - /apis/{API_ID}/resources - GET (Get All Resource according to the >> API) >> >> >> In order to handle above resources we are going to give resource in the >> API model of rest API as [1]. >> >> [1] - https://github.com/tharindu1st/carbon-apimgt/blob/0d61ece0 >> 9a4fc1cc24aa4616f63245a57decfe14/components/apimgt/org.wso2. >> carbon.apimgt.rest.api.publisher/src/main/resources/publisher-api.yaml >> >> Please add your suggestions into the above approaches. >> >> Thanks >> >> *Tharindu Dharmarathna*Software Engineer >> WSO2 Inc.; http://wso2.com >> lean.enterprise.middleware >> >> mobile: *+94779109091 <+94%2077%20910%209091>* >> > > > > -- > > -- > *Joseph Fonseka* > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: +94 772 512 430 > skype: jpfonseka > > * <http://lk.linkedin.com/in/rumeshbandara>* > > -- *Sanjeewa Malalgoda* WSO2 Inc. Mobile : +94713068779 <http://sanjeewamalalgoda.blogspot.com/>blog :http://sanjeewamalalgoda.blogspot.com/ <http://sanjeewamalalgoda.blogspot.com/>
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
