Servers

Server is a definition of the IT infrastructure resource, which can be accessed over one of the specified protocols.

Data structures

ServerModel
Parameter Type Description
id bigserial Object Identifier
name string Required
address IPv4/string Write only, required if subnetmask is empty (static server)
addresses string Read only, a list of IP addresses
description string Object description
http HTTPServerAttributes Required if protocol == http
rdp RDPServerAttributes Required if protocol == rdp
subnet SubnetModel Required if not address
tls TLSServerAttributes  
remote_apps RemoteAppsAttributes Available for protocol == rdp
legacy_ciphers bool Allow negotiating older encryption algorithms (DSA(1024), RSA(1024))
hotseat bool Enable to be informed about existing connections via the User Portal. Available for protocol == rdp
blocked bool  
reason string The reason for blocking Server object
port int Required
bind_ip IPv4 Required
protocol string{checkout, citrixsf, http, ica, modbus, mysql, oracle, rdp, ssh, system, tcp, tds, telnet, tn3270, tn5250, vnc} Required
RemoteAppsAttributes
Parameter Type Description
id string  
server id  
name string required
path string required
args string  
variables id, name (required), encrypt, object_type, object_property  
HTTPServerAttributes
Parameter Type Description
timeout int Default 900
RDPServerAttributes
Parameter Type Description
ca_certificate PEM  
security string{std, tls, nla}
  • required;
  • default == nla
SubnetModel
Parameter Type Description
ip IPv4/string Subnetwork IP address, e.g. 10.0.255.255.
mask int Subnet mask in CIDR notation.
subnet string  
TLSServerAttributes
Parameter Type Description
ca_certificate string required if use_tls
use_tls boolean  

Creating a server

Request

Method
POST
Path
/api/system/servers
Headers
Content-Type: Application/JSON
Body
ServerModel

Possible Response

Status
201 CREATED
Headers
Content-Type: Application/JSON
Body
ServerModel
Description Object successfully created. Resultant object’s attributes are included in response body.

Possible Response

Status
400 BAD REQUEST
Headers
Content-Type: Application/JSON
Body
ValidationErrors
Description Validation didn’t pass.

Retrieving servers list

Request

Method
GET
Path
/api/system/servers

Note

Results pagination

Every GET request, which returns a collection of objects can be optionally paginated. To achieve it add a pagination parameter to the request path:

/api/system/objects?page=3&page_size=10
Pagination parameters
page int
page_size int

Possible Response

Status
200 OK
Headers
Content-Type: Application/JSON
Body
[
        ServerModel,
        ...
]

Retrieving a server

Request

Method
GET
Path
/api/system/servers/:server_id

Possible Response

Status
200 OK
Headers
Content-Type: Application/JSON
Body
ServerModel

Possible Response

Status
404 NOT FOUND
Description No server with given id.

Modifying a server

Request

Method
PUT, PATCH
Path
/api/system/servers/:server_id

Possible Response

Status
200 OK
Headers
Content-Type: Application/JSON
Body
ServerModel

Possible Response

Status
400 BAD REQUEST
Headers
Content-Type: Application/JSON
Body
ServerModel

Possible Response

Status
404 NOT FOUND
Description No server with given id.

Deleting a server

Request

Method
DELETE
Path
/api/system/servers/:server_id

Possible Response

Status
204 NO CONTENT

Possible Response

Status
404 NOT FOUND
Description Object with specified identifier was not found.

Retrieving users allowed to manage given server

Request

Method
GET
Path
/api/system/servers/:server_id/granted_users

Note

Results pagination

Every GET request, which returns a collection of objects can be optionally paginated. To achieve it add a pagination parameter to the request path:

/api/system/objects?page=3&page_size=10
Pagination parameters
page int
page_size int

Possible Response

Status
200 OK
Headers
Content-Type: Application/JSON
Body
[
        {
        'name': 'username',
        'id': :id
        }, ...
]

Granting management privileges

Request

Method
POST
Path
/api/system/servers/:server_id/granted_users
Body
{
        ''user_id'': :user_id
}

Possible Response

Status
201 CREATED

Revoking management privileges

Request

Method
DELETE
Path
/api/system/servers/:server_id/granted_users/:user_id

Possible Response

Status
204 NO CONTENT

Possible Response

Status
404 NOT FOUND

Listing server addresses

Request

Method
GET
Path
/api/system/servers/:server_id/addresses

Note

Results pagination

Every GET request, which returns a collection of objects can be optionally paginated. To achieve it add a pagination parameter to the request path:

/api/system/objects?page=3&page_size=10
Pagination parameters
page int
page_size int

Possible Response

Status
204 NO CONTENT

Possible Response

Status
200 OK
Headers
Content-Type: Application/JSON
Body
[
        ServerAddressModel
        ...
]

Possible Response

Status
404 NOT FOUND

Creating a server address

Request

Method
POST
Path
/api/system/servers/:server_id/addresses
Headers
Content-Type: Application/JSON
Body
ServerAddressModel

Possible Response

Status
201 CREATED
Headers
Content-Type: Application/JSON
Body
ServerAddressModel

Possible Response

Status
400 BAD REQUEST
Headers
Content-Type: Application/JSON
Body
ValidationErrors

Possible Response

Status
404 NOT FOUND
Description
No server with given :server_id.

Updating a server address

Request

Method
PATCH, PUT
Path
/api/system/servers/:server_id/addresses/:address_id
Body
ServerAddressModel

Possible Response

Status
200 OK
Headers
Content-Type: Application/JSON
Body
ServerAddressModel

Possible Response

Status
400 BAD REQUEST
Headers
Content-Type: Application/JSON
Body
ValidationErrors

Possible Response

Status
404 NOT FOUND
Description
No server with given :server_id.
   
Description
No server address with given :address_id

Deleting a server address

Request

Method
DELETE
Path
/api/system/servers/:server_id/addresses/:address_id

Possible Response

Status
204 NO CONTENT

Possible Response

Status
404 NOT FOUND
Description
No server with given :server_id.
   
Description
No server address with given :address_id