environment.Control

environment.control.Others

Estimated reading: 22 minutes 80 views

ChangeTopology (envName, session, [actionkey], env, nodes ) :

Changes topology of the environment.

URL

https://[hoster-api-host]/1.0/environment/control/rest/changetopology

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • actionkey : “string” (optional)

    name of the action and domain name.

  • env : “json”

    JSON object with environment settings:

    {
       "displayName": "string",
       "engine": "string",
       "ishaenabled": "boolean",
       "region": "string",
       "shortdomain": "string",
       "sslstate": "boolean"
    }
  • nodes : “json”

    JSON object with a list of environment nodes and their settings:

    [ 
    {
       "count": "int",
       "displayName": "string",
       "docker": {
          "cmd": "string",
          "env": {
             "String": "string"
          },
          "image": "string",
          "links": [
             "string",
             "..."
          ],
          "nodeGroup": "string",
          "registry": {
             "password": "string",
             "url": "string",
             "user": "string"
          }
       },
       "extip": "boolean",
       "fixedCloudlets": "int",
       "flexibleCloudlets": "int",
       "nodeType": "string"
    },
    "..."
    ]

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/changetopology?nodes=[json]&envName=[string]&session=[string]&actionkey=[string]&env=[json]

Response

  • ScriptEvalResponse
    stdClass Object
    (
        [result] => 0
        [response] => stdClass Object
            (
                [result] => "int"
                [response] => stdClass Object
                    (
                        [result] => "int"
                        [response] => 
                        [source] => "string"
                        [time] => "int"
                        [error] =>"string"
                    )
    
                [methodName] => "string"
                [source] => "string"
                [time] => "int"
                [error] => "string"
                [params] => stdClass Object
                    (
                        [params] => stdClass Object
                            (
                                [deferCheckQuotas] => "int"
                                [ishaenabled] => "int"
                                [fakeId] => "string"
                                [startServiceOnCreation] => "int"
                                [scalingMode] => 
                                [shortdomain] => "string"
                                [sslstate] => "int"
                                [nodeGroup] => "string"
                                [startService] => "int"
                                [engine] => "string"
                                [actionkey] => "string"
                                [__prepareNode__] => "int"
                                [targetAppid] => "string"
                                [region] => "string"
    ) [script] => "string" ) ) )

CheckMigrationPossibility (envName, session, [hardwareNodeGroup] ) : Response

Checks the possibility of migration for the environment.

URL

https://[hoster-api-host]/1.0/environment/control/rest/checkmigrationpossibility

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • hardwareNodeGroup : “string” (optional)

    unique identifier of the target region (host group).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/checkmigrationpossibility?envName=[string]&session=[string]&hardwareNodeGroup=[string]

