Overview

DescriptionRetrieve details of all the applications that have been created.
Resource Path/applications
HTTP MethodGET
Request/Response Formatapplication/json
> GET /api/applications HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
>
< HTTP/1.1 200 OK
< Date: Tue, 24 Mar 2015 11:31:24 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Server: WSO2 Carbon Server
<
[{"alias":"my-single-group-v1","applicationId":"single-group-v1","components":{"cartridges":[{"cartridgeMax":1,"cartridgeMin":1,"subscribableInfo":{"alias":"my-tomcat","artifactRepository":{"alias":"my-tomcat","privateRepo":false,"repoPassword":"","repoUrl":"https:\/\/github.com\/imesh\/stratos-tomcat-applications.git","repoUsername":""},"autoscalingPolicy":"autoscaling-policy-1","deploymentPolicy":"deployment-policy-3","maxMembers":0,"minMembers":0},"type":"tomcat"}],"dependencies":{"scalingDependants":{"@xsi.nil":"true"},"startupOrders":["group.my-group6,cartridge.my-tomcat"],"terminationBehaviour":"terminate-none"},"groups":[{"alias":"my-group6","cartridges":[{"cartridgeMax":1,"cartridgeMin":1,"subscribableInfo":{"alias":"my-tomcat1","artifactRepository":{"alias":"my-tomcat1","privateRepo":false,"repoPassword":"","repoUrl":"https:\/\/github.com\/imesh\/stratos-tomcat2-applications.git","repoUsername":""},"autoscalingPolicy":"autoscaling-policy-1","maxMembers":0,"minMembers":0},"type":"tomcat1"}],"groupMaxInstances":3,"groupMinInstances":2,"groupScalingEnabled":false,"name":"group6"}]},"multiTenant":false,"status":"Created"},{"alias":"my-cartridge-group-app","applicationId":"cartridge-group-app","components":{"cartridges":[{"cartridgeMax":4,"cartridgeMin":2,"subscribableInfo":{"alias":"my-tomcat","artifactRepository":{"alias":"my-tomcat","privateRepo":false,"repoPassword":"","repoUrl":"https:\/\/github.com\/imesh\/stratos-tomcat-applications.git","repoUsername":""},"autoscalingPolicy":"autoscaling-policy-1","deploymentPolicy":"deployment-policy-1","maxMembers":0,"minMembers":0},"type":"tomcat"}],"dependencies":{"scalingDependants":{"@xsi.nil":"true"},"startupOrders":[{"@xsi.nil":"true"}],"terminationBehaviour":"terminate-none"},"groups":[{"alias":"my-esb-php-group","cartridges":[{"cartridgeMax":2,"cartridgeMin":1,"subscribableInfo":{"alias":"my-esb","artifactRepository":{"alias":"my-esb","privateRepo":false,"repoPassword":"","repoUrl":"https:\/\/github.com\/imesh\/stratos-esb-applications.git","repoUsername":""},"autoscalingPolicy":"autoscaling-policy-1","deploymentPolicy":"deployment-policy-1","maxMembers":0,"minMembers":0},"type":"esb"},{"cartridgeMax":2,"cartridgeMin":1,"subscribableInfo":{"alias":"my-php","artifactRepository":{"alias":"my-php","privateRepo":false,"repoPassword":"","repoUrl":"https:\/\/github.com\/imesh\/stratos-php-applications.git","repoUsername":""},"autoscalingPolicy":"autoscaling-policy-1","deploymentPolicy":"deployment-policy-1","maxMembers":0,"minMembers":0},"type":"php"}],"groupMaxInstances":2,"groupMinInstances":1,"groupScalingEnabled":false,"name":"esb-php-group"}]},"multiTenant":false,"status":"Created"}]
curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://<STRATOS_HOST>:<STRATOS_HTTPS_PORT>/api/applications

  • By default, <STRATOS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
  • By default, <STRATOS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.

For example:

curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications
 
CLI commandlist-applications
DescriptionRetrieve details of all the applications.
Command formatlist-applications

REST API response

HTTP status code

200, 500

See the descriptions of the HTTP status codes here.

Sample response

