Product Documentation

Servers API

Important: This topic describes deprecated functions and will be removed from the documentation. For more information about deprecated functions in Smart Tools, see What’s New in Citrix Smart Tools.

/nodes or /nodes/{id}

Description

Gets a list of nodes or a single node details.

URL structure

httpsː//smart.cloud.com/v0/nodes?access_token=VALID_ACCESS_TOKEN

URL example

httpsː//smart.cloud.com/v0/nodes?access_token=[VUHlewcsthNeVca7Fb5zR5oKC](https://manage.citrix.com/v0/scripts/89145?access_token=VUHlewcsthNeVca7Fb5zR5oKC)

Method

GET

Parameters

Name Required or optional Valid Values
platform Optional Windows, Linux
status Optional online, offline
limit Optional 100 default; valid range is 1-100
offset Optional 0 (default); any positive number

Response

JSON payload

Sample response:

[
   {
      "nodeId":136,
      "status":"offline",
      "description":"",
      "nodeAttrList":[
         {
            "attributeName":"ifname",
            "nodeId":136,
            "attributeValue":"eth0"
         },
         {
            "attributeName":"osv",
            "nodeId":136,
            "attributeValue":"2.6.32-5-686"
         },
         {
            "attributeName":"mac",
            "nodeId":136,
            "attributeValue":"00:16:36:12:b5:0f"
         },
         {
            "attributeName":"aid",
            "nodeId":136,
            "attributeValue":"136"
         },
         {
            "attributeName":"oscat",
            "nodeId":136,
            "attributeValue":"#1 SMP Mon Jan 16 16:04:25 UTC 2012"
         },
         {
            "attributeName":"eth0",
            "nodeId":136,
            "attributeValue":"10.1.10.214"
         },
         {
            "attributeName":"netmask",
            "nodeId":136,
            "attributeValue":"255.255.255.0"
         },
         {
            "attributeName":"ip",
            "nodeId":136,
            "attributeValue":"10.1.10.214"
         },
         {
            "attributeName":"oid",
            "nodeId":136,
            "attributeValue":"40042"
         },
         {
            "attributeName":"name",
            "nodeId":136,
            "attributeValue":"qa-apt1-deb6-32"
         },
         {
            "attributeName":"oshw",
            "nodeId":136,
            "attributeValue":"i686"
         },
         {
            "attributeName":"release",
            "nodeId":136,
            "attributeValue":"Debian GNU/Linux 6.0 \\n \\l"
         },
         {
            "attributeName":"osn",
            "nodeId":136,
            "attributeValue":"Linux"
         }
      ],
      "nodeName":"qa-apt1-deb6-32",
      "agentId":136,
      "attrHash":{

},
      "companyId":40042,
      "tagList":[
         {
            "tagType":"USER_DEFINED",
            "tagName":"Debian",
            "companyId":0
         },
         {
            "tagType":"USER_DEFINED",
            "tagName":"NewTagTest",
            "companyId":0
         },
         {
            "tagType":"USER_DEFINED",
            "tagName":"Tag123",
            "companyId":0
         },
         {
            "tagType":"USER_DEFINED",
            "tagName":"Deb6",
            "companyId":0
         },
         {
            "tagType":"USER_DEFINED",
            "tagName":"Tag678",
            "companyId":0
         }
      ],
      "organizationId":0
   }
]

/nodes/{id}

Description

Deletes a node or agent from an organization company.

URL structure

httpsː//smart.cloud.com/v0/nodes?access_token=VALID_ACCESS_TOKEN

URL example

httpsː//smart.cloud.com/v0/nodes/136/setasgateway?access_token=[VUHlewcsthNeVca7Fb5zR5](https://manage.citrix.com/v0/scripts/89145?access_token=VUHlewcsthNeVca7Fb5zR5oKC)

Method

DELETE

Response

JSON payload

Sample response:

{
   "nodeId":79,
   "status":"offline",
   "description":"",
   "nodeAttrList":[
      {
         "attributeName":"ifname",
         "nodeId":79,
         "attributeValue":"eth0"
      },
      {
         "attributeName":"index",
         "nodeId":79,
         "attributeValue":"1"
      },
      {
         "attributeName":"osv",
         "nodeId":79,
         "attributeValue":"3.2.0-40-virtual"
      },
      {
         "attributeName":"provider",
         "nodeId":79,
         "attributeValue":"ec2"
      },
      {
         "attributeName":"mac",
         "nodeId":79,
         "attributeValue":"22:00:0a:1d:2b:2f"
      },
      {
         "attributeName":"userRole",
         "nodeId":79,
         "attributeValue":"Admin"
      },
      {
         "attributeName":"aid",
         "nodeId":79,
         "attributeValue":"79"
      },
      {
         "attributeName":"oscat",
         "nodeId":79,
         "attributeValue":"#64-Ubuntu SMP Mon Mar 25 21:42:18 UTC 2013"
      },
      {
         "attributeName":"eth0",
         "nodeId":79,
         "attributeValue":"10.29.43.47"
      },
      {
         "attributeName":"imageid",
         "nodeId":79,
         "attributeValue":"ami-d0f89fb9"
      },
      {
         "attributeName":"netmask",
         "nodeId":79,
         "attributeValue":"255.255.255.192"
      },
      {
         "attributeName":"ip",
         "nodeId":79,
         "attributeValue":"10.29.43.47"
      },
      {
         "attributeName":"serverid",
         "nodeId":79,
         "attributeValue":"i-e008c78b"
      },
      {
         "attributeName":"oid",
         "nodeId":79,
         "attributeValue":"40338"
      },
      {
         "attributeName":"userId",
         "nodeId":79,
         "attributeValue":"10425"
      },
      {
         "attributeName":"name",
         "nodeId":79,
         "attributeValue":"ip-10-29-43-47"
      },
      {
         "attributeName":"release",
         "nodeId":79,
         "attributeValue":"Ubuntu 12.04.2 LTS \n l"
      },
      {
         "attributeName":"oshw",
         "nodeId":79,
         "attributeValue":"x86_64"
      },
      {
         "attributeName":"osn",
         "nodeId":79,
         "attributeValue":"Linux"
      }
   ],
   "nodeName":"ip-10-29-43-47",
   "agentId":79,
   "attrHash":{

},
   "companyId":40338,
   "tagList":[

],
   "osn":"Linux"
}

