This documentation is for WSO2 App Factory 2.0.0. View documentation for the latest release.
||
Skip to end of metadata
Go to start of metadata

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,

  1. 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.
  2. Set the bold section as the <obtained_cookie> in the following API invocation:
    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

DescriptionLog 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 MethodsPOST
Example

This example shows how to invoke the API in WSO2 App Cloud, which requires the <username> to be the email address with @ replaced by a dot. I.e., if your email is john@gmail.com, then the username must be john.gmail.com.

curl -v -X POST -k https://apps.cloud.wso2.com/appmgt/site/blocks/user/login/ajax/login.jag -d 'action=login&userName=john.gmail.come&password=<your_password>'

Logout

DescriptionLog out of the App Factory
URI <Your hosted App Factory URL>/appmgt/site/blocks/user/logout/ajax/logout.jag
URI Parametersaction:"logout"

getApplicationsOfUser

DescriptionGives 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 MethodsPOST
Example

This example shows how to invoke the API in WSO2 App Cloud, which requires the <username> to be the email address with @ replaced by a dot. I.e., if your email is john@gmail.com, then the username must be john.gmail.com.

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=john.gmail.com'

getAppInfo

DescriptionGet 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 MethodsPOST
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

DescriptionGet 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 Parametersaction:"getAllAppVersionsInStages", userName
HTTP MethodsPOST
Example

This example shows how to invoke the API in WSO2 App Cloud, which requires the <username> to be the email address with @ replaced by a dot. I.e., if your email is john@gmail.com, then the username must be john.gmail.com.

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&userName=john.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 Parametersaction:"getAppVersionsInStage", userName, stageName, applicationKey
HTTP MethodsPOST
Example

This example shows how to invoke the API in WSO2 App Cloud, which requires the <username> to be the email address with @ replaced by a dot. I.e., if your email is john@gmail.com, then the username must be john.gmail.com.

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=john.gmail.com&stageName=Development&applicationKey=app01'

createNewApplication

DescriptionCreates 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 MethodsPOST

isApplicationKeyAvailable

DescriptionChecks 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 Parametersaction:"isApplicationKeyAvailable" , applicationKey
HTTP MethodsPOST
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

DescriptionThis 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 Parametersaction:"getBuildAndDeployStatusForVersion", applicationKey
HTTP MethodsPOST
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

DescriptionThis 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 Parametersaction:"updateDescription", applicationKey, newDescription
HTTP MethodsPOST
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

DescriptionReturns 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 Parametersaction:"getBuildLogsUrl", userName, applicationKey, applicationVersion, lastBuildNo
HTTP MethodsPOST
Example

This example shows how to invoke the API in WSO2 App Cloud, which requires the <username> to be the email address with @ replaced by a dot. I.e., if your email is john@gmail.com, then the username must be john.gmail.com.

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&userName=john.gmail.com&applicationKey=app1&applicationVersion=trunk&lastBuildNo=1'

getAllDependencies

DescriptionReturns 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 Parametersaction:"getAllDependencies", applicationKey
HTTP MethodsPOST
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

DescriptionReturns 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 MethodsPOST
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>'

  • No labels