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

The following REST resources are available in WSO2 App Factory.

When you access any 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, a cookie is generated.  If your client manages cookies please skip this step otherwise you need to send this cookie with other API invocations in order to authenticate them.

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  https://appfactorypreview.wso2.com/appmgt/site/blocks/user/login/ajax/login.jag
URI Parametersaction:"login", userName, password
HTTP MethodsPOST
Example

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

Logout

DescriptionLog out of the App Factory
URI  https://appfactorypreview.wso2.com/appmgt/site/blocks/user/logout/ajax/logout.jag
URI Parameters    action:"logout"
HTTP Methods 
Example

 

getApplicationsOfUser

DescriptionGives all the applications of a particular user
URI  https://appfactorypreview.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag
URI Parameters   

action:"getApplicationsOfUser", userName

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

getAppInfo

DescriptionGet information of an application of a particular user
URI  https://appfactorypreview.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag
URI Parameters 

action:"getAppInfo" , applicationKey

HTTP MethodsPOST
Examplecurl -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=getAppInfo&applicationKey=<your_appKey>'

getAllAppVersionsInStages

DescriptionGet versions and repo URLs of all applications of a particular user
URI  https://appfactorypreview.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag
URI Parametersaction:"getAllAppVersionsInStages", userName
HTTP MethodsPOST
Examplecurl -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=getAllAppVersionsInStages&userName=<Your_userName>'

getAppVersionsInStage

Description Get versions and repo URLs of a particular application of a user
URI  https://appfactorypreview.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag
URI Parameters action:"getAppVersionsInStage", userName, stageName, applicationKey
HTTP MethodsPOST
Examplecurl -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=getAppVersionsInStage&userName=< Your_userName >&stageName=Development&applicationKey=<Your_appKey> '

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  https://appfactorypreview.wso2.com/appmgt/site/blocks/application/add/ajax/add.jag
URI Parameters

action:"createNewApplication", userName,applicationKey,applicationName,applicationDescription,applicationType,repositoryType

HTTP MethodsPOST
Example

curl -X POST -k https://appfactorypreview.wso2.com/appmgt/site/blocks/application/add/ajax/add.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie> -d ' action=createNewApplication&userName=<Your_userName>&applicationKey=<Your_ApplicationKey>&applicationName=<Your_ApplicationName>&applicationDescription=<Your_application'sDescription>&applicationType=war&repositoryType=git'

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.
URIhttps://appfactorypreview.wso2.com/appmgt/site/blocks/application/add/ajax/add.jag
URI Parameters  action:"isApplicationKeyAvailable" , applicationKey
HTTP MethodsPOST
Examplecurl -X POST -k https://appfactorypreview.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=<your_appKey>'

repoExists

DescriptionChecks if a repository is available for the particular application. If the repository is available this returns the repository URL of the application
URIhttps://appfactorypreview.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag
URI Parametersaction:"repoExists", applicationKey
HTTP MethodsPOST
Examplecurl -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=repoExists& applicationKey =<Your_ApplicationKey>'

getLatestBuildSuccessInfo

DescriptionThis returns a string with the last SUCCESSFUL build number of the particular application's version.
URI  https://appfactorypreview.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag
URI Parameters action:"getLatestBuildSuccessInfo", stageName, applicationKey, version
HTTP MethodsPOST
Examplecurl -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=getLatestBuildSuccessInfo&applicationKey=<Your_application'sKey>&version=<Your_application's_version>&stage=Development'

updateDescription

DescriptionThis API lets the user to programatically update the description that is associated with a particular application
URI  https://appfactorypreview.wso2.com/appmgt/site/blocks/application/get/ajax/list.jag
URI Parameters    action:"updateDescription", applicationKey, newDescription
HTTP MethodsPOST
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=updateDescription&applicationKey=<Your_applicationKey>&newDescription=<New_Description for the application>.'

getBuildLogsUrl

DescriptionReturns the URL that the build logs of a particular application's version can be obtained. The logs are retrieved as text strings.
URIhttps://appfactorypreview.wso2.com/appmgt/site/blocks/build/get/ajax/get.jag
URI Parameters

action:"getAppInfo" , applicationKey,applicationVersion, lastBuildNo

HTTP MethodsPOST
Examplecurl -X POST -k https://appfactorypreview.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&applicationKey=<Your_applicationKey>&applicationVersion=<Your_applicationVersion>&lastBuildNo=<LatBuildNumber_of_Application's_Version>'

buildinfobyappid

DescriptionReturns build information of the application without considering the particular versions. Therefore this gives an accumulated value of the build numbers. Gives how many builds are in Successful state, how many are in Failed state etc.
URIhttps://appfactorypreview.wso2.com/appmgt/site/blocks/build/list/ajax/list.jag
URI Parameters

action:"buildinfobyappid" , applicationKey,

HTTP MethodsPOST
Examplecurl -X POST -k https://appfactorypreview.wso2.com/appmgt/site/blocks/build/list/ajax/list.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie> -d 'action=buildinfobyappid&applicationKey=<Your_applicationKey>'

getAppVersionsInStagesWithLifeCycleInfo

DescriptionReturns the meta data related to application such as build status information, versions, repoUrls etc along with the life cycle information
URIhttps://appfactorypreview.wso2.com/appmgt/site/blocks/lifecycle/add/ajax/add.jag
URI Parameters

action:"getAppVersionsInStagesWithLifeCycleInfo" , applicationKey,

HTTP MethodsPOST
Examplecurl -X POST -k https://appfactorypreview.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>'

getAllDependencies

DescriptionReturns the property values that are associated with all the environments (Dev, Test, Prod etc) of the particular application
URIhttps://appfactorypreview.wso2.com/appmgt/site/blocks/resources/get/ajax/get.jag
URI Parameters

action:"getAllDependencies" , applicationKey,

HTTP MethodsPOST
Examplecurl -X POST -k https://appfactorypreview.wso2.com/appmgt/site/blocks/resources/get/ajax/get.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie> -d 'action=getAllDependencies&applicationKey= < Your_applicationKey> '

getAppUsersWithRoles

DescriptionReturns the set of users associated with the application along with the role of each user.
URI https://appfactorypreview.wso2.com/appmgt/site/blocks/application/users/get/ajax/list.jag
URI Parameters

action:"getAppUsersWithRoles" , applicationKey,

HTTP MethodsPOST
Examplecurl -X POST -k https://appfactorypreview.wso2.com/appmgt/site/blocks/application/users/get/ajax/list.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie> -d 'action=getAppUsersWithRoles&applicationKey= < Your_applicationKey>'

getAppUsersByRoles

DescriptionReturns the set of user roles associated with the application along with its users.
URI https://appfactorypreview.wso2.com/appmgt/site/blocks/application/users/get/ajax/list.jag
URI Parameters

action:" getAppUsersByRoles " , applicationKey,

HTTP MethodsPOST
Examplecurl -X POST -k https://appfactorypreview.wso2.com/appmgt/site/blocks/application/users/get/ajax/list.jag -H 'Content-Type:application/x-www-form-urlencoded' -H 'Cookie:<obtained_cookie> -d 'action=getAppUsersByRoles&applicationKey= < Your_applicationKey>'
  • No labels