Environment

environment.Deployment

Estimated reading: 19 minutes 726 views
Namespace:Environment
REST:https://[hoster-api-host]/1.0/environment/deployment/rest/{method-name}
Scripting:environment.deployment.{method-name}

The Deployment API methods implement extensive Deployment Manager functionality, including application installation (from archive packages and remote Git/SVN repositories) and management (update, rename, context undeploy, etc.). If working with Java projects from the VCS repository, a special Maven build node is used for the source’s compilation, which requires separate API methods.

Based on this, three method types can be distinguished the below-listed methods can be conditionally divided into three groups:

  • for Maven build node – AddBuildProject, EditBuildProject, GetBuildProjectInfo, RemoveBuildProject, GetBuildProjects, BuildProject, BuildDeployProject, DeployProject, Update
  • for Deployment Manager – Deploy, DeployArchive, AddRepo, EditRepo, GetRepos, RemoveRepo
  • for already deployed projects – EditProject, GetProjectInfo, RenameContext, Undeploy, Update

You can learn more about Deployment Manager in the linked document.

Methods

AddBuildProject (envName, session, nodeId, name, repo, [deployment], [settings], [hooks] ) :

Adds Java projects from the Deployment Manager storage to the Maven build node without an actual deployment. Subsequently, the BuildDeployProjectBuildProjectEntity or DeployProject methods can be called.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/addbuildproject

Parameters

  • envName : “string”

    target environment name (with a build node).

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

    unique identifier of the build node.

  • name : “string”

    project name.

  • repo : “string”

    unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]}

  • deployment : “json” (optional)

    JSON object with deployment data:

    {
       "context": "string",
       "envName": "string",
       "nodeGroup": "string"
    }
  • settings : “json” (optional)

    JSON object with additional deployment settings:

    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "workDir": "string",
       "zdt": "boolean"
    }
  • 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”}.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/addbuildproject?settings=[json]&envName=[string]&session=[string]&repo=[string]&name=[string]&nodeId=[int]&hooks=[string]&deployment=[json]

Response

  • BuildProjectResponse
    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "branch": "string",
       "context": "string",
       "envName": "string",
       "error": "string",
       "hash": "string",
       "hooks": "string",
       "id": "int",
       "login": "string",
       "name": "string",
       "nodeGroup": "string",
       "reason": "int",
       "repoHash": "string",
       "result": "int",
       "source": "string",
       "type": "string",
       "url": "string",
       "workDir": "string"
    }
    

AddRepo (appid, session, name, url, [type], [branch], [keyId], [login], [password], [description] ) :

Adds a project from the remote VCS repository to the Deployment Manager storage (i.e. saves the appropriate access link and authentication credentials/SSH key) to allow its subsequent deployment with the Deploy method.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/addrepo

Parameters

  • appid : “string”

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

  • session : “string”

    user session or personal access token.

  • name : “string”

    project name.

  • url : “string”

    URL to the repository with the project sources.

  • type : “string” (optional)

    VCS repository type (“GIT” or “SVN”).

  • branch : “string” (optional)

    remote repository branch (master by default).

  • keyId : “int” (optional)

    unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the GetSSHKeys method.

  • login : “string” (optional)

    login for authentication in VCS.

  • password : “string” (optional)

    password or token for authentication in VCS.

  • description : “string” (optional)

    custom description for the project.

Example

Method: POST

POST https://[hoster-api-host]/1.0/environment/deployment/rest/addrepo?

password=[string]&session=[string]&appid=[string]&name=[string]&keyId=[int]&description=[string]&type=[string]&login=[string]&branch=[string]&url=[string]

Response

  • ObjectResponse
    stdClass Object
    (
        [result] => 0
        [object] => stdClass Object
            (
                [name] => "string"
                [id] => "int"
                [type] => "sting"
                [branch] => "string"
                [createdOn] => "Timestamp"
                [url] => "string"
                [hash] => "sting"
            )
    )
    

BuildDeployProject (envName, session, nodeId, project, [skipUpdate], [delay] ) :

Builds and deploys a project that has been previously added to the Maven build node with the AddBuildProject method.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/builddeployproject

Parameters

  • envName : “string”

    source environment name (with a build node).

  • session : “string”

    user session or personal access token.

  • nodeId : “int”

    unique identifier of the build node.

  • project : “string”

    unique identifier or name of the project.

  • skipUpdate : “boolean” (optional)

    defines whether to update (false) or not (true) the project from the VCS source files.

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

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/builddeployproject?delay=[int]&envName=[string]&session=[string]&project=[string]&skipUpdate=[boolean]&nodeId=[int]