[
  {
    "alias": "my-single-group-v1",
    "applicationId": "single-group-v1",
    "components": {
      "cartridges": [
        {
          "cartridgeMax": 1,
          "cartridgeMin": 1,
          "subscribableInfo": {
            "alias": "my-tomcat",
            "artifactRepository": {
              "alias": "my-tomcat",
              "privateRepo": false,
              "repoPassword": "",
              "repoUrl": "https:\/\/github.com\/imesh\/stratos-tomcat-applications.git",
              "repoUsername": ""
            },
            "autoscalingPolicy": "autoscaling-policy-1",
            "deploymentPolicy": "deployment-policy-3",
            "maxMembers": 0,
            "minMembers": 0
          },
          "type": "tomcat"
        }
      ],
      "dependencies": {
        "scalingDependants": {
          "@xsi.nil": "true"
        },
        "startupOrders": [
          "group.my-group6,cartridge.my-tomcat"
        ],
        "terminationBehaviour": "terminate-none"
      },
      "groups": [
        {
          "alias": "my-group6",
          "cartridges": [
            {
              "cartridgeMax": 1,
              "cartridgeMin": 1,
              "subscribableInfo": {
                "alias": "my-tomcat1",
                "artifactRepository": {
                  "alias": "my-tomcat1",
                  "privateRepo": false,
                  "repoPassword": "",
                  "repoUrl": "https:\/\/github.com\/imesh\/stratos-tomcat2-applications.git",
                  "repoUsername": ""
                },
                "autoscalingPolicy": "autoscaling-policy-1",
                "maxMembers": 0,
                "minMembers": 0
              },
              "type": "tomcat1"
            }
          ],
          "groupMaxInstances": 3,
          "groupMinInstances": 2,
          "groupScalingEnabled": false,
          "name": "group6"
        }
      ]
    },
    "multiTenant": false,
    "status": "Created"
  },
  {
    "alias": "my-cartridge-group-app",
    "applicationId": "cartridge-group-app",
    "components": {
      "cartridges": [
        {
          "cartridgeMax": 4,
          "cartridgeMin": 2,
          "subscribableInfo": {
            "alias": "my-tomcat",
            "artifactRepository": {
              "alias": "my-tomcat",
              "privateRepo": false,
              "repoPassword": "",
              "repoUrl": "https:\/\/github.com\/imesh\/stratos-tomcat-applications.git",
              "repoUsername": ""
            },
            "autoscalingPolicy": "autoscaling-policy-1",
            "deploymentPolicy": "deployment-policy-1",
            "maxMembers": 0,
            "minMembers": 0
          },
          "type": "tomcat"
        }
      ],
      "dependencies": {
        "scalingDependants": {
          "@xsi.nil": "true"
        },
        "startupOrders": [
          {
            "@xsi.nil": "true"
          }
        ],
        "terminationBehaviour": "terminate-none"
      },
      "groups": [
        {
          "alias": "my-esb-php-group",
          "cartridges": [
            {
              "cartridgeMax": 2,
              "cartridgeMin": 1,
              "subscribableInfo": {
                "alias": "my-esb",
                "artifactRepository": {
                  "alias": "my-esb",
                  "privateRepo": false,
                  "repoPassword": "",
                  "repoUrl": "https:\/\/github.com\/imesh\/stratos-esb-applications.git",
                  "repoUsername": ""
                },
                "autoscalingPolicy": "autoscaling-policy-1",
                "deploymentPolicy": "deployment-policy-1",
                "maxMembers": 0,
                "minMembers": 0
              },
              "type": "esb"
            },
            {
              "cartridgeMax": 2,
              "cartridgeMin": 1,
              "subscribableInfo": {
                "alias": "my-php",
                "artifactRepository": {
                  "alias": "my-php",
                  "privateRepo": false,
                  "repoPassword": "",
                  "repoUrl": "https:\/\/github.com\/imesh\/stratos-php-applications.git",
                  "repoUsername": ""
                },
                "autoscalingPolicy": "autoscaling-policy-1",
                "deploymentPolicy": "deployment-policy-1",
                "maxMembers": 0,
                "minMembers": 0
              },
              "type": "php"
            }
          ],
          "groupMaxInstances": 2,
          "groupMinInstances": 1,
          "groupScalingEnabled": false,
          "name": "esb-php-group"
        }
      ]
    },
    "multiTenant": false,
    "status": "Created"
  }
]

For information on all the properties that can be used in an application definition, see the Application Resource Definition.

  • No labels