environment.Control

environment.control.App

Estimated reading: 4 minutes 69 views

DeployApp (envName, session, fileUrl, fileName, [context], [atomicDeploy], [delay], [nodeGroup], [hooks],
[isSequential] ) :

Deploys an application to the target environment.

URL

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

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • fileUrl : “string”

    URL to the application archive to be deployed.

  • fileName : “string”

    name of the application archive from the Deployment Manager to be deployed.

  • context : “string” (optional)

    custom context for the application (ROOT by default).

  • atomicDeploy : “boolean” (optional)

    defines whether to use zero-downtime deployment for PHP (true) or not (false).

  • delay : “int” (optional)

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

  • nodeGroup : “string” (optional)

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

  • hooks : “string” (optional)

    JSON object with custom scripts (actual content) to be executed before and after the build/deployment
    operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”,
    “postBuild”:”script”}.

  • isSequential : “boolean” (optional)

    defines whether to deploy the project on application servers one-by-one to ensure uptime (true) or
    simultaneously (false).

Example

Method: POST

https://[hoster-api-host]/1.0/environment/control/rest/deployapp?fileName=[string]&delay=[int]&envName=[string]&session=[string]&context=[string]&fileUrl=[string]&nodeGroup=[string]&hooks=[string]&isSequential=[boolean]&atomicDeploy=[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"
    }
    

RemoveApp (envName, session, context, [nodeGroup] ) :

Removes an application from the specified context

URL

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

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • context : “string”

    application context to be removed.

  • 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/removeapp?envName=[string]&session=[string]&context=[string]&nodeGroup=[string]

Response

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

RenameApp (envName, session, oldcontext, newcontext, [nodeGroup] ) :

Renames an application by moving it from the old context to a new one.

URL

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

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • oldcontext : “string”

    current context name of the application.

  • newcontext : “string”

    new context name for the application.

  • 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/renameapp?envName=[string]&session=[string]&oldcontext=[string]&nodeGroup=[string]&newcontext=[string]

Response

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

Leave a Comment