Response

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

BuildProject (envName, session, nodeId, project, [skipUpload], [skipUpdate] ) :

Builds a project that has been previously added to the Maven build node with the AddBuildProject method.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/buildproject

Parameters

  • envName : “string”

    source environment name (with a build node).

  • session : “string”

    user session or personal access token.

  • nodeId : “int”

    unique identifier of the build node.

  • project : “string”

    unique identifier or name of the project.

  • skipUpload : “boolean” (optional)

    defines whether to add built project to the Deployment Manager (false) or not (true).

  • skipUpdate : “boolean” (optional)

    defines whether to update (false) or not (true) the project from the VCS source files.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/buildproject?envName=[string]&session=[string]&skipUpload=[boolean]&project=[string]&skipUpdate=[boolean]&nodeId=[int]

Response

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

Deploy (envName, session, repo, context, [nodeGroup], [buildNodeId], [settings], [hooks], [delay] ) :

Deploys a VCS project that has been previously added to the Deployment Manager storage with the AddRepo method.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/deploy

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • repo : “string”

    unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]}

  • context : “string”

    target context name of the deployed project.

  • nodeGroup : “string” (optional)

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

  • buildNodeId : “int” (optional)

    unique identifier of a Maven build node (for Java-based projects only).

  • settings : “json” (optional)

    JSON object with the deployment settings:

    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "workDir": "string",
       "zdt": "boolean"
    }
  • 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”}.

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

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/deploy?settings=[json]&delay=[int]&envName=[string]&session=[string]&repo=[string]&context=[string]&buildNodeId=[int]&nodeGroup=[string]&hooks=[string]

Response

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

DeployArchive (envName, session, [nodeGroup], [context], fileUrl, fileName, [zdt], [hooks], [delay] ) :

Deploys a project from the archive uploaded to the Deployment Manager storage or via direct URL.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/deployarchive

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • nodeGroup : “string” (optional)

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

  • context : “string” (optional)

    custom context name for the deployed project (ROOT by default).

  • fileUrl : “string”

    URL to the archive file.

  • fileName : “string”

    archive file name from the Deployment Manager storage.

  • zdt : “boolean” (optional)

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

  • 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”}.

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

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/deployarchive?fileName=[string]&delay=[int]&envName=[string]&session=[string]&context=[string]&fileUrl=[string]&zdt=[boolean]&nodeGroup=[string]&hooks=[string]

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

DeployProject (envName, session, nodeId, project ) :

Deploys a project that has been previously built by the Maven build node to the required environment.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/deployproject

Parameters

  • envName : “string”

    source environment name (with a build node).

  • session : “string”

    user session or personal access token.

  • nodeId : “int”

    unique identifier of the build node.

  • project : “string”

    unique identifier or name of the project.

Example

Method: POST

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

Response

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

EditBuildProject (envName, session, nodeId, project, [name], [repo], [deployment], [settings], [hooks] ) :

Applies changes to the Java project added to the Maven build node and builds it.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/editbuildproject

Parameters

  • envName : “string”

    source environment name (with a build node).

  • session : “string”

    user session or personal access token.

  • nodeId : “int”

    unique identifier of the build node.

  • project : “string”

    unique identifier or name of the project.

  • name : “string” (optional)

    New project name.

  • repo : “string” (optional)

    unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]}

  • deployment : “json” (optional)

    JSON object with target project deployment settings:

    {
       "context": "string",
       "envName": "string",
       "nodeGroup": "string"
    }
  • settings : “json” (optional)

    JSON object with deployment settings:

    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "workDir": "string",
       "zdt": "boolean"
    }
  • 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”}.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/editbuildproject?settings=[json]&envName=[string]&session=[string]&repo=[string]&name=[string]&project=[string]&nodeId=[int]&hooks=[string]&deployment=[json]

Response

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

EditProject (envName, session, nodeGroup, context, [newContext], [repo], [settings], [hooks], [delay] ) :

