Hi Fathima, I tried the 'getApplicationsOfUser' and it works fine for me.
curl -v -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/user/login/ajax/login.jag -d 'action=login&userName=punnadi.wso2.com@puva6107&password=******' curl -v -X POST https://apps.cloud.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:JSESSIONID=D084797351C4203D850C2D75CD65D4DD' -d 'action=getApplicationsOfUser&userName=punnadi.wso2.com@puva6107' And the output is as follows: [{"key" : "wow", "owner" : "punnadi.wso2.com@puva6107", "type" : "war", "language" : "Java", "mappedSubDomain" : null, "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 2, "typeDisplayName" : "Java Web Application", "isUploadable" : false, "name" : "wow", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : " punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : " [email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : "[email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}, {"key" : "guy", "owner" : "punnadi.wso2.com@puva6107", "type" : "war", "language" : "Java", "mappedSubDomain" : null, "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 3, "typeDisplayName" : "Java Web Application", "isUploadable" : false, "name" : "guy", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : "punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : "[email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : "[email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}, {"key" : "sun", "owner" : "punnadi.wso2.com@puva6107", "type" : "war", "language" : "Java", "mappedSubDomain" : null, "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 1, "typeDisplayName" : "Java Web Application", "isUploadable" : false, "name" : "sun", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : " punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : " [email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : "[email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}, {"key" : "newapp", "owner" : "punnadi.wso2.com@puva6107", "type" : "war", "language" : "Java", "mappedSubDomain" : "newapp.puva6107", "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 3, "typeDisplayName" : "Java Web Application", "isUploadable" : false, "name" : "newapp", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : "punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : "[email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : " [email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}, {"key" : "thilinamekadownload", "owner" : "punnadi.wso2.com@puva6107", "type" : "dbs", "language" : "Java", "mappedSubDomain" : null, "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 1, "typeDisplayName" : "WSO2 Data Service", "isUploadable" : false, "name" : "Thilinamekadownload", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : " punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : " [email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : "[email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}, {"key" : "one", "owner" : "punnadi.wso2.com@puva6107", "type" : "war", "language" : "Java", "mappedSubDomain" : "one.puva6107", "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 1, "typeDisplayName" : "Java Web Application", "isUploadable" : false, "name" : "one", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : "punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : "[email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : "[email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}, {"key" : "two", "owner" : "punnadi.wso2.com@puva6107", "type" : "war", "language" : "Java", "mappedSubDomain" : "two.puva6107", "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 1, "typeDisplayName" : "Java Web Application", "isUploadable" : false, "name" : "two", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : " punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : " [email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : "[email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}, {"key" : "three", "owner" : "punnadi.wso2* Connection #0 to host apps.cloud.wso2.com left intact .com@puva6107", "type" : "war", "language" : "Java", "mappedSubDomain" : "three.puva6107", "customUrl" : null, "customUrlVerificationCode" : null, "description" : null, "repositoryType" : "git", "repositoryTypeDisplayName" : "Git", "branchCount" : 1, "typeDisplayName" : "Java Web Application", "isUploadable" : false, "name" : "three", "repoAccessability" : "perDevRepo", "inProduction" : false, "applicationCreationStatus" : "COMPLETED", "users" : [{"userName" : "punnadi.wso2.com", "firstName" : "$1", "lastName" : "$2", "email" : "[email protected]", "roles" : ["admin", "qa", "cxo", "devops", "appowner", "subscriber", "publisher", "developer", "default", "globalAPIPublisher", "everyone"], "displayName" : " [email protected]", "displayRoles" : ["QA", "CXO", "DevOps", "Application Owner", "Subscriber", "Publisher", "Developer"]}]}] On Tue, Jun 23, 2015 at 9:53 AM, Fathima Dilhasha <[email protected]> wrote: > Hi Punnadi, > > My tenant domain is 'dilhasha@wso2@dilhashan'. > > > Fathima Dilhasha Nazeer <http://lk.linkedin.com/in/dilhasha/> > (M.N.F.Dilhasha) > Undergraduate | Department of Computer Science and Engineering > University of Moratuwa > Sri Lanka > > On Tue, Jun 23, 2015 at 9:48 AM, Punnadi Gunarathna <[email protected]> > wrote: > >> Hi Fathima, >> >> Which tenant domain you are using? >> >> On Tue, Jun 23, 2015 at 9:39 AM, Fathima Dilhasha <[email protected] >> > wrote: >> >>> Hi Punnadi, >>> >>> Thank you. >>> >>> I checked on the jag files also. Seems like everything is fine. But >>> commands like create,delete are relying on some permissions which are not >>> given to me during the curl access. >>> >>> Thanks. >>> Regards, >>> Dilhasha >>> >>> Fathima Dilhasha Nazeer <http://lk.linkedin.com/in/dilhasha/> >>> (M.N.F.Dilhasha) >>> Undergraduate | Department of Computer Science and Engineering >>> University of Moratuwa >>> Sri Lanka >>> >>> On Tue, Jun 23, 2015 at 9:28 AM, Punnadi Gunarathna <[email protected]> >>> wrote: >>> >>>> Hi Fathima, >>>> >>>> I will get back to you on this. >>>> >>>> On Tue, Jun 23, 2015 at 6:07 AM, Fathima Dilhasha < >>>> [email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm facing some problems when accessing the REST API of App Factory >>>>> via curl. I've listed the commands and errors below. >>>>> getApplicationsOfUser >>>>> >>>>> *curl -v -X POST >>>>> https://apps.cloud.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag >>>>> <https://apps.cloud.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag> >>>>> -H 'Content-Type:application/x-www-form-urlencoded' -H >>>>> 'Cookie:<obtained_cookie>' -d >>>>> 'action=getApplicationsOfUser&userName=<username>'* >>>>> >>>>> This returns a blank set [ ] even though there are many apps. Same >>>>> goes with *getAllAppVersionsInStages.* >>>>> >>>>> >>>>> *Application key availability* >>>>> *curl -X POST >>>>> https://apps.cloud.wso2.com/appmgt/site/blocks/application/add/ajax/add.jag >>>>> <https://apps.cloud.wso2.com/appmgt/site/blocks/application/add/ajax/add.jag> >>>>> -H 'Content-Type:application/x-www-form-urlencoded' -H >>>>> 'Cookie:JSESSIONID=A1526A0AC5293FD9F46CD3C2C4628338' -d >>>>> 'action=isApplicationKeyAvailable&applicationKey=<appkey>'* >>>>> >>>>> This returns a message saying *"**You don't have permission to check >>>>> the application key availability"* >>>>> >>>>> And I cannot seem t make a call to *createNewApplication*. >>>>> I cannot figure out the format of the parameters. Can someone share a >>>>> curl command for this? I don't see an example in [1] >>>>> <https://docs.wso2.com/display/AF210/REST+APIs#RESTAPIs-getApplicationsOfUser> >>>>> >>>>> updateDescription >>>>> >>>>> curl -v -X POST -k >>>>> https://apps.cloud.wso2.com/appmgt/site/blocks/application/update/ajax/update.jag >>>>> -H 'Content-Type:application/x-www-form-urlencoded' -H >>>>> 'Cookie:JSESSIONID=8F3297501ACF67780C61E1BEE5422485' -d >>>>> 'action=updateDescription&applicationKey=<appKey>&newDescription=descriptionc' >>>>> >>>>> above command gives an *"Internal Server Error"* >>>>> >>>>> getAppVersionsInStagesWithLifeCycleInfo >>>>> *curl -X POST -k >>>>> https://apps.cloud.wso2.com/appmgt/site/blocks/lifecycle/add/ajax/add.jag >>>>> <https://apps.cloud.wso2.com/appmgt/site/blocks/lifecycle/add/ajax/add.jag> >>>>> -H 'Content-Type:applicion/x-www-form-urlencoded' -H >>>>> 'Cookie:JSESSIONID=8F3297501ACF67780C61E1BEE5422485' -d >>>>> 'action=getAppVersionsInStagesWithLifeCycleInfo&applicationKey=<appKey>'* >>>>> >>>>> This returns a message saying "You don't have permission to life >>>>> cyclec info of application versions" >>>>> >>>>> *deleteApplication* >>>>> curl -X POST -application/x-www-form-urlencoded' -H >>>>> 'Cookie:JSESSIONID=8F3297501ACF67780C61E1BEE5422485' -d >>>>> 'applicationKey=<appKey>&userName=<username>' >>>>> >>>>> This returns a message saying "You don't have permission to delete >>>>> application" >>>>> >>>>> >>>>> Can someone help me on resolving these issues with API access? >>>>> >>>>> [1] >>>>> https://docs.wso2.com/display/AF210/REST+APIs#RESTAPIs-getApplicationsOfUser >>>>> >>>>> >>>>> Thanks. >>>>> Regards, >>>>> Dilhasha >>>>> >>>>> >>>>> >>>>> Fathima Dilhasha Nazeer <http://lk.linkedin.com/in/dilhasha/> >>>>> (M.N.F.Dilhasha) >>>>> Undergraduate | Department of Computer Science and Engineering >>>>> University of Moratuwa >>>>> Sri Lanka >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Thanks and Regards, >>>> >>>> Punnadi Gunarathna >>>> Senior Software Engineer, >>>> WSO2, Inc.; http://wso2.com <http://wso2> >>>> Blog: http://hi-my-world.blogspot.com/ >>>> Tel : 94 11 214 5345 >>>> Fax :94 11 2145300 >>>> >>>> >>>> >>>> <http://lalajisureshika.blogspot.com/> >>>> >>> >>> >> >> >> -- >> Thanks and Regards, >> >> Punnadi Gunarathna >> Senior Software Engineer, >> WSO2, Inc.; http://wso2.com <http://wso2> >> Blog: http://hi-my-world.blogspot.com/ >> Tel : 94 11 214 5345 >> Fax :94 11 2145300 >> >> >> >> <http://lalajisureshika.blogspot.com/> >> > > -- Thanks and Regards, Punnadi Gunarathna Senior Software Engineer, WSO2, Inc.; http://wso2.com <http://wso2> Blog: http://hi-my-world.blogspot.com/ Tel : 94 11 214 5345 Fax :94 11 2145300 <http://lalajisureshika.blogspot.com/>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