/nodes/{id}/setasgateway

Description

Set an agent as connector

URL structure

httpsː//smart.cloud.com/v0/nodes/_id_/setasgateway?access_token=VALID_ACCESS_TOKEN

URL example

httpsː//smart.cloud.com/v0/nodes/136/setasgateway?access_token=VUHlewcsthNeVca7Fb5zR5oKC

Method

PUT

Response

JSON payload

Sample response:

{
   "result":"SUCCESS",
   "data":"1"
}

/nodes/{id}/refresh

Description

Refresh properties of the node from the node

URL structure

httpsː//smart.cloud.com/v0/nodes/_id_/refresh?access_token=VALID_ACCESS_TOKEN

URL example

httpsː//smart.cloud.com/v0/nodes/6797/refresh?access_token=[VUHlewcsthNeVca7Fb5zR5oKC](https://manage.citrix.com/v0/scripts/89145?access_token=VUHlewcsthNeVca7Fb5zR5oKC)

Method

PUT

Response

JSON payload

Sample response:

{
   "result":"SUCCESS",
   "data":{
      "companyId":40034,
      "role":"Admin",
      "user":"10087",
      "extraAttrs":{

},
      "name":"Refreshing node properties - 7288",
      "scriptId":0,
      "scriptArgs":[

],
      "targets":[
         7288
      ],
      "scheduleType":12,
      "startTime":1423202827154,
      "endTime":86560732799156,
      "repeatCount":1,
      "repeatInterval":1,
      "offset":0,
      "jobId":19263,
      "taskParameters":[

],
      "scriptType":"refreshnodeprop",
      "serverGroups":[

],
      "serverGroupExpr":"",
      "excludeTargets":[

],
      "jobParams":{
         "refreshnodeprop":"refreshnodeprop"
      },
      "credentialId":0,
      "parentJobId":0,
      "runNow":false
   }
}

/nodes/install

Description

Installs Citrix Smart Tools Agent on a machine.

URL structure

https://smart.cloud.com/v0/nodes/install?access_token=VALID_ACCESS_TOKEN&ip=IP_ADDRESS_OF_THE_MACHINE&port=PORT_NUMBER&username=LOGIN_USERNAME&password=LOGIN_PASSWORD&osn=OPERATING_SYSTEM&providerId=RESOURCE_LOCATION_PROVIDER_ID

URL example

https ://smart.cloud.com/v0/nodes/install?access_token=NpsBvPSBlTlDngDA6TtJPptC1&ip=10.0.4.240&port=22&username=admin@acme&password=abc12345&osn=linux&providerId=1624

Method

POST

Parameters

Name Required or Optional Description
ip Required IP address of the machine.
port Required Port number to be accessed, depending on the operating system. For example: SSH port 22 on Linux and RDP port 3389 on Windows.
username Required Login user name of the machine.
password Required Login password of the machine.
osn Required Operating system of the machine. For example: linux, windows
providerId Required Provider ID associated with a resource location. To acquire this value from the Smart Tools console, click Resources & Settings and then click the resource location to expand.

Response

JSON payload

Sample response:

{
   "result":"SUCCESS",
   "data":{
      "taskId":"17063"
   }
}

/nodes/install/status/{task id}

Description

Gets agent installation status on a machine.

URL structure

https://smart.cloud.com/v0/nodes/install/status/TASK_ID?access_token=VALID_ACCESS_TOKEN

URL example

https ://smart.cloud.com/v0/nodes/install/status/17972?access_token=QosBwPSBlTlDngDA6TtJPptC1

Method

GET

Parameters

None

Response

JSON payload

Sample response:

  • Response when the agent installation is in progress:
     {
     "id":17063,
     "type":"processing",
     "msg":"Checking Installation Status..",
     "vmInfo":{
     "ip":"10.0.74.1",
     "providerCode":"noncloud"
       }
     }
    
  • Response when the agent installation is successful:

json { "id":17062, "type":"success", "msg":"Installation Successful.", "vmInfo":{ "ip":"10.0.76.2", "providerCode":"noncloud" } }

  • Response if the agent installation is unsuccessful:

```json

{
"id":17972,
"type":"failed",
"msg":"Failed to install.",
"vmInfo":{
"ip":"10.0.4.21",
"providerCode":"xenserver"
  }
}
```