Applies changes to the already deployed project.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/editproject

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • nodeGroup : “string”

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

  • context : “string”

    target context name of the deployed project.

  • newContext : “string” (optional)

    new context name for the project (could be the same as Context).

  • repo : “string” (optional)

    unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]}

  • settings : “json” (optional)

    JSON object with deployment settings:

    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "workDir": "string",
       "zdt": "boolean"
    }
  • 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”}.

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

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/editproject?settings=[json]&delay=[int]&newContext=[string]&envName=[string]&session=[string]&repo=[string]&context=[string]&nodeGroup=[string]&hooks=[string]

Response

  • VcsProjectResponse
    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "branch": "string",
       "context": "string",
       "error": "string",
       "hash": "string",
       "log": "string",
       "login": "string",
       "reason": "int",
       "repoHash": "string",
       "result": "int",
       "source": "string",
       "type": "SVN(0) | GIT(1)",
       "url": "string",
       "zdt": "boolean"
    }
    

EditRepo (appid, session, id, [name], [type], [url], [branch], [keyId], [login], [password], [description] ) :

Applies changes to the VCS project in the Deployment Manager storage.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/editrepo

Parameters

  • appid : “string”

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

  • session : “string”

    user session or personal access token.

  • id : “int”

    unique identifier of the repository to be edited.

  • name : “string” (optional)

    project name.

  • type : “string” (optional)

    VCS repository type (“GIT” or “SVN”).

  • url : “string” (optional)

    URL to the repository with the project sources.

  • branch : “string” (optional)

    Remote repository branch (master by default).

  • keyId : “int” (optional)

    unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the GetSSHKeys method.

  • login : “string” (optional)

    login for authentication in VCS.

  • password : “string” (optional)

    password or token for authentication in VCS.

  • description : “string” (optional)

    custom description for the project.

Example

Method: POST

POST https://[hoster-api-host]/1.0/environment/deployment/rest/editrepo?

password=[string]&session=[string]&appid=[string]&name=[string]&keyId=[int]&description=[string]&id=[int]&type=[string]&login=[string]&branch=[string]&url=[string]

Response

  • ObjectResponse
    {
       "error": "string",
       "name": "string",
       "object": {
          "branch": "string",
          "description": "string",
          "keyId": "int",
          "login": "string",
          "name": "string",
          "type": "SVN(0) | GIT(1)",
          "uid": "int",
          "url": "string"
       },
       "reason": "int",
       "result": "int",
       "source": "string",
       "warnings": [
          "string",
          "..."
       ]
    }
    

GetBuildProjectInfo (envName, session, nodeId, project ) :

Returns detailed information on a project added to the Maven build node.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/getbuildprojectinfo

Parameters

  • envName : “string”

    source environment name (with a build node).

  • session : “string”

    user session or personal access token.

  • nodeId : “int”

    unique identifier of the build node.

  • project : “string”

    unique identifier or name of the project.

Example

Method: POST

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

Response

  • BuildProjectResponse
    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "branch": "string",
       "context": "string",
       "envName": "string",
       "error": "string",
       "hash": "string",
       "hooks": "string",
       "id": "int",
       "login": "string",
       "name": "string",
       "nodeGroup": "string",
       "reason": "int",
       "repoHash": "string",
       "result": "int",
       "source": "string",
       "type": "string",
       "url": "string",
       "workDir": "string"
    }
    

GetBuildProjects (envName, session, [nodeGroup], [nodeId] ) :

Returns a list of all projects added to the Maven build node.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/getbuildprojects

Parameters

  • envName : “string”

    source environment name (with a build node).

  • session : “string”

    user session or personal access token.

  • 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 build node.

Example

Method: POST

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

Response

  • BuildProjectResponses
    {
       "error": "string",
       "reason": "int",
       "responses": [
          {
             "autoResolveConflict": "boolean",
             "autoUpdate": "boolean",
             "autoUpdateInterval": "int",
             "branch": "string",
             "context": "string",
             "envName": "string",
             "error": "string",
             "hash": "string",
             "hooks": "string",
             "id": "int",
             "login": "string",
             "name": "string",
             "nodeGroup": "string",
             "reason": "int",
             "repoHash": "string",
             "result": "int",
             "source": "string",
             "type": "string",
             "url": "string",
             "workDir": "string"
          },
          "..."
       ],
       "result": "int",
       "source": "string"
    }
    

GetDeployments (envName, session, nodeGroup ) :

Returns information on all projects deployed to the specified layer (node group).

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/getdeployments

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • 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/deployment/rest/getdeployments?envName=[string]&session=[string]&nodeGroup=[string]