Response

  • Response
    {
       "error": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

ClearLog (envName, session, nodeId, path ) :

Clears the log file.

URL

https://[hoster-api-host]/1.0/environment/control/rest/clearlog

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeId : “int”

    unique identifier of the target node (container).

  • path : “string”

    path to the target log file.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/clearlog?path=[string]&envName=[string]&session=[string]&nodeId=[int]

Response

  • Response
    {
       "error": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

ResetServicePassword (envName, session, [nodeGroup], [nodeId], [password] ) : Response

Resets an admin password to the container’s main service (e.g. for database).

URL

https://[hoster-api-host]/1.0/environment/control/rest/resetservicepassword

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeGroup : “string” (optional)

    unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.

  • nodeId : “int” (optional)

    unique identifier of the target node (container).

  • password : “string” (optional)

    a new admin password for the container’s service.

Example

Method: POST

POST https://[hoster-api-host]/1.0/environment/control/rest/resetservicepassword?password=[string]&envName=[string]&session=[string]&nodeGroup=[string]&nodeId=[int]

Response

  • Response
    {
       "error": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

EditRegistryCredentials (appid, session, filter, [user], [password] ) :

Updates access credentials for the projects from custom Docker registries.

URL

https://[hoster-api-host]/1.0/environment/control/rest/editregistrycredentials

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”
  • filter : “json”

    JSON object to list parameters that need to be updated:

    {
       "envName": "string",
       "nodeGroup": "string",
       "registryRepo" (optional) : "string",
       "registryUrl" (optional) : "string",
       "registryUser" (optional) : "string"
    }
  • user : “string” (optional)

    new username to access remote registry.

  • password : “string” (optional)

    new password to access remote registry.

Example

Method: POST

POST https://[hoster-api-host]/1.0/environment/control/rest/editregistrycredentials?filter=[json]&password=[string]&session=[string]&appid=[string]&user=[string]

Response

  • ObjectsCountResponse
    {
       "count": "long",
       "error": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

ExecCmdByGroup (envName, session, nodeGroup, commandList, [sayYes], [async] ) :

Runs provided commands on all nodes (containers) of the node group (layer).

URL

https://[hoster-api-host]/1.0/environment/control/rest/execcmdbygroup

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeGroup : “string”

    unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.

  • commandList : “json”

    JSON object with a list of commands to execute on the layer:

    [ 
    {
       "command": "string",
       "params": "string"
    },
    "..."
    ]
  • sayYes : “boolean” (optional)

    defines whether to automatically confirm any operation if prompted (true) or not (false).

  • async : “boolean” (optional)

    defines whether to run provided commands simultaneously (true) or one-by-one (false).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/execcmdbygroup?sayYes=[boolean]&async=[boolean]&envName=[string]&session=[string]&commandList=[json]&nodeGroup=[string]

Response

  • ExecResponse
    {
       "error": "string",
       "reason": "int",
       "responses": [
          {
             "errOut": "string",
             "error": "string",
             "exitStatus": "int",
             "name": "string",
             "nodeId": "int",
             "out": "string",
             "reason": "int",
             "result": "int",
             "source": "string"
          },
          "..."
       ],
       "result": "int",
       "source": "string"
    }
    

ExecCmdById (envName, session, nodeId, commandList, [sayYes] ) :

Runs provided commands on the specified node (container).

URL

https://[hoster-api-host]/1.0/environment/control/rest/execcmdbyid

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeId : “int”

    unique identifier of the target node (container).

  • commandList : “json”

    JSON object with a list of commands to execute on the node:

    [ 
    {
       "command": "string",
       "params": "string"
    },
    "..."
    ]
  • sayYes : “boolean” (optional)

    defines whether to automatically confirm any operation if prompted (true) or not (false).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/execcmdbyid?sayYes=[boolean]&envName=[string]&session=[string]&commandList=[json]&nodeId=[int]

Response

  • ExecResponse
    {
       "error": "string",
       "reason": "int",
       "responses": [
          {
             "errOut": "string",
             "error": "string",
             "exitStatus": "int",
             "name": "string",
             "nodeId": "int",
             "out": "string",
             "reason": "int",
             "result": "int",
             "source": "string"
          },
          "..."
       ],
       "result": "int",
       "source": "string"
    }
    

GetAllSumStatByUid (session, [duration], [endtime] ) :

Returns resource usage statistics for the specified user over the given period.

URL

https://[hoster-api-host]/1.0/environment/control/rest/getallsumstatbyuid

Parameters

  • session : “string”
  • duration : “long” (optional)

    period (in seconds) to show statistics for.

  • endtime : “string” (optional)

    end time (UTC) in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00” (duration must be passed).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getallsumstatbyuid?duration=[long]&session=[string]&endtime=[string]

Response

  • EnvironmentsStatisticResponse
    {
       "error": "string",
       "reason": "int",
       "responses": [
          {
             "appid": "string",
             "error": "string",
             "isTransferring": "boolean",
             "reason": "int",
             "result": "int",
             "source": "string",
             "stats": [
                {
                   "cpu": "int",
                   "disk": "int",
                   "disk_io_used": "int",
                   "duration": "int",
                   "envId": "string",
                   "iops_used": "int",
                   "mem": "int",
                   "netInExt": "long",
                   "netInInt": "long",
                   "netOutExt": "long",
                   "netOutInt": "long"
                },
                "..."
             ],
             "status": "int"
          },
          "..."
       ],
       "result": "int",
       "source": "string"
    }
    

GetLogsList (envName, session, nodeId, [path] ) :

Returns a structured list of the log files.

URL

https://[hoster-api-host]/1.0/environment/control/rest/getlogslist

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeId : “int”

    unique identifier of the target node (container).

  • path : “string” (optional)

    custom path to the log files (/var/log by default).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getlogslist?path=[string]&envName=[string]&session=[string]&nodeId=[int]

Response

  • LogsListResponse
    {
       "directories": {
          "(key) string": "(value) [{\"absolutePath\":\"string\",\"fileType\":\"string\",\"isDir\":\"boolean\",\"isExported\":\"boolean\",\"isRoot\":\"boolean\",\"lastModified\":\"string\",\"length\":\"long\",\"name\":\"string\",\"permission\":\"string\",\"protocol\":\"string\",\"sourceHost\":\"string\",\"sourceNodeId\":\"int\",\"sourcePath\":\"string\"},\"...\"]",
          "...": "..."
       },
       "error": "string",
       "groups": {
          "(key) string": "(value) [{\"absolutePath\":\"string\",\"fileType\":\"string\",\"isDir\":\"boolean\",\"isExported\":\"boolean\",\"isRoot\":\"boolean\",\"lastModified\":\"string\",\"length\":\"long\",\"name\":\"string\",\"permission\":\"string\",\"protocol\":\"string\",\"sourceHost\":\"string\",\"sourceNodeId\":\"int\",\"sourcePath\":\"string\"},\"...\"]",
          "...": "..."
       },
       "path": "string",
       "reason": "int",
       "result": "int",
       "rotatedLogs": {
          "(key) string": "(value) [\"RemouteFile\",\"...\"]",
          "...": "..."
       },
       "source": "string"
    }
    

GetRegions (appid, session ) :

Returns a list of all the regions available for the user.

URL

https://[hoster-api-host]/1.0/environment/control/rest/getregions

Parameters

  • appid : “string” (optional)

    unique identifier of the target application (required for authentication).

  • session : “string”

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getregions?session=[string]&appid=[string]

Response

  • ArrayResponse
    {
    "array": [
    {
    "comment": "string",
    "connected": "boolean",
    "displayName": "string",
    "dockerHost": "string",
    "dockerLogin": "string",
    "dockerPassword": "string",
    "dockerSSHPort": "int",
    "dockerSshKey": "string",
    "dockerTCPPort": "int",
    "domain": "string",
    "domains": [
    {
    "domain": "string",
    "isPrimary": "boolean",
    "region": {
    "comment": "string",
    "connected": "boolean",
    "displayName": "string",
    "dockerHost": "string",
    "dockerLogin": "string",
    "dockerPassword": "string",
    "dockerSSHPort": "int",
    "dockerSshKey": "string",
    "dockerTCPPort": "int",
    "domain": "string",
    "domains": [
    {
    "domain": "string",
    "isPrimary": "boolean",
    "region": "Region",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "CONFIGURING(0) | CONFIGURING_FAILED(1) | ADDING_FAILED(2) | ACTIVE(3) | DEACTIVATING(4) | DEACTIVATING_FAILED(5) | SET_PRIMARY_FAILED(6) | INACTIVE(7)"
    },
    "..."
    ],
    "hardwareNodeGroups": [
    "HardwareNodeGroup",
    "..."
    ],
    "ipRange": "string",
    "isDefault": "boolean",
    "isMigrationAllowed": "boolean",
    "ospfArea": "int",
    "ospfKey": "string",
    "shortUniqueName": "string",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "stubnets": "string",
    "subnet": "string",
    "uniqueName": "string"
    },
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "CONFIGURING(0) | CONFIGURING_FAILED(1) | ADDING_FAILED(2) | ACTIVE(3) | DEACTIVATING(4) | DEACTIVATING_FAILED(5) | SET_PRIMARY_FAILED(6) | INACTIVE(7)"
    },
    "..."
    ],
    "hardwareNodeGroups": [
    {
    "comment": "string",
    "data": "string",
    "description": "string",
    "displayName": "string",
    "endpoints": [
    {
    "address": "string",
    "credentials": {
    "login": "string",
    "sshKey": "string"
    },
    "data": "string",
    "hostGroup": {
    "comment": "string",
    "data": "string",
    "description": "string",
    "displayName": "string",
    "endpoints": [
    "HostGroupEndpoint",
    "..."
    ],
    "engine": "PAAS(0) | VHI(1) | S3(2) | VCLOUD(3) | ANY(4)",
    "iconsData": "string",
    "isDefault": "boolean",
    "isEnabled": "boolean",
    "l3Group": "string",
    "metadata": "string",
    "osTypes": [
    "OSType",
    "..."
    ],
    "regionUniqueName": "string",
    "shortDescription": "string",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "uniqueName": "string",
    "vTypes": [
    "VType",
    "..."
    ],
    "vzType": "int",
    "vzTypes": [
    "int",
    "..."
    ]
    },
    "type": "RABBITMQ(0) | VHI_API(1) | VHI_ADMIN_API(2) | S3_ENDPOINT(3) | SSP_PANEL(4) | UNKNOWN(5)"
    },
    "..."
    ],
    "engine": "PAAS(0) | VHI(1) | S3(2) | VCLOUD(3) | ANY(4)",
    "iconsData": "string",
    "isDefault": "boolean",
    "isEnabled": "boolean",
    "l3Group": "string",
    "metadata": "string",
    "osTypes": [
    "OSType",
    "..."
    ],
    "regionUniqueName": "string",
    "shortDescription": "string",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "uniqueName": "string",
    "vTypes": [
    "VType",
    "..."
    ],
    "vzType": "int",
    "vzTypes": [
    "int",
    "..."
    ]
    },
    "..."
    ],
    "ipRange": "string",
    "isDefault": "boolean",
    "isMigrationAllowed": "boolean",
    "ospfArea": "int",
    "ospfKey": "string",
    "shortUniqueName": "string",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "stubnets": "string",
    "subnet": "string",
    "uniqueName": "string"
    },
    "..."
    ],
    "className": "Class",
    "error": "string",
    "name": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

GetRegionsInner (appid, session, groupName, [isEnabled] ) :

Returns a list of all the regions available for the user group (trial, beta, billing, etc.).

URL

https://[hoster-api-host]/1.0/environment/control/rest/getregionsinner

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”
  • groupName : “string”

    unique identifier of the target user group.

  • isEnabled : “boolean” (optional)

    defines whether to include only active regions (true) or not (false).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getregionsinner?groupName=[string]&session=[string]&appid=[string]&isEnabled=[boolean]

Response

  • ArrayResponse
    {
    "array": [
    {
    "comment": "string",
    "connected": "boolean",
    "displayName": "string",
    "dockerHost": "string",
    "dockerLogin": "string",
    "dockerPassword": "string",
    "dockerSSHPort": "int",
    "dockerSshKey": "string",
    "dockerTCPPort": "int",
    "domain": "string",
    "domains": [
    {
    "domain": "string",
    "isPrimary": "boolean",
    "region": {
    "comment": "string",
    "connected": "boolean",
    "displayName": "string",
    "dockerHost": "string",
    "dockerLogin": "string",
    "dockerPassword": "string",
    "dockerSSHPort": "int",
    "dockerSshKey": "string",
    "dockerTCPPort": "int",
    "domain": "string",
    "domains": [
    {
    "domain": "string",
    "isPrimary": "boolean",
    "region": "Region",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "CONFIGURING(0) | CONFIGURING_FAILED(1) | ADDING_FAILED(2) | ACTIVE(3) | DEACTIVATING(4) | DEACTIVATING_FAILED(5) | SET_PRIMARY_FAILED(6) | INACTIVE(7)"
    },
    "..."
    ],
    "hardwareNodeGroups": [
    "HardwareNodeGroup",
    "..."
    ],
    "ipRange": "string",
    "isDefault": "boolean",
    "isMigrationAllowed": "boolean",
    "ospfArea": "int",
    "ospfKey": "string",
    "shortUniqueName": "string",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "stubnets": "string",
    "subnet": "string",
    "uniqueName": "string"
    },
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "CONFIGURING(0) | CONFIGURING_FAILED(1) | ADDING_FAILED(2) | ACTIVE(3) | DEACTIVATING(4) | DEACTIVATING_FAILED(5) | SET_PRIMARY_FAILED(6) | INACTIVE(7)"
    },
    "..."
    ],
    "hardwareNodeGroups": [
    {
    "comment": "string",
    "data": "string",
    "description": "string",
    "displayName": "string",
    "endpoints": [
    {
    "address": "string",
    "credentials": {
    "login": "string",
    "sshKey": "string"
    },
    "data": "string",
    "hostGroup": {
    "comment": "string",
    "data": "string",
    "description": "string",
    "displayName": "string",
    "endpoints": [
    "HostGroupEndpoint",
    "..."
    ],
    "engine": "PAAS(0) | VHI(1) | S3(2) | VCLOUD(3) | ANY(4)",
    "iconsData": "string",
    "isDefault": "boolean",
    "isEnabled": "boolean",
    "l3Group": "string",
    "metadata": "string",
    "osTypes": [
    "OSType",
    "..."
    ],
    "regionUniqueName": "string",
    "shortDescription": "string",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "uniqueName": "string",
    "vTypes": [
    "VType",
    "..."
    ],
    "vzType": "int",
    "vzTypes": [
    "int",
    "..."
    ]
    },
    "type": "RABBITMQ(0) | VHI_API(1) | VHI_ADMIN_API(2) | S3_ENDPOINT(3) | SSP_PANEL(4) | UNKNOWN(5)"
    },
    "..."
    ],
    "engine": "PAAS(0) | VHI(1) | S3(2) | VCLOUD(3) | ANY(4)",
    "iconsData": "string",
    "isDefault": "boolean",
    "isEnabled": "boolean",
    "l3Group": "string",
    "metadata": "string",
    "osTypes": [
    "OSType",
    "..."
    ],
    "regionUniqueName": "string",
    "shortDescription": "string",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "uniqueName": "string",
    "vTypes": [
    "VType",
    "..."
    ],
    "vzType": "int",
    "vzTypes": [
    "int",
    "..."
    ]
    },
    "..."
    ],
    "ipRange": "string",
    "isDefault": "boolean",
    "isMigrationAllowed": "boolean",
    "ospfArea": "int",
    "ospfKey": "string",
    "shortUniqueName": "string",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "stubnets": "string",
    "subnet": "string",
    "uniqueName": "string"
    },
    "..."
    ],
    "className": "Class",
    "error": "string",
    "name": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

GetRegistryInfo (envName, session, nodeGroup ) :

Returns information on the remote Docker registry for the projects deployed to the specified node group (layer).

URL

https://[hoster-api-host]/1.0/environment/control/rest/getregistryinfo

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeGroup : “string”

    unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getregistryinfo?envName=[string]&session=[string]&nodeGroup=[string]

Response

  • RegistryInfoResponse
    {
    "error": "string",
    "reason": "int",
    "repo": "string",
    "result": "int",
    "source": "string",
    "url": "string",
    "user": "string"
    }
    

GetSSHAccessInfo (appid, session, nodeId ) :

Returns information on a node via SSH configuration.

URL

https://[hoster-api-host]/1.0/environment/control/rest/getsshaccessinfo

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”
  • nodeId : “int”

    unique identifier of the target node (container).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getsshaccessinfo?session=[string]&appid=[string]&nodeId=[int]

Response

  • SoftwareNodeResponse
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "softNode": {
    "activeEngine": {
    "keyword": "string",
    "name": "string",
    "packageName": "string",
    "type": "string",
    "vcsSupport": "boolean",
    "version": "string"
    },
    "addons": [
    {
    "appTemplateId": "string",
    "uniqueName": "string"
    },
    "..."
    ],
    "address": "string",
    "adminUrl": "string",
    "adminUrls": "string",
    "bandwidthLimit": "int",
    "buildCustomData": "string",
    "clustergroupid": "int",
    "credential": {
    "login": "string",
    "sshKey": "string"
    },
    "ctid": "int",
    "customItem": "string",
    "diskIoLimit": "int",
    "diskIopsLimit": "int",
    "diskLimit": "int",
    "displayName": "string",
    "endpoints": [
    {
    "domain": "string",
    "name": "string",
    "nodeId": "int",
    "privatePort": "int",
    "protocol": "TCP(0) | UDP(1)",
    "publicPort": "int"
    },
    "..."
    ],
    "engineType": "string",
    "engines": [
    {
    "keyword": "string",
    "name": "string",
    "packageName": "string",
    "type": "string",
    "vcsSupport": "boolean",
    "version": "string"
    },
    "..."
    ],
    "envId": "string",
    "extIps": [
    {
    "appid": "string",
    "domain": "string",
    "ipAddress": "string",
    "isBusy": "boolean",
    "regionUniqueNames": [
    {
    "comment": "string",
    "connected": "boolean",
    "displayName": "string",
    "dockerHost": "string",
    "dockerLogin": "string",
    "dockerPassword": "string",
    "dockerSSHPort": "int",
    "dockerSshKey": "string",
    "dockerTCPPort": "int",
    "domain": "string",
    "domains": [
    {
    "domain": "string",
    "isPrimary": "boolean",
    "region": {
    "comment": "string",
    "connected": "boolean",
    "displayName": "string",
    "dockerHost": "string",
    "dockerLogin": "string",
    "dockerPassword": "string",
    "dockerSSHPort": "int",
    "dockerSshKey": "string",
    "dockerTCPPort": "int",
    "domain": "string",
    "domains": [
    {
    "domain": "string",
    "isPrimary": "boolean",
    "region": "Region",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "CONFIGURING(0) | CONFIGURING_FAILED(1) | ADDING_FAILED(2) | ACTIVE(3) | DEACTIVATING(4) | DEACTIVATING_FAILED(5) | SET_PRIMARY_FAILED(6) | INACTIVE(7)"
    },
    "..."
    ],
    "hardwareNodeGroups": [
    "HardwareNodeGroup",
    "..."
    ],
    "ipRange": "string",
    "isDefault": "boolean",
    "isMigrationAllowed": "boolean",
    "ospfArea": "int",
    "ospfKey": "string",
    "shortUniqueName": "string",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "stubnets": "string",
    "subnet": "string",
    "uniqueName": "string"
    },
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "CONFIGURING(0) | CONFIGURING_FAILED(1) | ADDING_FAILED(2) | ACTIVE(3) | DEACTIVATING(4) | DEACTIVATING_FAILED(5) | SET_PRIMARY_FAILED(6) | INACTIVE(7)"
    },
    "..."
    ],
    "hardwareNodeGroups": [
    {
    "comment": "string",
    "data": "string",
    "description": "string",
    "displayName": "string",
    "endpoints": [
    {
    "address": "string",
    "credentials": {
    "login": "string",
    "sshKey": "string"
    },
    "data": "string",
    "hostGroup": {
    "comment": "string",
    "data": "string",
    "description": "string",
    "displayName": "string",
    "endpoints": [
    "HostGroupEndpoint",
    "..."
    ],
    "engine": "PAAS(0) | VHI(1) | S3(2) | VCLOUD(3) | ANY(4)",
    "iconsData": "string",
    "isDefault": "boolean",
    "isEnabled": "boolean",
    "l3Group": "string",
    "metadata": "string",
    "osTypes": [
    "OSType",
    "..."
    ],
    "regionUniqueName": "string",
    "shortDescription": "string",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "uniqueName": "string",
    "vTypes": [
    "VType",
    "..."
    ],
    "vzType": "int",
    "vzTypes": [
    "int",
    "..."
    ]
    },
    "type": "RABBITMQ(0) | VHI_API(1) | VHI_ADMIN_API(2) | S3_ENDPOINT(3) | SSP_PANEL(4) | UNKNOWN(5)"
    },
    "..."
    ],
    "engine": "PAAS(0) | VHI(1) | S3(2) | VCLOUD(3) | ANY(4)",
    "iconsData": "string",
    "isDefault": "boolean",
    "isEnabled": "boolean",
    "l3Group": "string",
    "metadata": "string",
    "osTypes": [
    "OSType",
    "..."
    ],
    "regionUniqueName": "string",
    "shortDescription": "string",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "uniqueName": "string",
    "vTypes": [
    "VType",
    "..."
    ],
    "vzType": "int",
    "vzTypes": [
    "int",
    "..."
    ]
    },
    "..."
    ],
    "ipRange": "string",
    "isDefault": "boolean",
    "isMigrationAllowed": "boolean",
    "ospfArea": "int",
    "ospfKey": "string",
    "shortUniqueName": "string",
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "CUSTOM(0) | LETSENCRYPT(1)",
    "status": "ACTIVE(0) | MAINTENANCE(1)",
    "stubnets": "string",
    "subnet": "string",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "IPV4(0) | IPV6(1)"
    },
    "..."
    ],
    "features": [
    {
    "name": "FIREWALL(0)"
    },
    "..."
    ],
    "fixedCloudlets": "int",
    "flexibleCloudlets": "int",
    "guestOSType": "LINUX(0) | WINDOWS2008(1) | WINDOWS2012(2) | WINDOWS2016(3) | WINDOWS2019(4)",
    "hn": "HardwareNode",
    "hostGroupDisplayName": "string",
    "hostGroupUniqName": "string",
    "hostOSType": "LINUX(0) | WINDOWS2008(1) | WINDOWS2012(2) | WINDOWS2016(3) | WINDOWS2019(4)",
    "intIP": "string",
    "isMaster": "boolean",
    "maxchanks": "int",
    "messages": [
    {
    "action": "string",
    "actionId": "int",
    "data": "string",
    "type": "WARNING(0) | INFO(1)"
    },
    "..."
    ],
    "nodeGroup": "string",
    "nodeTypeAlias": "string",
    "osType": "LINUX(0) | WINDOWS2008(1) | WINDOWS2012(2) | WINDOWS2016(3) | WINDOWS2019(4)",
    "packages": [
    {
    "actions": [
    {
    "id": "int",
    "keyword": "string",
    "name": "string",
    "useObjectHash": "boolean"
    },
    "..."
    ],
    "description": "string",
    "documentationUrl": "string",
    "emailTemplate": "string",
    "iconUrl": "string",
    "isInstalled": "boolean",
    "keyword": "string",
    "name": "string",
    "packageName": "string",
    "reconfigureFirewall": "boolean",
    "requirements": [
    {
    "id": "int",
    "keyword": "string",
    "name": "string",
    "useObjectHash": "boolean"
    },
    "..."
    ],
    "user": "string"
    },
    "..."
    ],
    "primaryIpv4": {
    "appid": "string",
    "domain": "string",
    "ipAddress": "string",
    "isBusy": "boolean",
    "regionUniqueNames": [
    "Region",
    "..."
    ],
    "type": "IPV4(0) | IPV6(1)"
    },
    "primaryIpv6": {
    "appid": "string",
    "domain": "string",
    "ipAddress": "string",
    "isBusy": "boolean",
    "regionUniqueNames": [
    "Region",
    "..."
    ],
    "type": "IPV4(0) | IPV6(1)"
    },
    "softNodeGroup": {
    "deployments": [
    {
    "archiveName": "string",
    "context": "string",
    "type": "ARCHIVE(0) | GIT(1) | SVN(2)"
    },
    "..."
    ],
    "isSLBAccessEnabled": "boolean",
    "isSequentialDeploy": "boolean",
    "name": "string",
    "redeployContainerDelay": "int",
    "redeployContextDelay": "int",
    "restartContainerDelay": "int",
    "restartNodeDelay": "int",
    "scalingMode": "STATELESS(0) | STATEFUL(1)",
    "templateType": "ALL(0) | NATIVE(1) | CARTRIDGE(2) | DOCKER(3) | DOCKERIZED(4) | OS(5)",
    "vType": "CT(0) | VM(1)"
    },
    "uid": "int",
    "url": "string",
    "vType": "CT(0) | VM(1)",
    "vmMemory": "double",
    "vmVCPU": "int"
    },
    "source": "string"
    }
    

GetSoftwarePackages (envName, session, [nodeType], [nodeGroup] ) :

Returns a list of software packages installed for the target layer or container type.

URL

https://[hoster-api-host]/1.0/environment/control/rest/getsoftwarepackages

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeType : “string” (optional)

    unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack.

  • nodeGroup : “string” (optional)

    unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getsoftwarepackages?envName=[string]&session=[string]&nodeType=[string]&nodeGroup=[string]

Response

  • ArrayResponse
    {
    "array": [
    {
    "actions": [
    {
    "id": "int",
    "keyword": "string",
    "name": "string",
    "useObjectHash": "boolean"
    },
    "..."
    ],
    "description": "string",
    "documentationUrl": "string",
    "emailTemplate": "string",
    "iconUrl": "string",
    "isInstalled": "boolean",
    "keyword": "string",
    "name": "string",
    "packageName": "string",
    "reconfigureFirewall": "boolean",
    "requirements": [
    {
    "id": "int",
    "keyword": "string",
    "name": "string",
    "useObjectHash": "boolean"
    },
    "..."
    ],
    "user": "string"
    },
    "..."
    ],
    "className": "Class",
    "error": "string",
    "name": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

GetStats (envName, session, duration, interval, [endtime], [nodeid], [nodetype], [nodeGroup] ) :

Returns resource consumption statistics for the specified environment. Average consumption for each interval of the given period is provided.

URL

https://[hoster-api-host]/1.0/environment/control/rest/getstats

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • duration : “long”

    period (in seconds) to show statistics for.

  • interval : “int”

    interval (in seconds) to divide the stated period (duration).

  • endtime : “string” (optional)

    end time (UTC) in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00” (duration must be passed).

  • nodeid : “int” (optional)

    unique identifier of the target node (container).

  • nodetype : “string” (optional)

    unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. Required if nodeid is not specified.

  • nodeGroup : “string” (optional)

    unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getstats?duration=[long]&nodetype=[string]&envName=[string]&session=[string]&endtime=[string]&interval=[int]&nodeid=[int]&nodeGroup=[string]

Response

  • EnvironmentStatisticResponse
    {
    "appid": "string",
    "error": "string",
    "isTransferring": "boolean",
    "reason": "int",
    "result": "int",
    "source": "string",
    "stats": [
    {
    "cpu": "int",
    "disk": "int",
    "disk_io_used": "int",
    "duration": "int",
    "envId": "string",
    "iops_used": "int",
    "mem": "int",
    "netInExt": "long",
    "netInInt": "long",
    "netOutExt": "long",
    "netOutInt": "long"
    },
    "..."
    ],
    "status": "int"
    }
    

GetSumStat (envName, session, duration, [endtime] ) :

Returns resource usage statistics for the specified environment over the given period.

URL

https://[hoster-api-host]/1.0/environment/control/rest/getsumstat

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • duration : “long”

    period (in seconds) to show statistics for.

  • endtime : “string” (optional)

    end time (UTC) in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00” (duration must be passed).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/getsumstat?duration=[long]&envName=[string]&session=[string]&endtime=[string]

Response

  • EnvironmentStatisticResponse
    {
    "appid": "string",
    "error": "string",
    "isTransferring": "boolean",
    "reason": "int",
    "result": "int",
    "source": "string",
    "stats": [
    {
    "cpu": "int",
    "disk": "int",
    "disk_io_used": "int",
    "duration": "int",
    "envId": "string",
    "iops_used": "int",
    "mem": "int",
    "netInExt": "long",
    "netInInt": "long",
    "netOutExt": "long",
    "netOutInt": "long"
    },
    "..."
    ],
    "status": "int"
    }
    

GetTemplateManifest (appid, session, nodeType, tag ) :

Returns a manifest file for the container’s base template.

URL

https://[hoster-api-host]/1.0/environment/control/rest/gettemplatemanifest

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”
  • nodeType : “string”

    unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack.

  • tag : “string”

    target tag for the template.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/gettemplatemanifest?session=[string]&appid=[string]&tag=[string]&nodeType=[string]

Response

  • ObjectResponse
    Array
    (
    [result] => 0
    [object] => Array
    (
    [Architecture] => "string"
    [workdir] => 
    [os] => "string"
    [entrypoint] => 
    [created] => "Timestamp"
    [volumes] => 
    [id] => "string"
    [cmd] => Array
    (
    [0] => "string"
    )
    [env] => Array
    (
    [0] => "string"
    "..."
    )
    [labels] => Array
    (
    [org.label-schema.vendor] => "string"
    [description] => "string"
    [org.opencontainers.image.created] => "Timestamp"
    [nodeTypeAlias] => "string"
    [nodeMission] => "string"
    [maintainer] => "string"
    [cloudletsCount] => "int"
    [org.label-schema.license] => "string"
    [org.opencontainers.image.title] => "string"
    [sourceUrl] => "string"
    [org.label-schema.schema-version] => "version"
    [jem] => "int"
    [org.label-schema.build-date] => "int"
    [osTemplate] => "string"
    [org.opencontainers.image.licenses] => "string"
    [appUser] => apache
    [nodeVersion] => "version"
    [nodeType] => "string"
    [version] => "version"
    [org.opencontainers.image.vendor] => "string"
    [org.label-schema.name] => "string"
    [logFolder] => "string"
    [name] => "string"
    [distroTemplate] => "string"
    [actions] => "string"
    )
    )
    )
    

GetTemplates (appid, session, [type], [ownerUid] ) :

Returns a list of templates for the specified node types.

URL

https://[hoster-api-host]/1.0/environment/control/rest/gettemplates

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”
  • type : “string” (optional)

    filter the list by the template type (ALL,NATIVE,CARTRIDGE,DOCKERIZED)

  • ownerUid : “int” (optional)

    filter the list by the templates available for the specific user.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/gettemplates?session=[string]&appid=[string]&type=[string]&ownerUid=[int]

Response

  • TemplateArrayResponse
    Array
    (
    [result] => 0
    [array] => Array
    (
    [0] => Array
    (
    [guestOSType] => "string"
    [hostOSType] => "string"
    [imagesData] => Array
    (
    [image16Url] => "string"
    [image32Url] => "string"
    )
    [availableRegions] => Array
    (
    [0] => "string"
    )
    [engineType] => "string"
    [scalingMode] => "string"
    [published] => "int"
    [nodeType] => "string"
    [nodeMission] => "string"
    [type] => "string"
    [version] => 
    [enabled] => "boolean"
    [tags] => Array
    (
    [0] => Array
    (
    [engineVersion] => "version"
    [autoUpdate] => "boolean"
    [scalingMode] => "string"
    [isCustomSslSupport] => "boolean"
    [nodeVersion] => "version"
    [nodeTypeAlias] => "string"
    [cloudletsCount] => "int"
    [isDefault] => 
    [isExternalIpRequired] => 
    [engine] => "string"
    [cloudletsMinCount] => "boolean"
    [isEnabled] => "boolean"
    [name] => "string"
    [isHighAvailability] => 
    [isVcsSupport] => "boolean"
    )
    )
    )
    )
    [className] => "string"
    )
    

Migrate (envName, session, [hardwareNodeGroup], [isOnline] ) :

Migrates an environment to a different user region (learn more in the documentation).

URL

https://[hoster-api-host]/1.0/environment/control/rest/migrate

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • hardwareNodeGroup : “string” (optional)

    unique identifier of the target user region (host group).

  • isOnline : “boolean” (optional)

    defines whether to perform online migration (true) or offline (false).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/migrate?envName=[string]&session=[string]&isOnline=[boolean]&hardwareNodeGroup=[string]

Response

  • Response
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

ReadLog (envName, session, nodeId, path, [from], [count] ) :

Returns a part of the required log file.

URL

https://[hoster-api-host]/1.0/environment/control/rest/readlog

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeId : “int”

    unique identifier of the target node (container).

  • path : “string”

    path to the required log file.

  • from : “int” (optional)

    index number of a symbol to start returning log file data from (all preceding symbols are skipped); from start of the file if not specified.

  • count : “int” (optional)

    number of symbols to return (all subsequent symbols are skipped); till the end of the file if not specified.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/readlog?path=[string]&envName=[string]&session=[string]&count=[int]&from=[int]&nodeId=[int]

Response

  • LogReadResponse
    {
    "body": "string",
    "error": "string",
    "linescount": "long",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

RemoveLog (envName, session, nodeId, path ) :

Removes the log file.

URL

https://[hoster-api-host]/1.0/environment/control/rest/removelog

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeId : “int”

    unique identifier of the target node (container).

  • path : “string”

    path to the required log file.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/removelog?path=[string]&envName=[string]&session=[string]&nodeId=[int]

Response

  • Response
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

RestoreDump (envName, session, nodeType, dbName, password, dumpUrl, [user] ) : Response

Restores database from the linked dump file.

URL

https://[hoster-api-host]/1.0/environment/control/rest/restoredump

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeType : “string”

    unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack.

  • dbName : “string”

    target database name.

  • password : “string”

    password to access database.

  • dumpUrl : “string”

    URL to the database dump file.

  • user : “string” (optional)

    username to access database.

Example

Method: POST

POST https://[hoster-api-host]/1.0/environment/control/rest/restoredump?
dumpUrl=[string]&password=[string]&envName=[string]&session=[string]&dbName=[string]&nodeType=[string]&user=[string]

Response

  • Response
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

SetCloudletsCountById (envName, session, nodeid, flexibleCloudlets, fixedCloudlets ) :

Sets cloudlets count for compute node(s) (learn more in the documentation).

URL

https://[hoster-api-host]/1.0/environment/control/rest/setcloudletscountbyid

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeid : “int”

    unique identifier of the target node (container). If not defined, the cloudlet count will be set for all compute Nodes of the environment.

  • flexibleCloudlets : “int”

    a number of dynamic cloudlets to be set.

  • fixedCloudlets : “int”

    a number of reserved cloudlets to be set.

Example

https://[hoster-api-host]/1.0/environment/control/rest/setcloudletscountbyid?envName=[string]&session=[string]&flexibleCloudlets=[int]&fixedCloudlets=[int]&nodeid=[int]

Response

  • Response
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

Leave a Comment