environment.Control

environment.control.Node

Estimated reading: 7 minutes 89 views

EditNodeGroup (envName, session, nodeGroup ) :

Adjusts node group (layer) parameters.

URL

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

Parameters

  • envName : “string”

    target environment name.

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

    JSON object with node group (layer) settings:

    {
       "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)"
    }

Example

Method: POST

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

Response

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

GetNodeGroups (envName, session ) :

Returns a list of environment node groups (layers).

URL

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

Parameters

Example

Method: POST

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

Response

  • ObjectResponse
    {
       "error": "string",
       "name": "string",
       "object": {
          "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)"
       },
       "reason": "int",
       "result": "int",
       "source": "string",
       "warnings": [
          "string",
          "..."
       ]
    }
    

GetNodeTags (envName, session, nodeId ) :

Returns a list of all tags for the existing container’s image with additional information on whether the current tag can be safely redeployed to it (the “isRedeployable” flag in the response).

URL

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

Parameters

  • envName : “string”

    target environment name.

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

    unique identifier of the target node (container).

Example

Method: POST

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

Response

  • TagsArrayResponse
    {
       "array": [
          {
             "isRedeployable": "boolean",
             "name": "string"
          },
          "..."
       ],
       "className": "Class",
       "error": "string",
       "name": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

ResetNodePassword (envName, session, [nodeGroup], [nodeId], [password] ) :

Resets OS password in user container(s).

URL

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

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 OS password for user container(s).

Example

Method: POST

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

Response

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

RestartServices (envName, session, [nodeGroup], [nodeId], [delay], [isSequential], [manageDNSState] ) :

Restarts main service in target containers.

URL

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

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).

  • delay : “int” (optional)

    delay (in seconds) between two consecutive restarts when using the sequential restart type (I.e. when restart is performed on servers one-by-one to ensure uptime).

  • isSequential : “boolean” (optional)

    defines whether to restart services in containers one-by-one to ensure uptime (true) or simultaneously (false).

  • manageDNSState : “boolean” (optional)

    defines whether to exclude a target node from DNS for the duration of the operation (true) or not (false, by default). This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/restartservices?manageDNSState=[boolean]&delay=[int]&envName=[string]&session=[string]&nodeGroup=[string]&nodeId=[int]&isSequential=[boolean]

Response

  • NodeSSHResponses
    {
       "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"
    }
    

RestartNodes (envName, session, [nodeGroup], [nodeId], [delay], [isSequential], [manageDNSState] ) : Response

Restarts target containers (nodes).

URL

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

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).

  • delay : “int” (optional)

    delay (in seconds) between two consecutive restarts when using the sequential restart type (I.e. when restart is performed on servers one-by-one to ensure uptime).

  • isSequential : “boolean” (optional)

    defines whether to restart containers one-by-one to ensure uptime (true) or simultaneously (false).

  • manageDNSState : “boolean” (optional)

    defines whether to exclude a target node from DNS for the duration of the operation (true) or not (false, by default). This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/restartnodes?manageDNSState=[boolean]&delay=[int]&envName=[string]&session=[string]&nodeGroup=[string]&nodeId=[int]&isSequential=[boolean]

Response

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

SetNodeDisplayName (envName, session, [nodeId], [displayName] ) :

Sets container’s display name.

URL

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

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • nodeId : “int” (optional)

    unique identifier of the target node (container).

  • displayName : “string” (optional)

    new display name of the node.

Example

Method: POST

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

Response

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

SetNodeGroupDisplayName (envName, session, nodeGroup, [displayName] ) : Response

Sets node group’s (layer’s) display name.

URL

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

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.

  • displayName : “string” (optional)

    new display name of the node group.

Example

Method: POST

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

Response

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

Leave a Comment