The List all accessible Environments call returns an array of JSON objects representing each Environment to which the logged-in user has access.


Query:


http://host/dmadminweb/API/Environments[?all=y]


Where:


Host

Is the hostname and port of the DeployHub Server (e.g.: hostname:8080 or for SaaS console.deployhub.com)


If the all parameter is not specified, then only the Environments associated with the user’s home Domain are listed. If the all parameter is specified and is set to “y” then the result includes the Environments included in any accessible Sub-Domains.


Example Result:


{

       "success": true,

       "result": [

               {

                       "Domain": "GLOBAL",

                       "id": 2,

                       "name": "tempenv",

                       "owneruser": "admin",

                       "summary": "temporary for testing",

                       "Applications": [

                               {

                                       "completed": "",

                                       "deploymentid": 0,

                                       "exitcode": 0,

                                       "id": 118,

                                       "name": "AS400App",

                                       "predecessorid": 0,

                                       "versionid": 119,

                                       "versionname": "AS400App;1"

                               }

                               Repeated for each Application in the Environment…

                       ]

               }

               Repeated for each Environment…

       ]

}


success:

Is true or false depending on the success or failure of the query. If success is false, then result is not returned and a text field named “error” is returned instead.

result:

Is a JSON  array of objects, one for each Environment returned by the query (if success is true).



Within each Environment Object:


Applications:

Is an array of objects, one for each Application associated with the Environment.

Domain:

The fully-qualified Domain name of the Domain in which the Environment is located.

Id:

Is the internal ID of the Environment.

Name:

Is the name of the Environment.

owneruser:

If the “owner” of the Environment is a User, then this is the name of the User.

ownergroup:

If the “owner” of the Environment is a User Group, then this is the name of that Group.

Summary:

The summary string associated with the Environment.


Within each Application Object:


deploymentid:

The ID of the last deployment of this Application into the Environment. An ID of 0 indicates that the Application has been manually associated with the Environment.

exitcode:

The exit code of the last deployment of this Application into the Environment.

Id:

The internal object ID of the BASE Application Base Version.

name:

The name of the Application Base Version.

predecessorid:

The ID of the previous Application version if the Application is a version.

completed:

The date/time of the last deployment of this Application into the Environment.

versionname:

The name of the Application version if the Application is a Version.

versionid:

The ID of the Application version if the Application is a Version.