environment.Control

environment.control.Endpoint

Estimated reading: 3 minutes 128 views

AddEndpoint (envName, session, nodeId, privatePort, protocol, name ) : ObjectResponse

Adds an endpoint for direct connection to the container (learn more in the documentation).

URL

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

Parameters

  • envName : “string”

    target environment name.

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

    unique identifier of the target node (container).

  • privatePort : “int”

    local port on the container to connect to via endpoint.

  • protocol : “string”

    connection protocol (“TCP” or “UDP”).

  • name : “string”

    custom endpoint name.

Example

Method: POST

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

Response

  • ObjectResponse
    {
       "error": "string",
       "name": "string",
       "object": {
          "domain": "string",
          "name": "string",
          "nodeId": "int",
          "privatePort": "int",
          "protocol": "TCP(0) | UDP(1)",
          "publicPort": "int"
       },
       "reason": "int",
       "result": "int",
       "source": "string",
       "warnings": [
          "string",
          "..."
       ]
    }
    

EditEndpoint (envName, session, id, name, privatePort, protocol ) : ObjectResponse

Adjusts an endpoint for direct connection to the container (learn more in the documentation).

Parameters

  • envName : “string”

    target environment name.

  • session : “string”
  • id : “int”

    unique identifier of the target endpoint.

  • name : “string”

    custom endpoint name.

  • privatePort : “int”

    local port on the container to connect to via endpoint.

  • protocol : “string”

    transport protocol (“TCP” or “UDP”).

Response

  • ObjectResponse
    {
       "error": "string",
       "name": "string",
       "object": {
          "domain": "string",
          "name": "string",
          "nodeId": "int",
          "privatePort": "int",
          "protocol": "TCP(0) | UDP(1)",
          "publicPort": "int"
       },
       "reason": "int",
       "result": "int",
       "source": "string",
       "warnings": [
          "string",
          "..."
       ]
    }
    

    Example

    https://[hoster-api-host]/1.0/environment/control/rest/editendpoint?protocol=[string]&envName=[string]&session=[string]&privatePort=[int]&name=[string]&id=[int]

GetEndpoints (envName, session, [nodeId] ) : 

Returns a list of endpoints for the environment or specific node (learn more in the documentation).

URL

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

Parameters

  • envName : “string”

    target environment name.

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

    unique identifier of the target node (container).

Example

Method: POST

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

Response

  • ArrayResponse
    stdClass Object
    (
        [result] => 0
        [array] => Array
            (
                [0] => stdClass Object
                    (
                        [protocol] => "string"
                        [privatePort] => "int"
                        [publicPort] => "int"
                        [name] => "string"
                        [id] => "int"
                        [nodeId] => "int"
                    )
            )
        [className] => "string"
    )
    

RemoveEndpoint (envName, session, id ) :

Removes an endpoint for direct connection to the container (learn more in the documentation).

URL

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

Parameters

Example

Method: POST

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

Response

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

Leave a Comment