Response

  • ArrayResponse
    {
       "array": [
          "ArrayItem",
          "..."
       ],
       "className": "Class",
       "error": "string",
       "name": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

GetHooks (envName, session, [nodeGroup], [nodeId], [context], [project] ) :

Returns information on hooks (scripts) that should be executed before/after project build/deployment.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/gethooks

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

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

  • context : “string” (optional)

    target context name of the deployed project.

  • project : “string” (optional)

    unique identifier or name of the project.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/gethooks?envName=[string]&session=[string]&context=[string]&project=[string]&nodeGroup=[string]&nodeId=[int]

Response

  • ObjectResponse
    {
       "error": "string",
       "name": "string",
       "object": {
          "context": "string",
          "postBuild": "string",
          "postDeploy": "string",
          "postUpdate": "string",
          "preBuild": "string",
          "preDeploy": "string",
          "preUpdate": "string",
          "projectName": "string",
          "restrictions": [
             "string",
             "..."
          ]
       },
       "reason": "int",
       "result": "int",
       "source": "string",
       "warnings": [
          "string",
          "..."
       ]
    }
    

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

Returns information on a particular VCS project.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/getprojectinfo

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • context : “string”

    target context name of the deployed project.

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

Response

  • VcsProjectResponse
    {
       "autoResolveConflict": "boolean",
       "autoUpdate": "boolean",
       "autoUpdateInterval": "int",
       "branch": "string",
       "context": "string",
       "error": "string",
       "hash": "string",
       "log": "string",
       "login": "string",
       "reason": "int",
       "repoHash": "string",
       "result": "int",
       "source": "string",
       "type": "SVN(0) | GIT(1)",
       "url": "string",
       "zdt": "boolean"
    }
    

GetRepos (appid, session, [id] ) :

Returns information on a specific or all projects in the Deployment Manager storage.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/getrepos

Parameters

  • appid : “string”

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

  • session : “string”

    user session or personal access token.

  • id : “int” (optional)

    unique identifier of the repository.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/getrepos?session=[string]&appid=[string]&id=[int]

Response

  • ArrayResponse
    {
       "array": [
          {
             "branch": "string",
             "description": "string",
             "keyId": "int",
             "login": "string",
             "name": "string",
             "type": "SVN(0) | GIT(1)",
             "uid": "int",
             "url": "string"
          },
          "..."
       ],
       "className": "Class",
       "error": "string",
       "name": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

RemoveBuildProject (envName, session, nodeId, project ) :

Removes a project from the Maven build node.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/removebuildproject

Parameters

  • envName : “string”

    source environment name (with a build node).

  • session : “string”

    user session or personal access token.

  • nodeId : “int”

    unique identifier of the build node.

  • project : “string”

    unique identifier or name of the project.

Example

Method: POST

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

Response

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

RemoveRepo (appid, session, id ) :

Removes project from the Deployment Manager storage.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/removerepo

Parameters

  • appid : “string”

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

  • session : “string”

    user session or personal access token.

  • id : “int”

    unique identifier of the repository.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/removerepo?session=[string]&appid=[string]&id=[int]

Response

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

RenameContext (envName, session, nodeGroup, oldContext, newContext ) :

Moves the already deployed project to another context.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/renamecontext

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • nodeGroup : “string”

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

  • oldContext : “string”

    target context name of the deployed project.

  • newContext : “string”

    new context name for the project.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/renamecontext?oldContext=[string]&newContext=[string]&envName=[string]&session=[string]&nodeGroup=[string]

Response

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

Undeploy (envName, session, nodeGroup, context ) :

Removes a deployed project from the specified context.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/undeploy

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • nodeGroup : “string”

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

  • context : “string”

    target context name of the deployed project.

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/undeploy?envName=[string]&session=[string]&context=[string]&nodeGroup=[string]

Response

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

Update (envName, session, [nodeGroup], [nodeId], [context], [project], [delay] ) :

Updates a project from the VCS repository.

URL

https://[hoster-api-host]/1.0/environment/deployment/rest/update

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

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

  • context : “string” (optional)

    target context name of the deployed project.

  • project : “string” (optional)

    unique identifier or name of the project.

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

Example

Method: POST

https://[hoster-api-host]/1.0/environment/deployment/rest/update?delay=[int]&envName=[string]&session=[string]&context=[string]&project=[string]&nodeGroup=[string]&nodeId=[int]

Response

  • VcsUpdateResponse
    {
       "error": "string",
       "log": "string",
       "message": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

Leave a Comment