This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • 4.1.x Getting Details of an Application via REST API
Skip to end of metadata
Go to start of metadata

Overview

DescriptionRetrieve details of a specific application.
Resource Path/applications/{applicationId}
HTTP MethodGET
Request/Response Formatapplication/json
> GET /api/applications/single-group-v1 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 12:31:08 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"}
curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://<STRATOS_HOST>:<STRATOS_HTTPS_PORT>/api/applications/{applicationId}

  • 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/single-group-v1
 
CLI commanddescribe-application
DescriptionRetrieve details of an application policy.
Command formatdescribe-application <APPLICATION_ID>

REST API response

HTTP status code

200, 404, 500

See the descriptions of the HTTP status codes here.

Sample JSON 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"
}

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

  • No labels