The following APIs are available:
When you access an API other than the login and logout APIs, first invoke the login API to ensure that user is authenticated. When the login API is invoked once, a cookie is generated. If your client has some form of cookie management, please skip this step. If not, you have to send this cookie with other API invocations in order to authenticate.
For example,
- Let's say you invoked the Login API, which shows the following cookie (section in bold) in the output:
Set-Cookie: JSESSIONID=2E80F7137C3DFF21C32046BEE7BDA49D; Path=/appmgt/; Secure; HttpOnly. - Set the bold section as the
<obtained_cookie>
in your API invocation. For example,
curl -X POST -k https://appfactorypreview.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=<your_username>'
Login
Description | Log in to the App Factory |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/user/login/ajax/login.jag |
URI Parameters | action:"login", userName, password |
HTTP Methods | POST |
Example | curl -v -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/user/login/ajax/login.jag -d 'action=login&userName=<your_usernam>&password=<your_password>' |
Logout
Description | Log out of the App Factory |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/user/logout/ajax/logout.jag |
URI Parameters | action:"logout" |
getApplicationsOfUser
Description | Gives all the applications of a particular user |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/get/ajax/list.jag |
URI Parameters | action:"getApplicationsOfUser", userName |
HTTP Methods | POST |
Example | 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:<obtained_cookie>' -d 'action=getApplicationsOfUser&userName=msmshari.q.gmail.com' |
getAppInfo
Description | Get information of an application of a particular user |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/get/ajax/list.jag |
URI Parameters | action:"getAppInfo" , applicationKey |
HTTP Methods | POST |
Example | 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:<obtained_cookie>' -d 'action=getAppInfo&applicationKey=app01' |
getAllAppVersionsInStages
Description | Get versions and repo URLs of all applications of a particular user |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/get/ajax/list.jag |
URI Parameters | action:"getAllAppVersionsInStages", userName |
HTTP Methods | POST |
Example | curl -v -X POST https://apps.cloud.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag -H 'Content-Type:application/x-www-form-urlenco ded' -H 'Cookie:<obtained_cookie>' -d 'action=getAllAppVersionsInStages&userNa me=msmshari.q.gmail.com' |
getAppVersionsInStage
Description | Get versions and repo URLs of a particular application of a user |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/get/ajax/list.jag |
URI Parameters | action:"getAppVersionsInStage", userName, stageName, applicationKey |
HTTP Methods | POST |
Example | curl -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:<obtained_cookie>' -d 'action=getAppVersionsInStage&userName=msmshari.q.gmail.com&stageName=Development&applicationKey=app01'-- |
createNewApplication
Description | Creates a new Application for the particular user. With the application, other associated tool instances too are created such as Build tools (Eg. Jenkins space), Issue Tracking tools (Eg. Redmine space), Repository space (Eg. GIT) etc. |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/add/ajax/add.jag |
URI Parameters | action:"createNewApplication", userName,applicationKey,applicationName,applicationDescription,applicationType,repositoryType |
HTTP Methods | POST |
isApplicationKeyAvailable
Description | Checks if the application key is already available in the system. This functionality is required because, the Application Key should be globally unique. Multiple applications cannot exist with the same key. |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/add/ajax/add.jag |
URI Parameters | action:"isApplicationKeyAvailable" , applicationKey |
HTTP Methods | POST |
Example | curl -X POST https://apps.cloud.wso2.com/appmgt/site/blocks/application/add/ajax/add.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie>' -d 'action=isApplicationKeyAvailable&applicationKey=app01' |
getLatestBuildSuccessInfo
Description | This returns a string with the last SUCCESSFUL build number of the particular application's version. |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/buildandrepo/list/ajax/list.jag |
URI Parameters | action:"getBuildAndDeployStatusForVersion", applicationKey |
HTTP Methods | POST |
Example | curl -v -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/buildandrepo/list/ajax/list.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie>' -d 'action=getBuildAndDeployStatusForVersion&applicationKey=app1&version=trunk' |
updateDescription
Description | This API lets the user to programmatically update the description that is associated with a particular application |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/update/ajax/update.jag |
URI Parameters | action:"updateDescription", applicationKey, newDescription |
HTTP Methods | POST |
Example | 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:<obtained_cookie>' -d 'action=updateDescription&applicationKey=app1&newDescription=test123' |
getBuildLogsUrl
Description | Returns the URL that the build logs of a particular application's version can be obtained. The logs are retrieved as text strings. |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/build/get/ajax/get.jag |
URI Parameters | action:"getBuildLogsUrl", userName, applicationKey, applicationVersion, lastBuildNo |
HTTP Methods | POST |
Example | curl -v -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/build/get/ajax/get.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie>' -d 'action=getBuildLogsUrl&[email protected]&applicationKey=app1&applicationVersion=trunk&lastBuildNo=1' |
getAllDependencies
Description | Returns the property values that are associated with all the environments (Dev, Test, Prod etc) of the particular application |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/resources/registry/get/ajax/get.jag |
URI Parameters | action:"getAllDependencies", applicationKey |
HTTP Methods | POST |
Example | curl -v -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/resources/registry/get/ajax/get.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie>' -d 'action=getAllDependencies&applicationKey=app1' |
getAppVersionsInStagesWithLifeCycleInfo
Description | Returns the metadata related to application such as build status information, versions, repoUrls etc along with the life cycle information |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/lifecycle/add/ajax/add.jag |
URI Parameters | action:"getAppVersionsInStagesWithLifeCycleInfo" , applicationKey, |
HTTP Methods | POST |
Example | curl -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/lifecycle/add/ajax/add.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie>' -d 'action=getAppVersionsInStagesWithLifeCycleInfo&applicationKey=<Your_applicationKey>' |
deleteApplication
Description | Deletes the Application |
URI | <Your hosted App Factory URL>/appmgt/site/blocks/application/delete/ajax/delete.jag |
URI Parameters | applicationKey, userName |
HTTP Methods | POST |
Example | curl -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/application/delete/ajax/delete.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie>' -d 'applicationKey=<Your_applicationKey>&userName=<your_username>' |