On Fri, Feb 16, 2018 at 12:28 PM, Malintha Amarasinghe <malint...@wso2.com> wrote:
> Hi Sivaramya, > > On Fri, Feb 16, 2018 at 12:13 PM, Sivaramya Sivanathan <sivara...@wso2.com > > wrote: > >> Hi All, >> >> I followed the following steps, >> >> 1) Download the fresh package *wso2am-2.1.0* >> > This API is not included in the fresh pack. This is available in the > latest WUM update pack or one of the released updates (2.1.0-updateX). Take > the latest one if possible. > > On a seperate note, this doc need to be updated mentioning those > information. > > Thanks! > > >> >> 2) Obtain the *clientId* and *clientSecret* from the token endpoint and >> then get the *access_token. * (*access_token* : 3abb5d89-ddea >> -39ae-aca4-c94ec3b4c1d1) >> 3) Send that access token as a header in the API call. >> 4) When I get the details of the application using the curl command as >> below. >> curl -k -H "Authorization: Bearer >> 3abb5d89-ddea-39ae-aca4-c94ec3b4c1d1" >> "https://localhost:9443/api/am/store/v0.11/applications/a2dc >> 9825-8a75-42d5-b1d9-4987612ea8f5" >> >> I got the response as follows, >> >> { >> "applicationId":"a2dc9825-8a75-42d5-b1d9-4987612ea8f5", >> "name":"sampleapp", >> "subscriber":"admin", >> "throttlingTier":"Unlimited", >> "callbackUrl":"http://my.server.com/callback", >> "description":"sample app description", >> "status":"APPROVED", >> "groupId":null, >> "keys":[{ >> "consumerKey":"RhKMetERTwVWOd >> 9UvEU0v14Sflka","consumerSecret":"XWiufquXgT7MfEadNRDdtF_ >> v1Qga","supportedGrantTypes":null,"keyState":"COMPLETED"," >> keyType":"PRODUCTION", >> "token":{"accessToken":"58c1d >> 49f-7710-342e-85a9-b288f10ba323","tokenScopes":["am_ >> application_scope","default"],"validityTime":3600} >> }] >> } >> >> 5) But when I used the following curl command to get the key details of >> a given type I didn't get any response messages as I mentioned above. >> curl -k -H "Authorization: Bearer >> 3abb5d89-ddea-39ae-aca4-c94ec3b4c1d1" >> "https://localhost:9443/api/am/store/v0.11/applications/a2dc >> 9825-8a75-42d5-b1d9-4987612ea8f5/keys/PRODUCTION" >> >> Regards, >> >> Sivaramya Sivanathan >> Associate Software Engineer | WSO2 >> Tel: 0770874960 >> WSO2 Inc : http://wso2.org >> <http://www.google.com/url?q=http%3A%2F%2Fwso2.org&sa=D&sntz=1&usg=AFQjCNE_eTDfyl2ibPcq0hcXvRDNVuQmMg> >> LinkedIn | www.linkedin.com/in/sivaramya >> >> On Fri, Feb 16, 2018 at 10:40 AM, Menaka Jayawardena <men...@wso2.com> >> wrote: >> >>> Hi Sivaramya, >>> >>> The basic information related to getting authorization code generation >>> is in the Getting Started section of the documentation. For every request >>> in the documentation, you have to follow the proper request format as >>> Viduranga has mentioned. >>> >>> @Documenatation Team >>> It's not clear in the API documentation because in Request section it >>> just says, >>> >>> GET https://localhost:9443/api/am/store/v0.11/apis >>> >>> There is no indication about the authorization header or the correct >>> curl. IMO it's better if we could restructure this documentation because it >>> will also be used by the other users as well. As this is an autogenerated >>> doc by the swagger file, we have to modify the swagger file with proper >>> information. >>> >>> Thanks and Regards, >>> Menaka >>> >>> On Fri, Feb 16, 2018 at 10:00 AM, Viduranga Gunarathne < >>> vidura...@wso2.com> wrote: >>> >>>> Hi Sivaramya, >>>> >>>> I checked the store REST API and the specific resource to get the key >>>> details of an individual application that you have mentioned and couldn't >>>> replicate the issue that you stated. >>>> >>>> These are the steps that I followed. >>>> >>>> 1) Obtain the *clientId * and *clientSecret *from the token endpoint >>>> [1] and then get the *accessToken *[1] >>>> 2) Send that access token as a header in the API call >>>> 3) This is the request path that I used >>>> >>>> *https://localhost:9443/api/am/store/v0.11/applications/0bb05b1b-7cde-4797-89bf-967f0fb6a856/keys/PRODUCTION >>>> <https://localhost:9443/api/am/store/v0.11/applications/0bb05b1b-7cde-4797-89bf-967f0fb6a856/keys/PRODUCTION>* >>>> >>>> >>>> Can you please state the exact steps that you followed? >>>> >>>> [1] https://docs.wso2.com/display/AM2xx/apidocs/store/index.html#guide >>>> >>>> Thanks, >>>> Viduranga. >>>> >>>> On Thu, Feb 15, 2018 at 5:36 PM, Sivaramya Sivanathan < >>>> sivara...@wso2.com> wrote: >>>> >>>>> Hi all, >>>>> >>>>> I'm trying to use store REST API to do the following operations using >>>>> the curl command. But for these operations I'm unable to get the response >>>>> (I'm getting empty response). But in APIM 2.1.0 console I'm getting the >>>>> error as [5]. What could be the reason for this? >>>>> >>>>> - Get key details of a given type as in [1] >>>>> - Get scopes associated with a particular application based on >>>>> subscribed APIs as in [2] >>>>> - Update grant types and callback url of an application as in [3] >>>>> - Add new subscriptions (multiple) as in [4] >>>>> >>>>> >>>>> [1] https://docs.wso2.com/display/AM2xx/apidocs/store/index. >>>>> html#!/operations#ApplicationIndividual#applicationsApplicat >>>>> ionIdKeysKeyTypeGet >>>>> >>>>> [2] https://docs.wso2.com/display/AM2xx/apidocs/store/index. >>>>> html#!/operations#ApplicationIndividual#applicationsScopesAp >>>>> plicationIdGet >>>>> >>>>> [3] https://docs.wso2.com/display/AM2xx/apidocs/store/index. >>>>> html#!/operations#ApplicationIndividual#applicationsApplicat >>>>> ionIdKeysKeyTypePut >>>>> <https://docs.wso2.com/display/AM2xx/apidocs/store/index.html#!/operations%23ApplicationIndividual%23applicationsApplicationIdKeysKeyTypePut> >>>>> >>>>> [4]*https://docs.wso2.com/display/AM2xx/apidocs/store/index.html#!/operations#SubscriptionMultitple#subscriptionsMultiplePost >>>>> <https://docs.wso2.com/display/AM2xx/apidocs/store/index.html#!/operations%23SubscriptionMultitple%23subscriptionsMultiplePost>* >>>>> >>>>> [5] >>>>> [2018-02-15 17:31:01,903] WARN - JAXRSUtils No operation matching >>>>> request path "/api/am/store/v0.11/applicati >>>>> ons/a9e14a8b-7906-42e9-9466-132c883db4ce/keys/PRODUCTION" is found, >>>>> Relative Path: /a9e14a8b-7906-42e9-9466-132c883db4ce/keys/PRODUCTION, >>>>> HTTP Method: GET, ContentType: */*, Accept: */*,. Please enable FINE/TRACE >>>>> log level for more details. >>>>> [2018-02-15 17:31:01,904] WARN - WebApplicationExceptionMapper >>>>> javax.ws.rs.ClientErrorException: HTTP 404 Not Found >>>>> at org.apache.cxf.jaxrs.utils.SpecExceptions.toHttpException(Sp >>>>> ecExceptions.java:117) >>>>> at org.apache.cxf.jaxrs.utils.ExceptionUtils.toHttpException(Ex >>>>> ceptionUtils.java:169) >>>>> at org.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRS >>>>> Utils.java:529) >>>>> at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processR >>>>> equest(JAXRSInInterceptor.java:177) >>>>> at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMe >>>>> ssage(JAXRSInInterceptor.java:77) >>>>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase >>>>> InterceptorChain.java:308) >>>>> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(C >>>>> hainInitiationObserver.java:121) >>>>> at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke >>>>> (AbstractHTTPDestination.java:254) >>>>> at org.apache.cxf.transport.servlet.ServletController.invokeDes >>>>> tination(ServletController.java:234) >>>>> at org.apache.cxf.transport.servlet.ServletController.invoke(Se >>>>> rvletController.java:208) >>>>> at org.apache.cxf.transport.servlet.ServletController.invoke(Se >>>>> rvletController.java:160) >>>>> at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke( >>>>> CXFNonSpringServlet.java:180) >>>>> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleR >>>>> equest(AbstractHTTPServlet.java:299) >>>>> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(A >>>>> bstractHTTPServlet.java:223) >>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) >>>>> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service >>>>> (AbstractHTTPServlet.java:274) >>>>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi >>>>> lter(ApplicationFilterChain.java:303) >>>>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App >>>>> licationFilterChain.java:208) >>>>> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilte >>>>> r.java:52) >>>>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi >>>>> lter(ApplicationFilterChain.java:241) >>>>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App >>>>> licationFilterChain.java:208) >>>>> at org.apache.catalina.core.StandardWrapperValve.invoke(Standar >>>>> dWrapperValve.java:218) >>>>> at org.apache.catalina.core.StandardContextValve.invoke(Standar >>>>> dContextValve.java:122) >>>>> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(A >>>>> uthenticatorBase.java:505) >>>>> at org.apache.catalina.core.StandardHostValve.invoke(StandardHo >>>>> stValve.java:169) >>>>> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo >>>>> rtValve.java:103) >>>>> at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInv >>>>> ocation(CompositeValve.java:99) >>>>> at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke >>>>> (CarbonTomcatValve.java:47) >>>>> at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(Tena >>>>> ntLazyLoaderValve.java:57) >>>>> at org.wso2.carbon.event.receiver.core.internal.tenantmgt.Tenan >>>>> tLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48) >>>>> at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invok >>>>> eValves(TomcatValveContainer.java:47) >>>>> at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(Comp >>>>> ositeValve.java:62) >>>>> at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetection >>>>> Valve.invoke(CarbonStuckThreadDetectionValve.java:159) >>>>> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogVa >>>>> lve.java:958) >>>>> at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve. >>>>> invoke(CarbonContextCreatorValve.java:57) >>>>> at org.apache.catalina.core.StandardEngineValve.invoke(Standard >>>>> EngineValve.java:116) >>>>> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd >>>>> apter.java:452) >>>>> at org.apache.coyote.http11.AbstractHttp11Processor.process(Abs >>>>> tractHttp11Processor.java:1087) >>>>> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler >>>>> .process(AbstractProtocol.java:637) >>>>> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun >>>>> (NioEndpoint.java:1756) >>>>> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(N >>>>> ioEndpoint.java:1715) >>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool >>>>> Executor.java:1142) >>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo >>>>> lExecutor.java:617) >>>>> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.r >>>>> un(TaskThread.java:61) >>>>> at java.lang.Thread.run(Thread.java:748) >>>>> >>>>> >>>>> Regards, >>>>> Sivaramya Sivanathan >>>>> Associate Software Engineer | WSO2 >>>>> Tel: 0770874960 >>>>> WSO2 Inc : http://wso2.org >>>>> <http://www.google.com/url?q=http%3A%2F%2Fwso2.org&sa=D&sntz=1&usg=AFQjCNE_eTDfyl2ibPcq0hcXvRDNVuQmMg> >>>>> LinkedIn | www.linkedin.com/in/sivaramya >>>>> >>>> >>>> >>>> >>>> -- >>>> Regards*,* >>>> *Viduranga Gunarathne* >>>> *Software Engineer* >>>> *WSO2 (Pvt) Ltd.* >>>> >>>> *Mobile : *+94712437484 <+94%2071%20243%207484> >>>> *Email : *vidura...@wso2.com >>>> *Web : *http://wso2.com >>>> *Blog : *http://medium.com/@vlgunarathne >>>> <http://wso2.com/signature> >>>> >>> >>> >>> >>> -- >>> *Menaka Jayawardena* >>> *Software Engineer - WSO2 Inc* >>> *Tel : 071 350 5470* >>> *LinkedIn: https://lk.linkedin.com/in/menakajayawardena >>> <https://lk.linkedin.com/in/menakajayawardena>* >>> *Blog: https://menakamadushanka.wordpress.com/ >>> <https://menakamadushanka.wordpress.com/>* >>> >>> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Malintha Amarasinghe > *WSO2, Inc. - lean | enterprise | middleware* > http://wso2.com/ > > Mobile : +94 712383306 <+94%2071%20238%203306> > -- 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