API Reference

API Reference 

REST APIs

Authentication

Step 1: /companies

Step 2: /roles

Step 3: /oauth/token

Scripts

/scripts (POST)

/scripts/{id} (POST)

/scripts (GET)

/scripts/{id} (GET)

/scripts/{id}/versions (GET)

/scripts/{id} (DELETE)

/scripts/attachment (POST)

/scripts/{id}/attachment (POST)

/scripts/attachment (GET)

Servers

/nodes or /nodes/{id} (GET)

/nodes/{id} (DELETE)

/nodes/{id}/setasgateway (PUT)

/nodes/{id}/refresh (PUT)

/nodes/install (POST)

/nodes/install/status/{task id} (GET) 

Jobs

/jobs (POST)

/jobs/{id} (POST)

/jobs/{id} (GET) 

/jobs?type=<script>&id=<id of script>

/jobs/{jobid}/runinfo

/jobs/{jobid}/runoutput?runid=<valid runid>

/jobs or /jobs/{id}

Deployment Profile

/deploymentprofile/{id} (GET) 

/deploymentprofile/ (POST)

/deploymentprofile/{id} (POST) 

/deploymentprofile/{id} (DELETE)

/deploymentprofile/{id}/deploy (POST)

/deploymentprofile/list (POST)

Providers

/providers or /providers/{id} (GET)

/providers or /providers/{id} (POST)

/providers/{id} (DELETE)

/providers/{id}/servers (GET)

/providers/{id}/servers/{serverid} (POST) 

Monitoring

/monitor/rollup (GET)

/monitor/{id} (GET)

/monitor/{id} (POST)

/monitor/{id}/alerts (GET)

/monitor/{id}/alerts/enable (GET)

/monitor/{id}/alerts/disable (GET)

/monitor/{id}/events (GET)

/monitor/{id}/metrics (GET)

/monitor/{id}/history&type=<item|application> (GET)

/monitor/dashboards (GET)

/monitor/graphs/{id} (GET)

Blueprint

/process (POST)

/process/{id} (POST)

/process/{id} (DELETE)

/process/{id} (GET)

/process/{id}/versions (GET)

/process/{id}/launch (POST) 

/process/{id}/launch (POST) 

/process/{id}/launch (POST) 

/process/{id}/launch (POST) 

/process/{id}/launch (POST) 

/process/{id}/addserver (POST) 

/process/{id}/addserver (POST) 

/process/{id}/deleteserver (DELETE) 

/scripts/purchase (POST)

Processinstance

/processinstance (GET)

/processinstance/{id} (GET)

/processinstance/{id}/childjobs (GET)

/processinstance/{id}/processrundetails (GET)

/processinstance/{id}/processruns (GET)

processinstance/{id}/stepruns (GET)

processinstance/{id}/stepdetails (GET)

processinstance/{id}/stepoutput (GET)

processinstance/{id}/processtargets (GET)

processinstance/{id}/targets (GET)

processinstance/{id}/pause (GET)

processinstance/{id}/resume (GET)

processinstance/{id}/cancel (GET)

processinstance/{id}/pauserun (GET)

processinstance/{id}/resumerun (GET)

processinstance/{id}/cancelrun (GET) 

Share

/share (POST)

/unshare (POST)

Miscellaneous

    /download/info (GET)

 

Authentication

Citrix Smart Tools uses OAuth2 authentication. The current implementation supports only client credential profile (i.e., grant_type=client_credentials). Our authentication involves these three steps:

STEP 1:

/companies 

Description: Retrieves the list of organizations that the client has access.

URL structure: httpsː//smart.cloud.com/v0/companies?client_id=<apikey>

URL example: httpsː//smart.cloud.com/v0/companies?client_id=YW9s7S5WyT7HebzNeQUB2QasuQ9m9m7%40

Method: GET

Parameters: 

client_id: Mandatory parameter. Specifies the API key associated with a user account. To view your access keys (API key and secret password) in the Smart Tools UI, click Resources & Settings and then click My Profile under User Settings.

Response: List of organizations.

Sample response:

[  
   {  
      "authorizedToTweetFlag":"N",
      "name":"acme",
      "accountType":"PAID",
      "companyId":40042,
      "oemCode":"SCALEX"
   }
]

STEP 2:

/roles 

Description:  Retrieves the role associated with the client for the specified organization.

URL structure: httpsː//smart.cloud.com/v0/roles?client_id=<apikey>&company_id=<companyid_from_step1>

URL example: httpsː//smart.cloud.com/v0/roles?client_id=YW9s7S5WyT7HebzNeQUB2QasuQ9m9m7%40&company_id=40042

Method: GET

Parameters: 

  • client_id: Mandatory parameter. Specifies the API key associated with a user account. To view your access keys (API key and secret password), from the Smart Tools UI, click Resources & Settings and then click My Profile under User Settings.
  • company_id: Mandatory parameter. Specifies the organization ID of the user. Use the organization ID (companyId) retrieved in Step 1. 

Response: Role associated with the client for the specified organization

Sample response:

["Admin"]

 

STEP 3:

/oauth/token 

Description: Generates oauth2  access token. This valid access token is required to be used with Smart Tools REST APIs.

URL structure: httpsː//smart.cloud.com/v0/oauth/token?grant_type=client_credentials&scope=<role,companyid>

URL example: httpsː//smart.cloud.com/v0/oauth/token?grant_type=client_credentials&scope=Admin,40042

Method: GET 

Header: Basic authentication Header required. 

Header structure: Authorization: Basic (Base64 encode of (APIkey:SecretKey)). This is part of oauth2 spec.

Parameters: 

  • grant_type required. We support client_credentials, in the future we will support all oauth2 profiles. 
  • scope required. It is a comma separated list of role and companyid.

Example:

1. Generate base64 encoded string of APIkey:SecretKey. This is specified part of http basic authentication spec.

2. curl -H 'Authorization:  Basic cXVIZTNhZGFHZUR5OXlWYVR5WHU5YWp1emFaeVZ5SnUZThhanVt' httpsː//smart.cloud.com/v0/oauth/token?grant_type=client_credentials&scope=Admin,40042

Sample response:

{  
   "expired":false,
   "tokenType":"bearer",
   "scope":[  
      "40042",
      "Admin"
   ],
   "expiration":"Mon Jun 11 05:32:59 UTC 2012",
   "expiresIn":43199,
   "value":"s3hq2n6h07n0nourqepthc",
   "additionalInformation":{  

   }
}

 

back to top

 

Scripts 

/scripts 

Description: Creates a script.

URL structure: httpsː//smart.cloud.com/v0/scripts?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/scripts?access_token=VUHlewcsthNeVca7Fb5zR5oKC 

Method: POST

Parameters: JSON payload 

Sample payload: {"scriptName":"Test script","scriptType":"bat","scriptDescription":"", "scriptInputParams":[],"tagList":[],"scriptAttachments":[],"scriptContent":"bGluZTEKbGluZTIKbGluZTMKbGluZTQKbGluZTUKZWNobyAnSGknCg=="}

Where:

  • scriptContent field must be in Base64 encoding format (https://www.base64decode.org/)
  • scriptContent, scriptType, and scriptName are mandatory fields

Response: JSON payload

Sample response:

{  
   "scriptName":"Test script",
   "parentScriptId":0,
   "scriptType":"bat",
   "status":"ENABLED",
   "scriptInputParams":[  

   ],
   "sharedFlag":"N",
   "scriptAttachments":[  

   ],
   "version":"1",
   "scriptLocation":"40042/10093/1339350930277/",
   "internalToTemplate":"N",
   "parentCompanyId":0,
   "purchasedFlag":"N",
   "role":"Admin",
   "companyId":40042,
   "scriptId":"2446",
   "tagList":[  

   ],
   "user":"10093",
   "scriptContent":"bGluZTEKbGluZTIKbGluZTMKbGluZTQKbGluZTUKZWNobyAnSGknCg==",
   "viewableFlag":"Y"
}           

 

/scripts/{id} 

Description: Updates a script.

URL structure: httpsː//smart.cloud.com/v0/scripts/id?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/scripts/89145?access_token=VUHlewcsthNeVca7Fb5zR5oKC

Method: POST

Parameters: JSON payload

Sample payload:  {"scriptName":"Update script","scriptType":"bat","scriptDescription":"", "scriptInputParams":[],"tagList":[],"scriptAttachments":[],"scriptContent":"bGluZTEKbGluZTIKbGluZTMKbGluZTQKbGluZTUKZWNobyAnSGknCg==","version":"1"}

          Where:

    • scriptContent field must be in Base64 encoding format (https://www.base64decode.org/)
    • scriptContent, scriptType, and scriptName are mandatory fields

Response: JSON payload

Sample response:

{  
   "scriptName":"Update script",
   "parentScriptId":0,
   "scriptType":"bat",
   "status":"ENABLED",
   "scriptInputParams":[  

   ],
   "sharedFlag":"N",
   "scriptAttachments":[  

   ],
   "version":"1",
   "scriptLocation":"40042/10093/1339350930277/",
   "internalToTemplate":"N",
   "parentCompanyId":0,
   "purchasedFlag":"N",
   "role":"Admin",
   "companyId":40042,
   "scriptId":"2446",
   "tagList":[  

   ],
   "user":"10093",
   "scriptContent":"bGluZTEKbGluZTIKbGluZTMKbGluZTQKbGluZTUKZWNobyAnSGknCg==",
   "viewableFlag":"Y"
}         

 

/scripts 

Description: Gets a list of all scripts. By default, provides a list of  all scripts with latest versions.

URL structure: httpsː//smart.cloud.com/v0/scripts?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/scripts?access_token=VUHlewcsthNeVca7Fb5zR5oKC

Method: GET

Parameters: version (optional) parameter

Sample response:

 {  
   "companyId":40034,
   "role":"Admin",
   "user":"10087",
   "extraAttrs":{  

   },
   "scriptId":"15280",
   "scriptName":"0000000000",
   "version":"7",
   "scriptDescription":"VmVyc2lvbiA1YWRzZjM0MzM0MzQzYXMzM2Fkc2Y=",
   "scriptInputParams":[  

   ],
   "scriptAttachments":[  

   ],
   "tagList":[  
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "tagName":"no",
         "tagType":"USER_DEFINED"
      },
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "tagName":"hi",
         "tagType":"USER_DEFINED"
      },
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "tagName":"hi",
         "tagType":"INTERNAL"
      }
   ],
   "metadata":{  

   },
   "sku":{  

   },
   "parentScriptId":0,
   "parentCompanyId":0,
   "shared":"Y",
   "useNamedParameters":"N"
},
{  
   "companyId":40034,
   "role":"Admin",
   "user":"10087",
   "extraAttrs":{  

   },
   "scriptId":"21191",
   "scriptName":"00-4skin add script",
   "version":"1",
   "scriptDescription":"YXNkZg==",
   "scriptInputParams":[  

   ],
   "scriptAttachments":[  

   ],
   "tagList":[  
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "tagName":"sd",
         "tagType":"USER_DEFINED"
      }
   ],
   "metadata":{  

   },
   "sku":{  

   },
   "parentScriptId":0,
   "parentCompanyId":0,
   "shared":"N",
   "useNamedParameters":"N"
},
       

 

/scripts/{id} 

Description: Gets details of a single script. By default, provides details of the latest version of the script.

URL structure: httpsː//smart.cloud.com/v0/scripts/id?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/scripts/89145?access_token=VUHlewcsthNeVca7Fb5zR5oKC

Method: GET

Parameters: version (optional) parameter

Sample response:

{  
   "companyId":40034,
   "role":"Admin",
   "user":"10087",
   "extraAttrs":{  

   },
   "scriptId":"22889",
   "scriptName":"DeleteScript1430124199973",
   "version":"2",
   "scriptType":"bat",
   "scriptPlatform":"",
   "scriptTags":"",
   "scriptDescription":"",
   "scriptContent":"ZWNobyAiaGVsbG8i",
   "inputParams":"",
   "scriptInputParams":[  

   ],
   "scriptAttachments":[  

   ],
   "tagList":[  

   ],
   "metadata":{  

   },
   "status":"ENABLED",
   "sku":{  

   },
   "scriptLocation":"40034/10087/1430124199787/",
   "viewableFlag":"Y",
   "parentScriptId":0,
   "parentCompanyId":0,
   "purchasedFlag":"",
   "sharedFlag":"",
   "internalToTemplate":"N",
   "type":"SCRIPT",
   "subType":"",
   "shared":"N",
   "useNamedParameters":"N"
}

   

/scripts/{id}/versions 

Description: Gets a list of versions of a script associated with a provided id

URL structure: httpsː//smart.cloud.com/v0/scripts/<id>/versions?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/scripts/89145/versions?access_token=VUHlewcsthNeVca7Fb5zR5oKC

Method: GET

Parameters: None

Response: JSON payload

Sample response:

{  
   "companyId":10000,
   "role":"Admin",
   "user":"10000",
   "extraAttrs":{  

   },
   "scriptId":"17",
   "scriptName":"New Design",
   "version":"2",
   "scriptInputParams":[  

   ],
   "scriptAttachments":[  

   ],
   "tagList":[  

   ],
   "metadata":{  

   },
   "sku":{  

   },
   "parentScriptId":0,
   "parentCompanyId":0,
   "shared":"N"
},
{  
   "companyId":10000,
   "role":"Admin",
   "user":"10000",
   "extraAttrs":{  

   },
   "scriptId":"17",
   "scriptName":"New Design",
   "version":"1",
   "scriptInputParams":[  

   ],
   "scriptAttachments":[  

   ],
   "tagList":[  

   ],
   "metadata":{  

   },
   "sku":{  

   },
   "parentScriptId":0,
   "parentCompanyId":0,
   "shared":"N"
}

 

/scripts/{id} 

Description: Deletes a script associated with a provided id

URL structure: httpsː//smart.cloud.com/v0/scripts/<id>?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/scripts/1?access_token=VUHlewcsthNeVca7Fb5zR5oKC

Method: DELETE

Parameters: None

Response: JSON payload

Sample response:

{  
   "companyId":10000,
   "role":"Admin",
   "user":"10000",
   "extraAttrs":{  

   },
   "scriptId":"1",
   "scriptInputParams":[  
      0
   ],
   "scriptAttachments":[  
      0
   ],
   "tagList":[  
      0
   ],
   "metadata":{  

   },
   "sku":{  

   },
   "parentScriptId":0,
   "parentCompanyId":0,
   "shared":"N"
}

 

/scripts/attachment 

Description: Creates a script with single or multiple file attachments.

URL structure: httpsː //smart.cloud.com/v0/scripts/attachment?access_token=<valid token generated by authentication>

URL example: httpsː //smart.cloud.com/v0/scripts/attachment?access_token=GXPibX1uHHlDbRpW6KWNItLdq

Method: POST

Content-Type: multipart/form-data

Parameters:

  • payload (required): JSON payload
  • file (optional): array of files or file list

Sample payload:  {"scriptName":"Update script","scriptType":"bat","scriptDescription":"", "scriptInputParams":[],"tagList":[],"scriptAttachments":[],"scriptContent":"bGluZTEKbGluZTIKbGluZTMKbGluZTQKbGluZTUKZWNobyAnSGknCg==","version":"1"}          

Sample response:


{  
   "companyId":10200,
   "role":"Admin",
   "user":"10144",
   "extraAttrs":{  

   },
   "scriptId":"92169",
   "scriptName":"TestAttachment",
   "version":"1",
   "scriptType":"sh",
   "scriptPlatform":"",
   "scriptTags":"[]",
   "scriptDescription":"",
   "scriptContent":"ZWNobyAiaGVlbG8i",
   "inputParams":"",
   "scriptInputParams":[  

   ],
   "scriptAttachments":[  
      {  
         "fileName":"timings",
         "location":"10200/10144/timings",
         "size":359
      }
   ],
   "tagList":[  

   ],
   "metadata":{  

   },
   "status":"ENABLED",
   "sku":{  

   },
   "scriptLocation":"10200/10144/3550566408077902/",
   "viewableFlag":"Y",
   "parentScriptId":0,
   "parentCompanyId":0,
   "purchasedFlag":"N",
   "sharedFlag":"N",
   "internalToTemplate":"N",
   "type":"SCRIPT",
   "subType":"",
   "shared":"N",
   "useNamedParameters":"N",
   "patchXDFlag":"N"
}

 

/scripts/{id}/attachment 

Description: Updates an existing script with single or multiple file attachments.

URL structure: httpsː//smart.cloud.com/v0/scripts/{id}/attachment?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/scripts/1020/attachment?access_token=GXPibX1uHHlDbRpW6KWNItLdq

Method: POST

Content-Type: multipart/form-data

Parameters:

  • payload (required): JSON payload
  • file (optional): array of files or file list

Sample payload: 

{"companyId":39120,"role":"Admin","user":"10144","extraAttrs":{},"scriptName":"TestAttachment","version":"1","scriptType":"sh","scriptPlatform":"","scriptTags":"[]","scriptDescription":"","scriptContent":"ZWNobyAiaGVlbG8i","inputParams":"","scriptInputParams":[],"scriptAttachments":[{"fileName":"timings","location":"attachments/timings","size":359}],"tagList":[],"metadata":{},"status":"ENABLED","sku":{},"viewableFlag":"Y","parentScriptId":0,"parentCompanyId":0,"purchasedFlag":"N","sharedFlag":"N","internalToTemplate":"N","type":"SCRIPT","subType":"","shared":"N","useNamedParameters":"N","patchXDFlag":"N”}

Sample response:


{  
   "companyId":10200,
   "role":"Admin",
   "user":"10144",
   "extraAttrs":{  

   },
   "scriptId":"92169",
   "scriptName":"TestAttachment",
   "version":"1",
   "scriptType":"sh",
   "scriptPlatform":"",
   "scriptTags":"[]",
   "scriptDescription":"",
   "scriptContent":"ZWNobyAiaGVlbG8i",
   "inputParams":"",
   "scriptInputParams":[  

   ],
   "scriptAttachments":[  
      {  
         "fileName":"timings",
         "location":"10200/10144/timings",
         "size":359
      }
   ],
   "tagList":[  

   ],
   "metadata":{  

   },
   "status":"ENABLED",
   "sku":{  

   },
   "scriptLocation":"10200/10144/3550566408077902/",
   "viewableFlag":"Y",
   "parentScriptId":0,
   "parentCompanyId":0,
   "purchasedFlag":"N",
   "sharedFlag":"N",
   "internalToTemplate":"N",
   "type":"SCRIPT",
   "subType":"",
   "shared":"N",
   "useNamedParameters":"N",
   "patchXDFlag":"N"
}

 

/scripts/attachment 

Description: Gets the content of a script attachment file.

URL structure: httpsː//smart.cloud.com/v0/scripts/attachment?scriptid=<valid script id>&version=<script version>&filename=<file name of the attachment>&access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/scripts/attachment?scriptid=21762&version=1&filename=7z920.exe&access_token=GXPibX1uHHlDbRpW6KWNItLdq

Method: GET

Accept: application/octet-stream

Parameters:

  • scriptid (required): ID of the script
  • version (required): Version of the script
  • filename (required): File name of the attachment

Response: Content of the attachment file in byte array format.

 

 

back to top

 

Servers

/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

Method: GET

Parameters:  

  • platform (optional), valid values Windows or Linux
  • status (optional), valid values online or offline
  • limit (optional) , default value is 100 and valid range from 1 to 100
  • offset (optional) , default value is 0 and valid value is 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/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

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

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:

  • ip (mandatory) - IP address of the machine
  • port (mandatory) - Port number to be accessed (depends on the Operating system). For example: SSH port 22 on Linux and RDP port 3389 on Windows.
  • Username (mandatory) - Login username of the machine
  • password (mandatory) - Login password of the machine
  • osn (mandatory) - Operating system running on the machine. For example: linux or windows
  • providerId (mandatory) - Provider ID associated with a resource location. You can get the ProviderId of a resource location on the Resources Locations page in Smart Tools UI.

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:

  • The following is the response when the agent installation is in progress:
{
   "id":17063,
   "type":"processing",
   "msg":"Checking Installation Status..",
   "vmInfo":{
      "ip":"10.0.74.1",
      "providerCode":"noncloud"
   }
}
  • The following is the response if the agent installation is successful:
{
   "id":17062,
   "type":"success",
   "msg":"Installation Successful.",
   "vmInfo":{
      "ip":"10.0.76.2",
      "providerCode":"noncloud"
   }
}
  • The following is the response if the agent installation is unsuccessful:
{
   "id":17972,
   "type":"failed",
   "msg":"Failed to install.",
   "vmInfo":{
      "ip":"10.0.4.21",
      "providerCode":"xenserver"
   }
}

 

back to top 

 

Jobs

/jobs 

Description: Creates  a job.

URL structure: httpsː//smart.cloud.com/v0/jobs

URL example:  https://smart.cloud.com/v0/jobs?access_token=0381wgyH5IDo5YcQp25CxBkJd

Method: POST

Parameters: JSON payload

Sample payload:{"jobName":null,"role":"Admin","runNow":true,"timeZone":null,"description":"TestJob1454661194070","destInstallDir":null,"version":"1","targets":[111],"serverGroups":[],"cronExpr":null,"jobId":null,"scriptId":"89199","scheduleType":12,"scriptType":null,"name":"TestJob1454661194070","repeatInterval":0,"startTime":0,"endTime":0,"user":"10009","repeatCount":0}

RESPONSE:  JSON payload

Sample response:

{
   "companyId":10200,
   "role":"Admin",
   "user":"10009",
   "extraAttrs":{

   },
   "name":"TestJob1454661194070",
   "description":"TestJob1454661194070",
   "scriptId":89199,
   "version":"1",
   "scriptArgs":[

   ],
   "targets":[
      111
   ],
   "scheduleType":12,
   "startTime":1454661282673,
   "endTime":86560703999673,
   "repeatCount":0,
   "repeatInterval":0,
   "offset":0,
   "jobId":54521,
   "taskParameters":[

   ],
   "serverGroups":[

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

   ],
   "jobParams":{
      "script":"Test Script1454661177974"
   },
   "credentialId":0,
   "parentJobId":0,
   "runNow":true,
   "trigger":{
      "name":"103249",
      "jobName":"54521",
      "organizationId":10200,
      "roleName":"Admin",
      "userName":"10009",
      "startTime":1454661282673,
      "endTime":86560703999673,
      "repeatCount":0,
      "repeatInterval":0,
      "timesTriggered":1,
      "prevFireTime":1454661282673,
      "volatile":false
   },
   "jobDetail":{
      "name":"TestJob1454661194070",
      "jobClass":"com.centro.sched.BasicJob",
      "jobDataMap":{
         "data":{
            "script":"Test Script1454661177974"
         }
      },
      "projectGroup":"47957",
      "targetGroup":"162589",
      "schedule":"103249",
      "jobId":54521,
      "parentJobId":0,
      "role":"Admin",
      "user":"10009",
      "organizationid":10200,
      "durable":false,
      "stateful":false,
      "volatile":false
   }
}

/jobs/{id} 

Description: Updates a job.

URL structure: httpsː//smart.cloud.com/v0/jobs/id

URL example: https://smart.cloud.com/v0/jobs/54523?access_token=0381wgyH5IDo5YcQp25CxBkJd

Method: POST

Parameters: JSON payload

Sample payload: {"jobName":null,"role":"Admin","runNow":true,"timeZone":null,"description":"UpdateJob1454661467391","destInstallDir":null,"version":"1","targets":[111],"serverGroups":[],"cronExpr":null,"jobId":null,"scriptId":"89203","scheduleType":12,"scriptType":null,"name":"UpdateJob1454661467391","repeatInterval":0,"startTime":0,"endTime":0,"user":"10009","repeatCount":0}

Response:  JSON payload

Sample response:

{
   "companyId":10200,
   "role":"Admin",
   "user":"10009",
   "extraAttrs":{

   },
   "name":"UpdateJob1454661467391",
   "description":"UpdateJob1454661467391",
   "scriptId":89203,
   "version":"1",
   "scriptArgs":[

   ],
   "targets":[
      111
   ],
   "scheduleType":12,
   "startTime":1454661524856,
   "endTime":86560703999856,
   "repeatCount":0,
   "repeatInterval":0,
   "offset":0,
   "jobId":54523,
   "taskParameters":[

   ],
   "serverGroups":[

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

   ],
   "jobParams":{

   },
   "credentialId":0,
   "parentJobId":0,
   "runNow":true
}

/jobs/{id} 

Description: Get job details based on the specified job ID.

URL structure: httpsː//smart.cloud.com/v0/jobs/<id>?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/jobs/1814?access_token=wQYgficC7jY0wypJKHbsiEYB5

Method: GET

Response:  JSON payload

Sample response:

{
   "jobName":"TestJob1429506352321",
   "role":"Admin",
   "jobRunDetails":[

   ],
   "inputParams":[
      {
         "values:":[
            ""
         ],
         "taskid":22527
      }
   ],
   "className":"com.centro.sched.BasicJob",
   "scheduleBeans":[
      {
         "dirty":false,
         "prevFireTime":1429506368528,
         "calendarType":"no calendar",
         "offset":0,
         "runNow":false,
         "nextFireTime":0,
         "timesTriggered":0,
         "jobId":23907,
         "companyId":0,
         "scheduleType":12,
         "name":"trigger_TestJob1429506352321",
         "repeatInterval":0,
         "startTime":1429506368528,
         "endTime":86560732799528,
         "extraAttrs":{

         },
         "scheduleId":104211,
         "repeatCount":0,
         "status":"complete"
      }
   ],
   "tagList":[

   ],
   "jobDataMap":{
      "data":{
         "script_type":"bat",
         "version":"1"
      }
   },
   "serverGroups":[

   ],
   "jobId":23907,
   "companyId":0,
   "processId":0,
   "parentJobId":0,
   "actionGroupId":23307,
   "targetGroupId":57101,
   "targetDetailBeans":[
      {
         "hostName":"test-zss1-db",
         "agentId":2515,
         "role":"Admin",
         "nodeMask":"",
         "osCat":"#1 SMP Fri May 20 03:51:51 BST 2011",
         "ipAddress":"50.57.187.29",
         "nodeMac":"eth0",
         "osName":"Linux",
         "osVer":"2.6.32-71.el6.x86_64",
         "nodeHw":"x86_64",
         "companyId":40034,
         "nodeDesc":"huy_tag2sdafsd",
         "user":"10087",
         "extraAttrs":{

         },
         "nodeIf":"40:40:90:c1:db:bc"
      }
   ],
   "jobDescription":"TestJob1429506352321",
   "user":"10087",
   "extraAttrs":{

   },
   "status":"scheduled"
}

  

/jobs?type=<script>&id=<id of script> 

Description: Gets a list of jobs for a given script.

URL structure: httpsː//smart.cloud.com/v0/jobs?type=<script>&id=<script_id>& access_token=<valid access token>

URL example: https://smart.cloud.com/v0/jobs?type=script&id=89151&access_token=VUHlewcsthNeVca7Fb5zR5oKC

Method: GET

Parameters: 

  • type (required), valid values are script, patch, update.
  • scriptID (optional), when type is script.

Response:  JSON payload

Sample response:

[
   {
      "actionGroupId":0,
      "targetGroupId":0,
      "jobId":1814,
      "status":"complete",
      "targetDetailBeans":[

      ],
      "serverGroups":[

      ],
      "jobName":"Sample Job",
      "jobDescription":"This job is auto-created",
      "parentJobId":0,
      "role":"Admin",
      "tagList":[

      ],
      "companyId":40042,
      "scheduleBeans":[
         {
            "scheduleId":15226,
            "jobId":0,
            "status":"complete",
            "nextFireTime":0,
            "repeatCount":0,
            "endTime":86560703999350,
            "startTime":1339353250011,
            "scheduleType":12,
            "prevFireTime":1339353250011,
            "repeatInterval":0,
            "timesTriggered":1,
            "dirty":false,
            "role":"Admin",
            "companyId":40042,
            "user":"10093"
         }
      ],
      "user":"10093"
   }
]

 

/jobs/{jobid}/runinfo 

Description: Gets run information for a job. 

URL structure: httpsː//smart.cloud.com/v0/jobs/<jobid>/runinfo?access_token=<valid access token>

Method: GET

Parameters: 

runid (optional), can specify run id.

Response: JSON payload

Sample response:

 [
   {
      "jobId":1814,
      "taskPropertyBeans":[

      ],
      "status":"complete",
      "role":"Admin",
      "companyId":40042,
      "projectId":69,
      "runId":65,
      "user":"10093",
      "runTimestamp":1339099219184
   }
] 

 

/jobs/{jobid}/runoutput?runid=<valid runid> 

Description: Gets job output from target nodes.

URL structure: httpsː//smart.cloud.com/v0/jobs/<jobid>/runoutput?runid=<validrunid>&access_token=<valid access token>

Method: GET

Parameters: 

runid required

Response:  JSON payload 

/jobs or /jobs/{id} 

Description: Creates or updates a Patch/Update job.

URL structure: httpsː//smart.cloud.com/v0/jobs

Method: POST

Parameters: JSON payload:

Ex:

curl -H "Content-Type:application/json" -d

{"name":"Apply winpatch","type":":"applypatch","endTime":0,"startTime":1341512411044,"scheduleType":12,"taskParameters":[],"repeatInterval":0,"companyId":0,"targets":[351],"scriptArgs":["Windows Malicious Software Removal Tool x64 - February 2012 (KB890830)"]}   -k  'httpsː//smart.cloud.com/v0/jobs?access_token=<valid access token>'

Response:  JSON payload

Sample response:

{
   "jobId":2074,
   "scriptType":"applypatch",
   "excludeTargets":[

   ],
   "repeatCount":0,
   "serverGroups":[

   ],
   "endTime":86560703999945,
   "startTime":1341512411044,
   "scheduleType":12,
   "taskParameters":[

   ],
   "repeatInterval":0,
   "name":"Apply winpatch",
   "role":"Admin",
   "companyId":40042,
   "scriptId":0,
   "user":"10093",
   "targets":[
      351
   ],
   "scriptArgs":[
      "Windows Malicious Software Removal Tool x64 - February 2012 (KB890830)"
   ]
}

 

back to top 

 

DeploymentProfile

/deploymentprofile/{id}

Description: Gets details of an existing deployment profile.

URL structure: httpsː//smart.cloud.com/v0/deploymentprofile/{id}?access_token=<valid access token>

URL example:  https: //smart.cloud.com/v0/deploymentprofile/2927?access_token=DOTqOd51i78K8gN61bLspZIBO

Method: GET

Sample response:

 {
   "companyId":0,
   "extraAttrs":{

   },
   "deploymentProfileId":2927,
   "deploymentProfileName":"deployProfile1446613878199",
   "description":"",
   "processId":58487,
   "processVersion":1,
   "matching":false,
   "profileDetails":[
      {
         "companyId":0,
         "extraAttrs":{

         },
         "deploymentProfileId":2927,
         "attributeName":"LAUNCH_SCRIPT_aba3ae09-046f-4c41-97ed-25a396867114",
         "attributeValue":"{\"taskName\":\"Server\",\"code\":\"LAUNCH_SCRIPT_aba3ae09-046f-4c41-97ed-25a396867114\",\"description\":\"\",\"isAsync\":false,\"timeout\":10000,\"inputs\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"instanceCount\",\"propertyValue\":\"1\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"properties\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"config\",\"propertyValue\":\"{\\\"imageId\\\":\\\"ami-50c34950\\\",\\\"provider_id\\\":\\\"818\\\",\\\"region\\\":\\\"ec2.ap-northeast-1.amazonaws.com\\\",\\\"table-id-1_length\\\":\\\"10\\\",\\\"table-id-2_length\\\":\\\"10\\\",\\\"cidr\\\":\\\"\\\",\\\"name\\\":\\\"\\\",\\\"public_subnet\\\":\\\"\\\",\\\"public_subnet_name\\\":\\\"Public subnet\\\",\\\"private_subnet\\\":\\\"\\\",\\\"private_subnet_name\\\":\\\"Private subnet\\\",\\\"nat_inst_type\\\":\\\"t2.micro\\\",\\\"instance_name\\\":\\\"Munis\\\",\\\"instance_name_suffix\\\":\\\"1\\\",\\\"auto_set_name_suffix\\\":\\\"1\\\",\\\"launch-into\\\":\\\"vpc-a57ec6c0\\\",\\\"subnet\\\":\\\"subnet-0ba00b52\\\",\\\"instanceType\\\":\\\"t1.micro\\\",\\\"root_dev_size\\\":\\\"50\\\",\\\"ebs_root_devname\\\":\\\"/dev/sda1\\\",\\\"new_key_name\\\":\\\"\\\",\\\"image-creds-choose\\\":\\\"on\\\",\\\"keyPair\\\":\\\"clmbuild_id_rsa\\\",\\\"global_private_key\\\":\\\"private_key_f33858156a64534a05afaa704fbb09a1\\\",\\\"iframe_private_key\\\":\\\"\\\",\\\"username\\\":\\\"\\\",\\\"password\\\":\\\"\\\",\\\"securityGroup\\\":\\\"sg-8bdc8cee\\\",\\\"temp-security-rule-port\\\":\\\"-1\\\",\\\"vpcid\\\":\\\"vpc-a57ec6c0\\\",\\\"ami_name\\\":\\\"Windows_Server-2012-RTM-English-64Bit-SQL_2012_SP1_Web-2015.09.09\\\",\\\"elastic_ip\\\":[\\\"\\\"],\\\"instanceCount\\\":\\\"1\\\",\\\"find_nat_instanc_id\\\":\\\"i-42bbd0e0\\\",\\\"ui\\\":\\\"<h3 class=\\\\\\\"ui header\\\\\\\">Review VM configuration</h3><div id=\\\\\\\"review\\\\\\\" class=\\\\\\\"sx-clear sx-1-cols sx-cols sx-table-layout\\\\\\\"><ul class=\\\\\\\"sx-col\\\\\\\"><li><strong>VM Name:</strong><span>Munis</span></li><li><strong>Region: </strong> <span>ec2.ap-northeast-1.amazonaws.com</span></li><li><strong>AMI: </strong> <span>Windows_Server-2012-RTM-English-64Bit-SQL_2012_SP1_Web-2015.09.09</span></li><li><strong>Root Volume Size: </strong> <span>50 GB</span></li><li class=\\\\\\\"count\\\\\\\"><strong>Number of Instances: </strong> <span>1</span></li><li><strong>Instance Type: </strong> <span>t1.micro</span></li><li><strong>Key Pair: </strong> <span>clmbuild_id_rsa</span></li><li><strong>VPC : </strong> <span>vpc-a57ec6c0 , Vinay-Vpc-DonotUse</span></li><li><strong>Subnet: </strong> <span>subnet-0ba00b52 , Private subnet</span></li><li><strong>Security Group: </strong> <span>sg-8bdc8cee</span></li></ul></div>\\\",\\\"isLogonInfoEncrypted\\\":1,\\\"code\\\":\\\"ec2\\\"}\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"configDataType\",\"propertyValue\":\"json\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"int\",\"propertyKey\":\"provider_id\",\"propertyValue\":\"818\",\"propValueArr\":[],\"required\":true,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"provider_name\",\"propertyValue\":\"ec2\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"recSpec\",\"propertyValue\":\"\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"agentInstallation\",\"propertyValue\":\"optional\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"stepCode\":\"LAUNCH_STEP\",\"className\":\"com.centro.task.step.MutatedLaunchStep\",\"runType\":\"remote\",\"onFailure\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"exit\",\"noOfRetries\":1,\"sleepMsBetweenRetries\":0},\"onTimeout\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"continue\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"args\":[],\"target\":[],\"serverGroup\":[],\"preSegment\":\"\",\"postSegment\":\"\",\"cloudBaseUrl\":\"https://manage-mon.citrix.com\",\"monBaseUrl\":\"https://manage-mon.citrix.com\",\"taskId\":0,\"version\":null,\"type\":null,\"shared\":null,\"extraAttrs\":{},\"isMutatedLaunchStep\":true,\"process\":{\"code\":\"PROCESS_4c79999b-68c9-4ec1-87ee-761437bb4493\",\"processName\":\"DB1\",\"processType\":null},\"stepFacet\":[],\"processFacet\":[],\"displayName\":\"1. Server\",\"createNewVM\":\"Y\"}"
      },
      {
         "companyId":0,
         "extraAttrs":{

         },
         "deploymentProfileId":2927,
         "attributeName":"SERVER_LIST",
         "attributeValue":"818"
      }
   ]
}       

  

/deploymentprofile/

Description: Creates a deployment profile.

URL structure: httpsː//smart.cloud.com/v0/deploymentprofile?access_token=<valid access token>

URL example: https: //smart.cloud.com/v0/deploymentprofile?access_token=DOTqOd51i78K8gN61bLspZIBO&processIdStr=58487&deploymentProfileName=deployProfile1446613878199&processVersionStr=1

Method: POST

Parameters:

  • processIDStr (required)
  • processVersionStr (required)
  • deploymentProfileName (required)
  • description (optional)
  • providerIdListStr (optional)
  • profileDetailsStr (required in API body)

Response:  JSON payload

Sample response:

{  
   "companyId":0,
   "extraAttrs":{  

   },
   "deploymentProfileId":2927,
   "deploymentProfileName":"deployProfile1446613878199",
   "description":"",
   "processId":58487,
   "processVersion":1,
   "matching":false,
   "profileDetails":[  
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "deploymentProfileId":2927,
         "attributeName":"LAUNCH_SCRIPT_aba3ae09-046f-4c41-97ed-25a396867114",
         "attributeValue":"{\"taskName\":\"Server\",\"code\":\"LAUNCH_SCRIPT_aba3ae09-046f-4c41-97ed-25a396867114\",\"description\":\"\",\"isAsync\":false,\"timeout\":10000,\"inputs\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"instanceCount\",\"propertyValue\":\"1\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"properties\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"config\",\"propertyValue\":\"{\\\"imageId\\\":\\\"ami-50c34950\\\",\\\"provider_id\\\":\\\"818\\\",\\\"region\\\":\\\"ec2.ap-northeast-1.amazonaws.com\\\",\\\"table-id-1_length\\\":\\\"10\\\",\\\"table-id-2_length\\\":\\\"10\\\",\\\"cidr\\\":\\\"\\\",\\\"name\\\":\\\"\\\",\\\"public_subnet\\\":\\\"\\\",\\\"public_subnet_name\\\":\\\"Public subnet\\\",\\\"private_subnet\\\":\\\"\\\",\\\"private_subnet_name\\\":\\\"Private subnet\\\",\\\"nat_inst_type\\\":\\\"t2.micro\\\",\\\"instance_name\\\":\\\"Munis\\\",\\\"instance_name_suffix\\\":\\\"1\\\",\\\"auto_set_name_suffix\\\":\\\"1\\\",\\\"launch-into\\\":\\\"vpc-a57ec6c0\\\",\\\"subnet\\\":\\\"subnet-0ba00b52\\\",\\\"instanceType\\\":\\\"t1.micro\\\",\\\"root_dev_size\\\":\\\"50\\\",\\\"ebs_root_devname\\\":\\\"/dev/sda1\\\",\\\"new_key_name\\\":\\\"\\\",\\\"image-creds-choose\\\":\\\"on\\\",\\\"keyPair\\\":\\\"clmbuild_id_rsa\\\",\\\"global_private_key\\\":\\\"private_key_f33858156a64534a05afaa704fbb09a1\\\",\\\"iframe_private_key\\\":\\\"\\\",\\\"username\\\":\\\"\\\",\\\"password\\\":\\\"\\\",\\\"securityGroup\\\":\\\"sg-8bdc8cee\\\",\\\"temp-security-rule-port\\\":\\\"-1\\\",\\\"vpcid\\\":\\\"vpc-a57ec6c0\\\",\\\"ami_name\\\":\\\"Windows_Server-2012-RTM-English-64Bit-SQL_2012_SP1_Web-2015.09.09\\\",\\\"elastic_ip\\\":[\\\"\\\"],\\\"instanceCount\\\":\\\"1\\\",\\\"find_nat_instanc_id\\\":\\\"i-42bbd0e0\\\",\\\"ui\\\":\\\"<h3 class=\\\\\\\"ui header\\\\\\\">Review VM configuration</h3><div id=\\\\\\\"review\\\\\\\" class=\\\\\\\"sx-clear sx-1-cols sx-cols sx-table-layout\\\\\\\"><ul class=\\\\\\\"sx-col\\\\\\\"><li><strong>VM Name:</strong><span>Munis</span></li><li><strong>Region: </strong> <span>ec2.ap-northeast-1.amazonaws.com</span></li><li><strong>AMI: </strong> <span>Windows_Server-2012-RTM-English-64Bit-SQL_2012_SP1_Web-2015.09.09</span></li><li><strong>Root Volume Size: </strong> <span>50 GB</span></li><li class=\\\\\\\"count\\\\\\\"><strong>Number of Instances: </strong> <span>1</span></li><li><strong>Instance Type: </strong> <span>t1.micro</span></li><li><strong>Key Pair: </strong> <span>clmbuild_id_rsa</span></li><li><strong>VPC : </strong> <span>vpc-a57ec6c0 , Vinay-Vpc-DonotUse</span></li><li><strong>Subnet: </strong> <span>subnet-0ba00b52 , Private subnet</span></li><li><strong>Security Group: </strong> <span>sg-8bdc8cee</span></li></ul></div>\\\",\\\"isLogonInfoEncrypted\\\":1,\\\"code\\\":\\\"ec2\\\"}\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"configDataType\",\"propertyValue\":\"json\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"int\",\"propertyKey\":\"provider_id\",\"propertyValue\":\"818\",\"propValueArr\":[],\"required\":true,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"provider_name\",\"propertyValue\":\"ec2\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"recSpec\",\"propertyValue\":\"\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"agentInstallation\",\"propertyValue\":\"optional\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"stepCode\":\"LAUNCH_STEP\",\"className\":\"com.centro.task.step.MutatedLaunchStep\",\"runType\":\"remote\",\"onFailure\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"exit\",\"noOfRetries\":1,\"sleepMsBetweenRetries\":0},\"onTimeout\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"continue\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"args\":[],\"target\":[],\"serverGroup\":[],\"preSegment\":\"\",\"postSegment\":\"\",\"cloudBaseUrl\":\"https://manage-mon.citrix.com\",\"monBaseUrl\":\"https://manage-mon.citrix.com\",\"taskId\":0,\"version\":null,\"type\":null,\"shared\":null,\"extraAttrs\":{},\"isMutatedLaunchStep\":true,\"process\":{\"code\":\"PROCESS_4c79999b-68c9-4ec1-87ee-761437bb4493\",\"processName\":\"DB1\",\"processType\":null},\"stepFacet\":[],\"processFacet\":[],\"displayName\":\"1. Server\",\"createNewVM\":\"Y\"}"
      },
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "deploymentProfileId":2927,
         "attributeName":"SERVER_LIST",
         "attributeValue":"818"
      }
   ]
}

  

/deploymentprofile/{id}

Description: Edits or modifies an existing deployment profile.

URL structure: httpsː//smart.cloud.com/v0/deploymentprofile/{id}?access_token=<valid access token>

URL example: https: //smart.cloud.com/v0/deploymentprofile/2921?access_token=DOTqOd51i78K8gN61bLspZIBO&processIdStr=58483&processVersionStr=1&deploymentProfileName=EditProfileName

Method: POST

Parameters: 

  • processIDStr (required)
  • processVersionStr (required)
  • deploymentProfileName (required)
  • description (optional)
  • providerIdListStr (optional)
  • profileDetailsStr (required in API body)

Response:  JSON payload

Sample response:

{  
   "companyId":0,
   "extraAttrs":{  

   },
   "deploymentProfileId":3159,
   "deploymentProfileName":"Xenserver1",
   "description":"",
   "processId":70601,
   "processVersion":2,
   "matching":false,
   "profileDetails":[  
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "deploymentProfileId":3159,
         "attributeName":"LAUNCH_SCRIPT_e7edf453-089d-47aa-8d94-ebc50d595f7e",
         "attributeValue":"{\"companyId\":0,\"extraAttrs\":{},\"taskId\":0,\"processId\":0,\"sequenceNumber\":0,\"taskName\":\"Server\",\"description\":\"\",\"className\":\"com.centro.task.step.MutatedLaunchStep\",\"nextTaskId\":0,\"parentTaskId\":0,\"runAsyncFlag\":0,\"continueOnFailure\":0,\"taskProperties\":[],\"taskParameters\":[],\"rootProcessId\":0,\"code\":\"LAUNCH_SCRIPT_e7edf453-089d-47aa-8d94-ebc50d595f7e\",\"runAsync\":false,\"timeout\":10000,\"stepCode\":\"LAUNCH_STEP\",\"runType\":\"remote\",\"inputs\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"instanceCount\",\"propertyValue\":\"1\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"outputs\":[],\"properties\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"config\",\"propertyValue\":\"{\\\"provider_id\\\":\\\"735\\\",\\\"instanceCount\\\":\\\"1\\\",\\\"params\\\":{\\\"name\\\":\\\"TestVM\\\",\\\"cpu\\\":\\\"2\\\",\\\"core_per_cpu\\\":\\\"1\\\",\\\"memory\\\":2147483648,\\\"instance_name_suffix\\\":\\\"1\\\",\\\"auto_set_name_suffix\\\":true,\\\"template_types\\\":\\\"custom\\\",\\\"tpl_id\\\":\\\"OpaqueRef:6a65dc0d-334b-cade-da2d-ccd2f8df50b5\\\",\\\"home_server\\\":\\\"OpaqueRef:b4fe71a5-2bef-9020-56ff-03cb2bd96044\\\",\\\"fast_clone\\\":true,\\\"tpl_distro\\\":\\\"windows\\\",\\\"boot_params\\\":\\\"\\\",\\\"agent\\\":{\\\"username\\\":\\\"administrator\\\",\\\"password\\\":\\\"2SpM1ZwSOh4vPew6T36lzDX3UwhJ1v7tRc4etc4eLdjwrIzmkqAb5jYjumLbp/GK2KbwUlAQusXp8YEqY9BLmg==\\\"},\\\"nics\\\":[{\\\"MTU\\\":\\\"1500\\\",\\\"qos_algorithm_type\\\":\\\"\\\",\\\"qos_algorithm_params\\\":[],\\\"network\\\":\\\"OpaqueRef:2185a5a8-e0a4-eb37-0e36-b93faa116f24\\\",\\\"MAC_autogenerated\\\":true,\\\"MAC\\\":\\\"\\\",\\\"network_name\\\":\\\"Network 0\\\"}],\\\"disks\\\":[{\\\"name\\\":\\\"default disk 0\\\",\\\"virtual_size\\\":\\\"68719476736\\\",\\\"sr_ref\\\":\\\"OpaqueRef:c45351ce-ccbf-df46-5a3c-04452293dd10\\\",\\\"is_new\\\":false}],\\\"install_agent\\\":\\\"1\\\",\\\"copy_sr\\\":\\\"OpaqueRef:c45351ce-ccbf-df46-5a3c-04452293dd10\\\"},\\\"ui\\\":\\\"<ul class=\\\\\\\"sx-col\\\\\\\"><li><strong>Virtual Machine Name:</strong><span>TestVM</span></li><li class=\\\\\\\"count\\\\\\\"><strong>Instance Count:</strong><span>1</span></li><li><strong>Template Name: </strong><span>nfs-windows-2012-sysprep</span></li><li><strong>Home Server: </strong><span>SCX-XS02</span></li><li><strong>Num of CPU:</strong><span>2</span></li><li><strong>Topology: </strong><span>2 socket(s) with 1 core(s) per socket</span></li><li><strong>Memory Size:</strong><span>2048 MB </span></li><li><strong>Disk: </strong><span>default disk 0:64.00 GB<br></span></li><li><strong>Network: </strong><span>Auto generated MAC Address:Network 0<br></span></li></ul>\\\",\\\"isLogonInfoEncrypted\\\":1,\\\"code\\\":\\\"xenserver\\\"}\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"configDataType\",\"propertyValue\":\"json\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"int\",\"propertyKey\":\"provider_id\",\"propertyValue\":\"735\",\"propValueArr\":[],\"required\":true,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"provider_name\",\"propertyValue\":\"xenserver\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"recSpec\",\"propertyValue\":\"\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"agentInstallation\",\"propertyValue\":\"optional\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"target\":[],\"serverGroup\":[],\"excludeTarget\":[],\"onTimeout\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"continue\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"onFailure\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"exit\",\"noOfRetries\":1,\"sleepMsBetweenRetries\":0},\"sequenceNext\":\"SHUTDOWN_PROCESS_8d688006-46f3-43cd-b1c5-b3b98b695595\",\"tagList\":[],\"cancelFlag\":true,\"outputFlag\":true,\"preSegment\":\"\",\"runAsUsernameReferenced\":false,\"runAsPasswordReferenced\":false,\"credentialId\":0,\"postSegment\":\"\",\"process\":{\"code\":\"PROCESS_3a41c71d-12a5-4a5e-a901-d16b1549ba3b\",\"processName\":\"testLaunch\",\"processType\":null},\"stepFacet\":[],\"processFacet\":[],\"displayName\":\"1. Server\",\"createNewVM\":\"Y\"}"
      },
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "deploymentProfileId":3159,
         "attributeName":"SERVER_LIST",
         "attributeValue":"735"
      },
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "deploymentProfileId":3159,
         "attributeName":"TERMINATE_3aee4ddb-4ae2-4a2d-9ee9-ce10cffa5ed8",
         "attributeValue":"{\"companyId\":0,\"extraAttrs\":{},\"taskId\":0,\"processId\":0,\"sequenceNumber\":0,\"taskName\":\"Terminate Machine\",\"description\":\"\",\"className\":\"com.centro.task.step.TerminateMachineStep\",\"nextTaskId\":0,\"parentTaskId\":0,\"runAsyncFlag\":0,\"continueOnFailure\":0,\"taskProperties\":[],\"taskParameters\":[],\"rootProcessId\":0,\"code\":\"TERMINATE_3aee4ddb-4ae2-4a2d-9ee9-ce10cffa5ed8\",\"runAsync\":false,\"timeout\":10000,\"stepCode\":\"TERMINATE_STEP\",\"runType\":\"remote\",\"inputs\":[],\"outputs\":[],\"properties\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"config\",\"propertyValue\":\"[{\\\"step_id\\\":\\\"\\\",\\\"provider_id\\\":\\\"\\\",\\\"step\\\":\\\"\\\",\\\"instanceid\\\":\\\"\\\",\\\"machine_num\\\":\\\"\\\",\\\"region\\\":\\\"\\\",\\\"stepCode\\\":\\\"\\\"}]\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"configDataType\",\"propertyValue\":\"json\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"target\":[],\"serverGroup\":[],\"excludeTarget\":[],\"onTimeout\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"continue\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"onFailure\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"exit\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"tagList\":[],\"cancelFlag\":true,\"outputFlag\":true,\"preSegment\":\"\",\"runAsUsernameReferenced\":false,\"runAsPasswordReferenced\":false,\"credentialId\":0,\"postSegment\":\"\",\"displayName\":\"Terminate Machine\"}"
      }
   ]
}

 

/deploymentprofile/{id}

Description: Deletes an existing deployment profile.

URL structure: httpsː//smart.cloud.com/v0/deploymentprofile/{id}?access_token=<valid access token>

URL example: https: //smart.cloud.com/v0/deploymentprofile/2922?access_token=DOTqOd51i78K8gN61bLspZIBO

Method: DELETE

Response:  JSON payload

Sample response:

true 

/deploymentprofile/{id}/deploy

Description: Deploys a blueprint from a deployment profile.

URL structure: httpsː //smart.cloud.com/v0/deploymentprofile/{id}/deploy?access_token=<valid access token>

URL example: https: //smart.cloud.com/v0/deploymentprofile/2907/deploy?access_token=DOTqOd51i78K8gN61bLspZIBO&processId=57613&name=9

Method: POST

Parameters: 

  • processId (required)
  • name (required)

Response:  JSON payload

 Sample response:

{  
   "processInstanceId":23529,
   "runbean":{  
      "companyId":10200,
      "role":"Admin",
      "user":"10009",
      "extraAttrs":{  
         "tags":"source:TestNegativeBP"
      },
      "name":"9",
      "scriptId":0,
      "scriptArgs":[  

      ],
      "targets":[  

      ],
      "scheduleType":12,
      "startTime":1446614529127,
      "endTime":86560703999127,
      "repeatCount":1,
      "repeatInterval":1,
      "offset":0,
      "jobId":27737,
      "taskParameters":[  

      ],
      "scriptType":"PROCESS",
      "serverGroups":[  

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

      ],
      "jobType":"ProcessJob",
      "jobParams":{  
         "instanceVersion":"1",
         "instanceLocation":"10200/10009/1446614513631/"
      },
      "credentialId":0,
      "parentJobId":0,
      "runNow":true,
      "trigger":{  
         "name":"56829",
         "jobName":"27737",
         "organizationId":10200,
         "roleName":"Admin",
         "userName":"10009",
         "startTime":1446614529127,
         "endTime":86560703999127,
         "repeatCount":1,
         "repeatInterval":60000,
         "timesTriggered":1,
         "prevFireTime":1446614529127,
         "volatile":false
      },
      "jobDetail":{  
         "name":"9",
         "jobClass":"com.centro.sched.ProcessJob",
         "jobDataMap":{  
            "data":{  
               "instanceVersion":"1",
               "instanceLocation":"10200/10009/1446614513631/"
            }
         },
         "projectGroup":"23529",
         "targetGroup":"80675",
         "schedule":"56829",
         "jobId":27737,
         "parentJobId":0,
         "role":"Admin",
         "user":"10009",
         "organizationid":10200,
         "durable":false,
         "stateful":false,
         "volatile":false
      }
   },
   "processid":57613,
   "processName":"9",
   "jobdetailid":27737
}

/deploymentprofile/list

Description: Gets a list of deployment profiles for a blueprint.

URL structure: https: //smart.cloud.com/v0/deploymentprofile/list?access_token=<access-token>&processId=<process-ID>&processVersion=<process-version>

URL example: https: //smart.cloud.com/v0/deploymentprofile/list?access_token=DOTqOd51i78K8gN61bLspZIBO&processId=58486&processVersion=1

Method: POST

Parameters: 

  • processId (required)
  • processVersion (required)
  • providerIdList (Optional)

Response:  JSON payload

Sample response:

[  
   {  
      "companyId":0,
      "extraAttrs":{  

      },
      "deploymentProfileId":3139,
      "deploymentProfileName":"Xenserver",
      "description":"Xenserver",
      "processId":70601,
      "processVersion":1,
      "matching":false,
      "profileDetails":[  
         {  
            "companyId":0,
            "extraAttrs":{  

            },
            "deploymentProfileId":3139,
            "attributeName":"LAUNCH_SCRIPT_e7edf453-089d-47aa-8d94-ebc50d595f7e",
            "attributeValue":"{\"companyId\":0,\"extraAttrs\":{},\"taskId\":0,\"processId\":0,\"sequenceNumber\":0,\"taskName\":\"Server\",\"description\":\"\",\"className\":\"com.centro.task.step.MutatedLaunchStep\",\"nextTaskId\":0,\"parentTaskId\":0,\"runAsyncFlag\":0,\"continueOnFailure\":0,\"taskProperties\":[],\"taskParameters\":[],\"rootProcessId\":0,\"code\":\"LAUNCH_SCRIPT_e7edf453-089d-47aa-8d94-ebc50d595f7e\",\"runAsync\":false,\"timeout\":10000,\"stepCode\":\"LAUNCH_STEP\",\"runType\":\"remote\",\"inputs\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"instanceCount\",\"propertyValue\":\"1\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"outputs\":[],\"properties\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"config\",\"propertyValue\":\"{\\\"provider_id\\\":\\\"735\\\",\\\"instanceCount\\\":\\\"1\\\",\\\"params\\\":{\\\"name\\\":\\\"TestVM\\\",\\\"cpu\\\":\\\"2\\\",\\\"core_per_cpu\\\":\\\"1\\\",\\\"memory\\\":2147483648,\\\"instance_name_suffix\\\":\\\"1\\\",\\\"auto_set_name_suffix\\\":true,\\\"template_types\\\":\\\"custom\\\",\\\"tpl_id\\\":\\\"OpaqueRef:6a65dc0d-334b-cade-da2d-ccd2f8df50b5\\\",\\\"home_server\\\":\\\"OpaqueRef:b4fe71a5-2bef-9020-56ff-03cb2bd96044\\\",\\\"fast_clone\\\":true,\\\"tpl_distro\\\":\\\"windows\\\",\\\"boot_params\\\":\\\"\\\",\\\"agent\\\":{\\\"username\\\":\\\"administrator\\\",\\\"password\\\":\\\"2SpM1ZwSOh4vPew6T36lzDX3UwhJ1v7tRc4etc4eLdjwrIzmkqAb5jYjumLbp/GK2KbwUlAQusXp8YEqY9BLmg==\\\"},\\\"nics\\\":[{\\\"MTU\\\":\\\"1500\\\",\\\"qos_algorithm_type\\\":\\\"\\\",\\\"qos_algorithm_params\\\":[],\\\"network\\\":\\\"OpaqueRef:2185a5a8-e0a4-eb37-0e36-b93faa116f24\\\",\\\"MAC_autogenerated\\\":true,\\\"MAC\\\":\\\"\\\",\\\"network_name\\\":\\\"Network 0\\\"}],\\\"disks\\\":[{\\\"name\\\":\\\"default disk 0\\\",\\\"virtual_size\\\":\\\"68719476736\\\",\\\"sr_ref\\\":\\\"OpaqueRef:c45351ce-ccbf-df46-5a3c-04452293dd10\\\",\\\"is_new\\\":false}],\\\"install_agent\\\":\\\"1\\\",\\\"copy_sr\\\":\\\"OpaqueRef:c45351ce-ccbf-df46-5a3c-04452293dd10\\\"},\\\"ui\\\":\\\"<ul class=\\\\\\\"sx-col\\\\\\\"><li><strong>Virtual Machine Name:</strong><span>TestVM</span></li><li class=\\\\\\\"count\\\\\\\"><strong>Instance Count:</strong><span>1</span></li><li><strong>Template Name: </strong><span>nfs-windows-2012-sysprep</span></li><li><strong>Home Server: </strong><span>SCX-XS02</span></li><li><strong>Num of CPU:</strong><span>2</span></li><li><strong>Topology: </strong><span>2 socket(s) with 1 core(s) per socket</span></li><li><strong>Memory Size:</strong><span>2048 MB </span></li><li><strong>Disk: </strong><span>default disk 0:64.00 GB<br></span></li><li><strong>Network: </strong><span>Auto generated MAC Address:Network 0<br></span></li></ul>\\\",\\\"isLogonInfoEncrypted\\\":1,\\\"code\\\":\\\"xenserver\\\"}\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"configDataType\",\"propertyValue\":\"json\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"int\",\"propertyKey\":\"provider_id\",\"propertyValue\":\"735\",\"propValueArr\":[],\"required\":true,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"provider_name\",\"propertyValue\":\"xenserver\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"recSpec\",\"propertyValue\":\"\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"agentInstallation\",\"propertyValue\":\"optional\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"target\":[],\"serverGroup\":[],\"excludeTarget\":[],\"onTimeout\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"continue\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"onFailure\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"exit\",\"noOfRetries\":1,\"sleepMsBetweenRetries\":0},\"sequenceNext\":\"SHUTDOWN_PROCESS_8d688006-46f3-43cd-b1c5-b3b98b695595\",\"tagList\":[],\"cancelFlag\":true,\"outputFlag\":true,\"preSegment\":\"\",\"runAsUsernameReferenced\":false,\"runAsPasswordReferenced\":false,\"credentialId\":0,\"postSegment\":\"\",\"process\":{\"code\":\"PROCESS_3a41c71d-12a5-4a5e-a901-d16b1549ba3b\",\"processName\":\"testLaunch\",\"processType\":null},\"stepFacet\":[],\"processFacet\":[],\"displayName\":\"1. Server\",\"createNewVM\":\"Y\"}"
         },
         {  
            "companyId":0,
            "extraAttrs":{  

            },
            "deploymentProfileId":3139,
            "attributeName":"SERVER_LIST",
            "attributeValue":"735"
         },
         {  
            "companyId":0,
            "extraAttrs":{  

            },
            "deploymentProfileId":3139,
            "attributeName":"TERMINATE_3aee4ddb-4ae2-4a2d-9ee9-ce10cffa5ed8",
            "attributeValue":"{\"companyId\":0,\"extraAttrs\":{},\"taskId\":0,\"processId\":0,\"sequenceNumber\":0,\"taskName\":\"Terminate Machine\",\"description\":\"\",\"className\":\"com.centro.task.step.TerminateMachineStep\",\"nextTaskId\":0,\"parentTaskId\":0,\"runAsyncFlag\":0,\"continueOnFailure\":0,\"taskProperties\":[],\"taskParameters\":[],\"rootProcessId\":0,\"code\":\"TERMINATE_3aee4ddb-4ae2-4a2d-9ee9-ce10cffa5ed8\",\"runAsync\":false,\"timeout\":10000,\"stepCode\":\"TERMINATE_STEP\",\"runType\":\"remote\",\"inputs\":[],\"outputs\":[],\"properties\":[{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"config\",\"propertyValue\":\"[{\\\"step_id\\\":\\\"\\\",\\\"provider_id\\\":\\\"\\\",\\\"step\\\":\\\"\\\",\\\"instanceid\\\":\\\"\\\",\\\"machine_num\\\":\\\"\\\",\\\"region\\\":\\\"\\\",\\\"stepCode\\\":\\\"\\\"}]\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false},{\"companyId\":0,\"extraAttrs\":{},\"processId\":0,\"type\":\"string\",\"propertyKey\":\"configDataType\",\"propertyValue\":\"json\",\"propValueArr\":[],\"required\":false,\"version\":1,\"editable\":true,\"visible\":true,\"deleted\":false}],\"target\":[],\"serverGroup\":[],\"excludeTarget\":[],\"onTimeout\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"continue\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"onFailure\":{\"companyId\":0,\"extraAttrs\":{},\"action\":\"exit\",\"noOfRetries\":0,\"sleepMsBetweenRetries\":0},\"tagList\":[],\"cancelFlag\":true,\"outputFlag\":true,\"preSegment\":\"\",\"runAsUsernameReferenced\":false,\"runAsPasswordReferenced\":false,\"credentialId\":0,\"postSegment\":\"\",\"displayName\":\"Terminate Machine\"}"
         }
      ]
   }
]

 

                                                                                          back to top 

 

Providers

/providers or /providers/{id} 

Description: Gets a list of all providers or a single provider.

URL structure: httpsː//smart.cloud.com/v0/providers?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/providers?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

METHOD: GET

Sample response:

[  
   {  
      "provider_id":"529",
      "costing_enabled":"Y",
      "provider_code":"ec2",
      "provider_name":"Amazon"
   },
   {  
      "provider_id":"549",
      "costing_enabled":"Y",
      "provider_code":"ec2",
      "provider_name":"ec2..."
   },
   {  
      "provider_id":"1530",
      "costing_enabled":"Y",
      "provider_code":"ec2",
      "provider_name":"Ecee"
   },
   {  
      "provider_id":"1590",
      "costing_enabled":"N",
      "provider_code":"ec2",
      "provider_name":"My EC2 Account"
   },
   {  
      "provider_id":"1818",
      "costing_enabled":"N",
      "provider_code":"ec2",
      "provider_name":"RESTEC2"
   }
]        

 

/providers or /providers/{id} 

Description: Creates or updates a provider.

URLstructure: httpsː//smart.cloud.com/v0/providers?access_token=<valid access token>

URL example: https://smart.cloud.com/v0/providers?access_token=TWkUt0YM116MKUsH3o0FOcc7o' -d "name=xen-test&providercode=xenserver&server=http://10.22.22.22&username=root&password=xspass&agentId=11495

Method: POST

Parameters:  (Note that input is different for each provider)

Common Parameters (required for all providers): 

name: the name of the provider account (e.g., "SmartToolsEC2")

providerCode: the providercode for the cloud provider you want to create/update. (providercodes are as follows: Amazon EC2 = "ec2"; Rackspace = "rackspace"; Openstack = "openstack"; Bluelock = "bluelock"; vCloud = "vcloud"; Cloudstack = "cloudstack"; Dell Cloud = "dellcloud"; Terremark Cloud= "trmkecloud"; Savvis Cloud= "savvis"; The Cloud NZ = "thecloud"; HP Cloud = "hpcloud")

Provider-specific Parameters (required for individual providers):

Amazon EC2 and Rackspace: keyID, accessKey, region

Cloudstack: username, password, server

Xen Server:server, username, password, agentId (optional, agentId of the machine acting as the connector)

Example (for Amazon EC2 provider creation):

curl  -d "name=RESTEC2&providercode=ec2&keyId=AKIAIH6EK3Z3MQYHOQ3Q&accessKey=QNdzpUuGBe/OHEiGWzZzzRA1hTaVK2b0qmnMeMQA&region=someregion" -k 'httpsː//smart.cloud.com/v0/providers?access_token=<valid access token>' 

curl -v 'https://smart.cloud.com/v0/providers?access_token=TWkUt0YM116MKUsH3o0FOcc7o' -d "name=xen-test&providercode=xenserver&server=http://10.22.22.22&username=root&password=xspass&agentId=11495" 

Response:  JSON payload

Sample response:

{
   "id":"1818",
   "provider":"ec2"
}

 

/providers/{id} 

Description: Deletes a provider.

URL structure: httpsː//smart.cloud.com/v0/providers/<id>?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/providers/1818?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: DELETE

Response:  JSON string

Sample response:

{  
   "id":"1818"
}

 

/providers/{id}/servers 

Description: Gets a list of all servers for a single provider.

URL structure: httpsː//smart.cloud.com/v0/providers/<id>/servers?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/providers/463/servers?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: GET

Sample Response:

[
   {
      "tags":{
         "Name":"RPM Cooker - 32 bit",
         "type":"rpm cooker 32 bit"
      },
      "regionCode":"ec2.us-east-1.amazonaws.com",
      "platform":"",
      "privateKey":"private_key_8d0c87ccd4f7f0ca82c6b8a5b8e851da",
      "statusName":"running",
      "regionName":"US East (Virginia)",
      "flavor":"t1.micro",
      "dnsName":"ec2-50-17-202-152.compute-1.amazonaws.com",
      "userRole":null,
      "normalized_name":"i-3680ea59",
      "ip":"50.17.202.152",
      "orgId":null,
      "statusCode":"16",
      "id":"i-3680ea59",
      "disableApiTermination":1,
      "imageId":"ami-78b04c11",
      "keyName":"karthik_EC2",
      "launchTime":"2012-08-20T19:58:19.000Z",
      "monitoringState":"",
      "userId":null,
      "name":"i-3680ea59",
      "spotInstanceRequestId":""
   },
   {
      "tags":{
         "Name":"debian cooker - 32 bit"
      },
      "regionCode":"ec2.us-east-1.amazonaws.com",
      "platform":"",
      "privateKey":"private_key_8d0c87ccd4f7f0ca82c6b8a5b8e851da",
      "statusName":"running",
      "regionName":"US East (Virginia)",
      "flavor":"t1.micro",
      "dnsName":"ec2-54-242-43-228.compute-1.amazonaws.com",
      "userRole":null,
      "normalized_name":"i-9d68d8f3",
      "ip":"54.242.43.228",
      "orgId":null,
      "statusCode":"16",
      "id":"i-9d68d8f3",
      "disableApiTermination":1,
      "imageId":"ami-0ce41865",
      "keyName":"karthik_EC2",
      "launchTime":"2012-08-20T19:58:19.000Z",
      "monitoringState":"",
      "userId":null,
      "name":"i-9d68d8f3",
      "spotInstanceRequestId":""
   },
]

 

/providers/{id}/servers/{serverid} 

Description: Performs an action on a server. 

URL structure: httpsː//smart.cloud.com/v0/providers/<id>/servers/<serverid>?access_token=<valid access token>

URL example: httpsː//smart.cloud.com/v0/providers/463/servers/i-9800f9e6?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: POST

Parameters

  • action (required) (supported values: poweron, poweroff, reboot, delete)
  • regioncode (required)

Ex:

Powers off a server on ec2:

 curl -d "action=poweroff&regioncode=ec2.us-east-1.amazonaws.com" -k  'httpsː//smart.cloud.com/v0/providers/463/servers/i-9800f9e6?access_token=<valid access token>

Response : JSON Payload

Sample response:

{
   "result":"OK"
}

 

 back to top

 

Monitoring

/monitor/rollup

Description: Gets a list of all alerts in the organization (in rollup view)

URL structure: httpsː//smart.cloud.com/v0/monitor/rollup?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/rollup?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp&page=1&limit=5

Method: GET

Parameters:

  • page (optional): User can choose the page number (for example, pg=2); default returns page 1.
  • limit (optional): User can limit the number of records returned (for example, limit=50); default returns 30 records.

Response:  JSON payload

Sample response:

{
   "total":302,
   "hosts":[
      {
         "maintenance_type":"0",
         "statusName":"enabled",
         "ipmi_privilege":"2",
         "nodeName":"placeholder",
         "maintenance_from":"0",
         "maintenances":[

         ],
         "aid":"278",
         "ipmi_username":"",
         "ipmi_disable_until":"0",
         "ipmi_errors_from":"0",
         "jmx_disable_until":"0",
         "errors_from":"0",
         "jmx_available":"0",
         "ipmi_password":"",
         "ipmi_error":"",
         "oid":"40034",
         "name":"A278C40034",
         "disable_until":"0",
         "jmx_errors_from":"0",
         "ipmi_authtype":"0",
         "groups":[
            {
               "groupid":"6"
            }
         ],
         "maintenanceid":"0",
         "host":"A278C40034",
         "error":"",
         "snmp_available":"0",
         "status":"0",
         "available":"0",
         "problem_triggers":[
            {
               "expression":"{17729}=1",
               "flags":"0",
               "error":"",
               "status":"0",
               "templateid":"0",
               "description_text":"No data from the machine for more than 3 minute",
               "type":"0",
               "lastchange":"1343366490",
               "url":"",
               "triggerid":"18296",
               "description":{
                  "trigger_value":"1",
                  "trigger_time_unit":"minute",
                  "trigger_function":"nodata",
                  "priority":4,
                  "hostname":"A278C40034",
                  "trigger_time":"3",
                  "trigger_operator":"=",
                  "key":"agent.ping"
               },
               "priority":"4",
               "hosts":[
                  {
                     "hostid":"10443"
                  }
               ],
               "value":"1",
               "value_flags":"0",
               "comments":""
            }
         ],
         "lastaccess":"0",
         "ipmi_available":"0",
         "snmp_disable_until":"0",
         "maintenance_status":"0",
         "hostid":"10443",
         "items":[
            {
               "value_type":"0",
               "trends":"365",
               "history":[

               ],
               "key_":"net.cal.out.total",
               "hostid":"10443",
               "status":"3",
               "lastclock":"1348781779",
               "lastvalue":null,
               "name":"NIC - Total Out",
               "delay":"60",
               "itemid":"49579",
               "type":"15"
            },
            {
               "value_type":"0",
               "trends":"365",
               "history":[

               ],
               "key_":"system.cpu.load[,avg1]",
               "hostid":"10443",
               "status":"0",
               "lastclock":null,
               "lastvalue":null,
               "name":"1m Rolling Avg",
               "delay":"60",
               "itemid":"49563",
               "type":"7"
            },
            {
               "value_type":"0",
               "trends":"365",
               "history":[

               ],
               "key_":"vm.memory.size[available]",
               "hostid":"10443",
               "status":"0",
               "lastclock":null,
               "lastvalue":null,
               "name":"Available",
               "delay":"60",
               "itemid":"49561",
               "type":"7"
            }
         ],
         "proxy_hostid":"0",
         "jmx_error":"",
         "snmp_error":"",
         "snmp_errors_from":"0"
      }
      {
         "maintenance_type":"0",
         "statusName":"enabled",
         "ipmi_privilege":"2",
         "nodeName":"placeholder",
         "maintenance_from":"0",
         "maintenances":[

         ],
         "aid":"1831",
         "ipmi_username":"",
         "ipmi_disable_until":"0",
         "ipmi_errors_from":"0",
         "jmx_disable_until":"0",
         "errors_from":"0",
         "jmx_available":"0",
         "ipmi_password":"",
         "ipmi_error":"",
         "oid":"40034",
         "name":"A1831C40034",
         "disable_until":"0",
         "jmx_errors_from":"0",
         "ipmi_authtype":"0",
         "groups":[
            {
               "groupid":"6"
            }
         ],
         "maintenanceid":"0",
         "host":"A1831C40034",
         "error":"",
         "snmp_available":"0",
         "status":"0",
         "available":"0",
         "problem_triggers":[
            {
               "expression":"{13823}<20",
               "flags":"0",
               "error":"Zabbix was restarted.",
               "status":"0",
               "templateid":"0",
               "description_text":"vfs.fs.size[C:,pfree] was less than 20 for more than 2 minute",
               "type":"0",
               "lastchange":"1340193307",
               "url":"",
               "triggerid":"14394",
               "description":{
                  "trigger_value":"20",
                  "trigger_time_unit":"minute",
                  "trigger_function":"last",
                  "priority":2,
                  "hostname":"A1831C40034",
                  "trigger_time":"2",
                  "trigger_operator":"<",
                  "key":"vfs.fs.size[C:,pfree]"
               },
               "priority":"2",
               "hosts":[
                  {
                     "hostid":"10152"
                  }
               ],
               "value":"1",
               "value_flags":"1",
               "comments":""
            },
            {
               "expression":"{13824}>1",
               "flags":"0",
               "error":"Zabbix was restarted.",
               "status":"0",
               "templateid":"0",
               "description_text":"Physical Memory Page file % Used was greater than 1 for more than 2 minute",
               "type":"0",
               "lastchange":"1340193307",
               "url":"",
               "triggerid":"14395",
               "description":{
                  "trigger_value":"1",
                  "trigger_time_unit":"minute",
                  "trigger_function":"avg",
                  "priority":"4",
                  "hostname":"A1831C40034",
                  "trigger_time":"2",
                  "trigger_operator":">",
                  "key":"perf_counter[\"\\Paging File(_Total)\\% Usage\"]"
               },
               "priority":"4",
               "hosts":[
                  {
                     "hostid":"10152"
                  }
               ],
               "value":"1",
               "value_flags":"1",
               "comments":""
            },
            {
               "expression":"{13827}=1",
               "flags":"0",
               "error":"Item not supported for function: {A1831C40034:agent.ping.nodata(180)}",
               "status":"0",
               "templateid":"0",
               "description_text":"No data from the machine for more than 3 minute",
               "type":"0",
               "lastchange":"1340193360",
               "url":"",
               "triggerid":"14398",
               "description":{
                  "trigger_value":"1",
                  "trigger_time_unit":"minute",
                  "trigger_function":"nodata",
                  "priority":4,
                  "hostname":"A1831C40034",
                  "trigger_time":"3",
                  "trigger_operator":"=",
                  "key":"agent.ping"
               },
               "priority":"4",
               "hosts":[
                  {
                     "hostid":"10152"
                  }
               ],
               "value":"1",
               "value_flags":"1",
               "comments":""
            }
         ],
         "lastaccess":"0",
         "ipmi_available":"0",
         "snmp_disable_until":"0",
         "maintenance_status":"0",
         "hostid":"10152",
         "items":[
            {
               "value_type":"0",
               "trends":"365",
               "history":[

               ],
               "key_":"net.cal.out.total",
               "hostid":"10152",
               "status":"3",
               "lastclock":"1348781328",
               "lastvalue":"8.000000",
               "name":"NIC - Total Out",
               "delay":"60",
               "itemid":"26928",
               "type":"15"
            },
            {
               "value_type":"0",
               "trends":"365",
               "history":[

               ],
               "key_":"system.cpu.load[,avg1]",
               "hostid":"10152",
               "status":"0",
               "lastclock":"1340683858",
               "lastvalue":"0.083333",
               "name":"1m Rolling Avg",
               "delay":"60",
               "itemid":"26924",
               "type":"7"
            },
            {
               "value_type":"0",
               "trends":"365",
               "history":[

               ],
               "key_":"vm.memory.size[available]",
               "hostid":"10152",
               "status":"0",
               "lastclock":"1340683858",
               "lastvalue":"237375488.000000",
               "name":"Available",
               "delay":"60",
               "itemid":"26922",
               "type":"7"
            }
         ],
         "proxy_hostid":"0",
         "jmx_error":"",
         "snmp_error":"",
         "snmp_errors_from":"0"
      }
   ]
}               

 

/monitor/{id}

Description: Gets monitoring status for a node/agent.

URL structure: httpsː//smart.cloud.com/v0/monitor/<id>?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/1529?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: GET

Response:  JSON payload

Sample response:

{
   "code":"enabled",
   "alertsEnabled":"y",
   "msg":"Host is enabled"
}

 

/monitor/{id}

Description: Enables/disables monitoring on a node/agent.

URL structure: httpsː//smart.cloud.com/v0/monitor/<id>?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/1529?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: POST

Parameters:

enable (required): value is "No"/"N" to disable; and "Yes"/"Y" to enable.

curl  -d "enable=NO" -k 'httpsː//smart.cloud.com/v0/monitor/1529?access_token=<valid access token>'

Response:  JSON payload

Sample response:

{
   "task":"364777"
}

 

/monitor/{id}/alerts

Description: Gets alerts for a node/agent.

URL STRUCTURE: httpsː//smart.cloud.com/v0/monitor/<id>/alerts?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/1529/alerts?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: GET

Response:  JSON payload

Sample response:

[
   {
      "uid":"0",
      "id":"88487",
      "eval_type":"0",
      "triggerids":[
         "24550"
      ],
      "zabbix_action_id":"10377",
      "oid":"40034",
      "priority":2,
      "description":"Determine if a storage medium is nearing full capacity.",
      "action_times":1,
      "name":"Low Free Disk",
      "aid":"1529",
      "actions":[
         {
            "sub_type":"email",
            "type":"notify",
            "objects":[
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com"
            ]
         }
      ]
   },
   {
      "uid":"0",
      "id":"88488",
      "eval_type":"0",
      "triggerids":[
         "24551"
      ],
      "zabbix_action_id":"10378",
      "oid":"40034",
      "priority":"4",
      "description":"Determine if there are processes waiting for processor time by testing the CPU load average.",
      "action_times":1,
      "name":"High CPU Load",
      "aid":"1529",
      "actions":[
         {
            "sub_type":"email",
            "type":"notify",
            "objects":[
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com"
            ]
         }
      ]
   },
   {
      "uid":"0",
      "id":"88489",
      "eval_type":0,
      "triggerids":[
         "24552"
      ],
      "zabbix_action_id":"10379",
      "oid":"40034",
      "priority":4,
      "description":"There is no data coming from endpoint",
      "action_times":1,
      "name":"No Data",
      "aid":"1529",
      "actions":[
         {
            "sub_type":"email",
            "type":"notify",
            "objects":[
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com",
               "emailexample@domain.com"
            ]
         }
      ]
   }
]

 

/monitor/{id}/alerts/enable

Description: Enables alerts for a node/agent.

URL structure: httpsː//smart.cloud.com/v0/monitor/<id>/alerts/enable?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/1529/alerts/enable?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: GET

Response:  JSON payload

Sample response:

{
   "oid":"40034",
   "aid":"1529"
}

 

/monitor/{id}/alerts/disable

Description: Disables alerts for a node/agent.

URL STRUCTURE: httpsː//smart.cloud.com/v0/monitor/<id>/alerts/disable?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/1529/alerts/disable?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: GET

Response:  JSON payload

Sample response:

{
   "oid":"40034",
   "aid":"1529"
}

 

 

/monitor/{id}/events

Description: Gets events for a node/agent.

URL structure: httpsː//smart.cloud.com/v0/monitor/<id>/events?access_token=<valid token generated by authentication>&limit=<no>&timestamp=<epochtime in milliseconds>

URL example: httpsː//smart.cloud.com/v0/monitor/1529/events?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp&limit=5

Method: GET

Parameters:

  • timestamp (optional): user can give end time in the form of epoch time in milliseconds (ex: timestamp=1348784568); default is current time in milliseconds
  • limit (optional): user can limit number of records shown (ex: limit=50); default returns 25 records.

Response:  JSON payload

Sample response:

[
   {
      "expression":"{24069}<20",
      "ns":"833109614",
      "clock":"1348782893",
      "object":"0",
      "description_text":"Disk Usage /dev/xvda1 Free % was less than 20 for more than 2 minute",
      "eventid":"1141064",
      "duration":1397,
      "source":"0",
      "description":{
         "trigger_value":"20",
         "trigger_time_unit":"minute",
         "trigger_function":"last",
         "priority":2,
         "hostname":"A1529C40034",
         "trigger_time":"2",
         "trigger_operator":"<",
         "key":"vfs.fs.size[/,pfree]"
      },
      "priority":"2",
      "acknowledged":"0",
      "value":"0",
      "objecti d":"24630",
      "value_changed":"0"
   },
   {
      "expression":"{24070}>2",
      "ns":"950022830",
      "clock":"1348782833",
      "object":"0",
      "description_text":"CPU 1m Rolling Avg was greater than 2 for more than 3 minute",
      "eventid":"1141059",
      "duration":1457,
      "source":"0",
      "description":{
         "trigger_value":"2",
         "trigger_time_unit":"minute",
         "trigger_function":"avg",
         "priority":"4",
         "hostname":"A1529C40034",
         "trigger_time":"3",
         "trigger_operator":">",
         "key":"system.cpu.load[,avg1]"
      },
      "priority":"4",
      "acknowledged":"0",
      "value":"0",
      "objectid":"24631",
      "value_changed":"0"
   },
   {
      "expression":"{24071}=1",
      "ns":"633670912",
      "clock":"1348782833",
      "object":"0",
      "description_text":"No data from the machine for more than 3 minute",
      "eventid":"1141057",
      "duration":1457,
      "source":"0",
      "description":{
         "trigger_value":"1",
         "trigger_time_unit":"minute",
         "trigger_function":"nodata",
         "priority":4,
         "hostname":"A1529C40034",
         "trigger_time":"3",
         "trigger_operator":"=",
         "key":"agent.ping"
      },
      "priority":"4",
      "acknowledged":"0",
      "value":"0",
      "objectid":"24632",
      "value_changed":"1"
   },
   {
      "expression":"{24071}=1",
      "ns":"669773353",
      "clock":"1348782810",
      "object":"0",
      "description_text":"No data from the machine for more than 3 minute",
      "eventid":"1141055",
      "duration":1480,
      "source":"0",
      "description":{
         "trigger_value":"1",
         "trigger_time_unit":"minute",
         "trigger_function":"nodata",
         "priority":4,
         "hostname":"A1529C40034",
         "trigger_time":"3",
         "trigger_operator":"=",
         "key":"agent.ping"
      },
      "priority":"4",
      "acknowledged":"0",
      "value":"1",
      "objectid":"24632",
      "value_changed":"1"
   },
   {
      "expression":"{24071}=1",
      "ns":"0",
      "clock":"1348782680",
      "object":"0",
      "description_text":"No data from the machine for more than 3 minute",
      "eventid":"1141051",
      "duration":1610,
      "source":"0",
      "description":{
         "trigger_value":"1",
         "trigger_time_unit":"minute",
         "trigger_function":"nodata",
         "priority":4,
         "hostname":"A1529C40034",
         "trigger_time":"3",
         "trigger_operator":"=",
         "key":"agent.ping"
      },
      "priority":"4",
      "acknowledged":"0",
      "value":"2",
      "objectid":"24632",
      "value_changed":"0"
   }
]

 

/monitor/{id}/metrics

Description: Gets metrics for a node/agent.

URL structure: httpsː//smart.cloud.com/v0/monitor/<id>/metrics?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/1529/metrics?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: GET

Response:  JSON payload

Sample response:

{
   "Database":{
      "memcached":[

      ],
      "redis":[

      ],
      "postgresql":[

      ],
      "mysql":[

      ],
      "mongo":[

      ]
   },
   "Web Servers":{
      "nginx":[

      ],
      "apache":[

      ]
   },
   "Load Balancer":{
      "haproxy":[

      ]
   },
   "JMX":{
      "jmx":[

      ]
   },
   "System":{
      "process":[
         {
            "logtimefmt":"",
            "type":"7",
            "inventory_link":"0",
            "password":"",
            "username":"",
            "lastlogsize":"0",
            "data_type":"0",
            "description":"Processes",
            "applications":[
               {
                  "applicationid":"8315"
               }
            ],
            "trapper_hosts":"",
            "privatekey":"",
            "valuemapid":"0",
            "status":"0",
            "snmp_community":"",
            "delta":"0",
            "mtime":"0",
            "snmpv3_authpassphrase":"",
            "lastclock":"1348781858",
            "lastvalue":"65.000000",
            "delay":"60",
            "filter":"",
            "value_type":"0",
            "trends":"365",
            "port":"",
            "authtype":"0",
            "lastns":"740346263",
            "itemid":"110807",
            "snmp_oid":"",
            "publickey":"",
            "snmpv3_securitylevel":"0",
            "prevvalue":"65.000000",
            "name":"Processes",
            "interfaceid":"0",
            "snmpv3_privpassphrase":"",
            "flags":"0",
            "lifetime":"30",
            "error":"",
            "templateid":"0",
            "delay_flex":"",
            "params":"",
            "multiplier":"0",
            "units":"",
            "key_":"proc.num[]",
            "history":"1",
            "hostid":"11447",
            "prevorgvalue":"0",
            "ipmi_sensor":"",
            "snmpv3_securityname":"",
            "formula":"1"
         },
         {
            "logtimefmt":"",
            "type":"7",
            "inventory_link":"0",
            "password":"",
            "username":"",
            "lastlogsize":"0",
            "data_type":"0",
            "description":"Running Processes",
            "applications":[
               {
                  "applicationid":"8315"
               }
            ],
            "trapper_hosts":"",
            "privatekey":"",
            "valuemapid":"0",
            "status":"0",
            "snmp_community":"",
            "delta":"0",
            "mtime":"0",
            "snmpv3_authpassphrase":"",
            "lastclock":"1348781858",
            "lastvalue":"1.000000",
            "delay":"60",
            "filter":"",
            "value_type":"0",
            "trends":"365",
            "port":"",
            "authtype":"0",
            "lastns":"730774263",
            "itemid":"110808",
            "snmp_oid":"",
            "publickey":"",
            "snmpv3_securitylevel":"0",
            "prevvalue":"1.000000",
            "name":"Running Processes",
            "interfaceid":"0",
            "snmpv3_privpassphrase":"",
            "flags":"0",
            "lifetime":"30",
            "error":"",
            "templateid":"0",
            "delay_flex":"",
            "params":"",
            "multiplier":"0",
            "units":"",
            "key_":"proc.num[,,run]",
            "history":"1",
            "hostid":"11447",
            "prevorgvalue":"0",
            "ipmi_sensor":"",
            "snmpv3_securityname":"",
            "formula":"1"
         }                                   
      ]
   }
}  

 

/monitor/{id}/history

Description: Gets time series metric data for a node/agent.

URL structure: httpsː//smart.cloud.com/v0/monitor/<id>/metrics?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/1529/history?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp&from=1359246677&till=1359256623&type=application&application=cpu

Method: GET

Parameters:

  • from (required): user can give start time in the form of epoch time in seconds); default is current time in ....
  • till (required): user can give end time in the form of epoch time in seconds); default is current time in ....
  • type (required): must be one of these : application OR item
  • application (required if type is application): must an application that is valid for this node / agent Ex:cpu
  • itemid[] (required if type is item): must an itemid that is valid for this node / agent Ex:cpu See /monitor/{id}/metrics

Response:  JSON payload

Sample response (application):

{
   "114004":{
      "history":[
         {
            "clock":"1357142400",
            "value":"0.0393"
         },
         {
            "clock":"1357146000",
            "value":"0.0450"
         },
         {
            "clock":"1357149600",
            "value":"0.0410"
         },
         {
            "clock":"1357153200",
            "value":"0.0478"
         },
         {
            "clock":"1357156800",
            "value":"0.0503"
         },
         {
            "clock":"1357160400",
            "value":"0.0127"
         },
         {
            "clock":"1357164000",
            "value":"0.0308"
         },
         {
            "clock":"1357167600",
            "value":"0.0092"
         },
         {
            "clock":"1357171200",
            "value":"0.0182"
         },
         {
            "clock":"1357174800",
            "value":"0.0486"
         },
         {
            "clock":"1357178400",
            "value":"0.0197"
         },
         {
            "clock":"1357182000",
            "value":"0.0303"
         },
         {
            "clock":"1357185600",
            "value":"0.0115"
         },
         {
            "clock":"1357189200",
            "value":"0.0303"
         },
         {
            "clock":"1357192800",
            "value":"0.0248"
         },
         {
            "clock":"1357196400",
            "value":"0.0298"
         },
         {
            "clock":"1357200000",
            "value":"0.0248"
         },
         {
            "clock":"1357203600",
            "value":"0.0205"
         }
      ],
      "item":{
         "itemid":"114004",
         "hostid":"10412",
         "key_":"system.cpu.load[,avg1]",
         "name":"1m Rolling Avg",
         "type":"7",
         "delay":"60",
         "history":"1",
         "trends":"365",
         "lastvalue":"0.000000",
         "lastclock":"1359619032",
         "status":"0",
         "value_type":"0",
         "units":"",
         "multiplier":"0",
         "delta":"0",
         "description":"1m Rolling Avg",
         "applications":[
            {
               "applicationid":"9713"
            }
         ],
         "application_name":"CPU"
      }
   }

 

/monitor/dashboards

Description: Gets monitoring dashboards for a role.

URL structure: httpsː//smart.cloud.com/v0/monitor/<id>/dashboards?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/dashboards?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: GET

Sample response:

[
   {
      "id":"527",
      "icon":"3.png",
      "oid":"40034",
      "name":"forSkinning",
      "graphids":[
         "2148",
         "2149",
         "2147",
         "2146"
      ],
      "graphs":[
         {
            "id":"2146",
            "aggregator":"",
            "items":[

            ],
            "oid":"40034",
            "name":"CPU"
         },
         {
            "id":"2147",
            "aggregator":"",
            "items":[

            ],
            "oid":"40034",
            "name":"Disk"
         },
         {
            "id":"2148",
            "aggregator":"",
            "items":[
               {
                  "aid":"2480",
                  "itemid":"77629"
               },
               {
                  "aid":"2480",
                  "itemid":"77631"
               }
            ],
            "oid":"40034",
            "name":"Network"
         },
         {
            "id":"2149",
            "aggregator":"",
            "items":[
               {
                  "aid":"3311",
                  "itemid":"177434"
               }
            ],
            "oid":"40034",
            "name":"Network"
         }
      ]
   },
   {
      "id":"538",
      "icon":"0.png",
      "oid":"40034",
      "name":"sample",
      "graphids":[
         "2174"
      ],
      "graphs":[
         {
            "id":"2174",
            "aggregator":"",
            "items":[
               {
                  "aid":"3370",
                  "itemid":"185533"
               },
               {
                  "aid":"3373",
                  "itemid":"185604"
               }
            ],
            "oid":"40034",
            "name":"counting"
         }
      ]
   }
]  

 

/monitor/graphs/{id}

Description: Gets time series data for a graph.

URL structure: httpsː//smart.cloud.com/v0/monitor/graphs/<id>?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/monitor/graphs/<id>?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp&from=1359246677&till=1359256623

Method: GET

Parameters:

  • from (required): user can give start time in the form of epoch time in seconds); default is current time in ....
  • till (required): user can give end time in the form of epoch time in seconds); default is current time in ....

Sample response:

[
   {
      "history":[

      ],
      "aid":"306"
   },
   {
      "history":[
         {
            "clock":"1359248400",
            "value":"0.0000"
         },
         {
            "clock":"1359252000",
            "value":"0.0000"
         },
         {
            "clock":"1359255600",
            "value":"0.0000"
         }
      ],
      "item":{
         "trends":"365",
         "value_type":"0",
         "application_name":"network",
         "status":"0",
         "delta":"1",
         "aid":"17",
         "itemid":"37384",
         "type":"7",
         "multiplier":"0",
         "units":"B",
         "applicationid":"2023",
         "key_":"net.if.total[eth1,errors]",
         "history":"1",
         "display_name":"Network NIC - eth1 Total Error",
         "hostid":"10576",
         "lastclock":"1359617402",
         "oid":"10804",
         "description":"NIC - eth1 Total Error",
         "name":"NIC - eth1 Total Error",
         "lastvalue":"0.000000",
         "delay":"60",
         "application_display_name":"Network"
      },
      "aid":"306"
   },
   {
      "history":[

      ],
      "aid":"306"
   },
   {
      "history":[

      ],
      "aid":"545"
   }
]  

 

back to top

 

Blueprint

/process

DESCRIPTION: Creates a Process.

URL STRUCTURE: 

httpsː//smart.cloud.com/v0/process?access_token=<valid token generated by authentication>

METHOD: POST

INPUT: JSON payload

Ex:

{
   "startCode":"SCRIPT1",
   "excludeTarget":[

   ],
   "processId":257,
   "processName":"REST Test",
   "subProcesses":[

   ],
   "startTaskId":0,
   "outputs":[

   ],
   "targets":[

   ],
   "processParameters":[

   ],
   "excludeTargets":[

   ],
   "parentProcessId":0,
   "tasks":[
      {
         "continueOnFailure":0,
         "excludeTarget":[

         ],
         "processId":0,
         "taskName":"SCRIPT1",
         "sequenceNumber":0,
         "nextTaskId":0,
         "outputs":[

         ],
         "parentTaskId":0,
         "stepCode":"RUN_SCRIPT_STEP",
         "taskId":0,
         "runType":"remote",
         "sequenceNext":"SCRIPT2",
         "code":"SCRIPT1",
         "properties":[
            {
               "processId":0,
               "propertyValue":"7545",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"4",
               "propertyKey":"version",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"40034/10087/1351197110403/",
               "propertyKey":"scriptLocation",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":".sh",
               "propertyKey":"scriptType",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "runAsyncFlag":0,
         "runAsync":false,
         "inputs":[

         ],
         "taskParameters":[

         ],
         "target":[

         ],
         "taskProperties":[

         ],
         "serverGroup":[

         ],
         "tagList":[

         ],
         "companyId":0,
         "timeout":0,
         "rootProcessId":0
      },
      {
         "continueOnFailure":0,
         "taskId":0,
         "runType":"remote",
         "processId":0,
         "excludeTarget":[

         ],
         "properties":[
            {
               "processId":0,
               "propertyValue":"7339",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"3",
               "propertyKey":"version",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"40034/10087/1349374450927/",
               "propertyKey":"scriptLocation",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":".sh",
               "propertyKey":"scriptType",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "code":"SCRIPT2",
         "runAsyncFlag":0,
         "taskName":"SCRIPT2",
         "sequenceNumber":0,
         "runAsync":false,
         "taskParameters":[

         ],
         "inputs":[

         ],
         "nextTaskId":0,
         "target":[

         ],
         "taskProperties":[

         ],
         "companyId":0,
         "tagList":[

         ],
         "serverGroup":[

         ],
         "outputs":[

         ],
         "parentTaskId":0,
         "rootProcessId":0,
         "timeout":0,
         "stepCode":"RUN_SCRIPT_STEP"
      }
   ],
   "code":"P1",
   "properties":[

   ],
   "serverGroups":[

   ],
   "migratedFlag":false,
   "runAsync":false,
   "parentCompanyId":0,
   "schedule":{
      "startTime":1363213908845,
      "scheduleType":12,
      "scheduleId":0,
      "prevFireTime":0,
      "jobId":0,
      "repeatInterval":1,
      "timesTriggered":0,
      "nextFireTime":0,
      "dirty":false,
      "repeatCount":1,
      "companyId":0,
      "endTime":86560732799852
   },
   "parentGroupId":0,
   "inputs":[
      {
         "processId":0,
         "propertyValue":"123",
         "propertyKey":"key",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      }
   ],
   "target":[
      {
         "processId":0,
         "propertyValue":"2515",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      },
      {
         "processId":0,
         "propertyValue":"2478",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      }
   ],
   "companyId":0,
   "tagList":[

   ],
   "serverGroup":[

   ],
   "rootProcessId":0,
   "timeout":0
}

  

RESPONSE:  JSON payload.

Sample response:

{
   "startCode":"SCRIPT1",
   "excludeTarget":[

   ],
   "processId":8277,
   "location":"40034/10087/1363214938869/",
   "processName":"REST Test",
   "version":"1",
   "subProcesses":[

   ],
   "activeFlag":"Y",
   "startTaskId":0,
   "role":"Admin",
   "outputs":[

   ],
   "targets":[

   ],
   "processParameters":[

   ],
   "sharedFlag":"N",
   "excludeTargets":[

   ],
   "parentProcessId":0,
   "serverGroups":[

   ],
   "tasks":[
      {
         "continueOnFailure":0,
         "processId":0,
         "excludeTarget":[

         ],
         "taskName":"SCRIPT1",
         "sequenceNumber":0,
         "nextTaskId":0,
         "outputs":[

         ],
         "parentTaskId":0,
         "stepCode":"RUN_SCRIPT_STEP",
         "taskId":0,
         "runType":"remote",
         "sequenceNext":"SCRIPT2",
         "code":"SCRIPT1",
         "properties":[
            {
               "processId":0,
               "propertyValue":"7545",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"4",
               "propertyKey":"version",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"40034/10087/1351197110403/",
               "propertyKey":"scriptLocation",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":".sh",
               "propertyKey":"scriptType",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "runAsyncFlag":0,
         "runAsync":false,
         "taskParameters":[

         ],
         "inputs":[

         ],
         "target":[

         ],
         "taskProperties":[

         ],
         "serverGroup":[

         ],
         "tagList":[

         ],
         "companyId":0,
         "timeout":0,
         "rootProcessId":0
      },
      {
         "continueOnFailure":0,
         "taskId":0,
         "excludeTarget":[

         ],
         "runType":"remote",
         "processId":0,
         "properties":[
            {
               "processId":0,
               "propertyValue":"7339",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"3",
               "propertyKey":"version",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"40034/10087/1349374450927/",
               "propertyKey":"scriptLocation",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":".sh",
               "propertyKey":"scriptType",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "code":"SCRIPT2",
         "runAsyncFlag":0,
         "taskName":"SCRIPT2",
         "sequenceNumber":0,
         "runAsync":false,
         "inputs":[

         ],
         "taskParameters":[

         ],
         "nextTaskId":0,
         "target":[

         ],
         "taskProperties":[

         ],
         "companyId":0,
         "tagList":[

         ],
         "serverGroup":[

         ],
         "outputs":[

         ],
         "parentTaskId":0,
         "rootProcessId":0,
         "timeout":0,
         "stepCode":"RUN_SCRIPT_STEP"
      }
   ],
   "code":"P1",
   "properties":[

   ],
   "migratedFlag":true,
   "runAsync":false,
   "schedule":{
      "startTime":1363215025984,
      "scheduleType":12,
      "scheduleId":0,
      "prevFireTime":0,
      "jobId":0,
      "repeatInterval":1,
      "timesTriggered":0,
      "nextFireTime":0,
      "dirty":false,
      "repeatCount":1,
      "companyId":0,
      "endTime":86560732799995
   },
   "templateFlag":"Y",
   "parentCompanyId":0,
   "parentGroupId":0,
   "inputs":[
      {
         "processId":0,
         "propertyValue":"123",
         "propertyKey":"key",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      }
   ],
   "purchasedFlag":"N",
   "target":[
      {
         "processId":0,
         "propertyValue":"2515",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      },
      {
         "processId":0,
         "propertyValue":"2478",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      }
   ],
   "companyId":40034,
   "tagList":[

   ],
   "serverGroup":[

   ],
   "user":"10087",
   "rootProcessId":0,
   "timeout":0
}

 

/process/{id}

Description: Edits a process.

URL structure: httpsː//smart.cloud.com/v0/process/<id>?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/process/8567?access_token=yVWQ5Gdus43Gm7XOh34AHgPhp

Method: POST

Input: JSON payload

Ex:

{
   "startCode":"SCRIPT1",
   "processId":0,
   "excludeTarget":[

   ],
   "processName":"REST Test",
   "subProcesses":[
      {
         "startCode":"SCRIPT3",
         "processId":0,
         "excludeTarget":[

         ],
         "processName":"Sub process1",
         "subProcesses":[

         ],
         "startTaskId":0,
         "outputs":[

         ],
         "targets":[

         ],
         "processParameters":[

         ],
         "excludeTargets":[

         ],
         "parentProcessId":0,
         "tasks":[
            {
               "continueOnFailure":0,
               "excludeTarget":[

               ],
               "processId":0,
               "taskName":"SCRIPT3",
               "sequenceNumber":0,
               "nextTaskId":0,
               "outputs":[

               ],
               "parentTaskId":0,
               "stepCode":"RUN_SCRIPT_STEP",
               "taskId":0,
               "runType":"remote",
               "sequenceNext":"SCRIPT4",
               "code":"SCRIPT3",
               "properties":[
                  {
                     "processId":0,
                     "propertyValue":"7545",
                     "propertyKey":"scriptId",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  },
                  {
                     "processId":0,
                     "propertyValue":".sh",
                     "propertyKey":"scriptType",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  }
               ],
               "runAsyncFlag":0,
               "runAsync":false,
               "inputs":[
                  {
                     "processId":0,
                     "propertyValue":"P2.inputs[0].key1",
                     "propertyKey":"key2",
                     "companyId":0,
                     "required":false,
                     "type":"reference",
                     "propValueArr":[

                     ]
                  }
               ],
               "taskParameters":[

               ],
               "target":[

               ],
               "taskProperties":[

               ],
               "serverGroup":[

               ],
               "tagList":[

               ],
               "companyId":0,
               "timeout":0,
               "rootProcessId":0
            },
            {
               "continueOnFailure":0,
               "taskId":0,
               "runType":"remote",
               "processId":0,
               "excludeTarget":[

               ],
               "properties":[
                  {
                     "processId":0,
                     "propertyValue":".sh",
                     "propertyKey":"scriptType",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  }
               ],
               "code":"SCRIPT4",
               "runAsyncFlag":0,
               "taskName":"SCRIPT4",
               "sequenceNumber":0,
               "runAsync":false,
               "taskParameters":[

               ],
               "inputs":[

               ],
               "nextTaskId":0,
               "target":[

               ],
               "taskProperties":[

               ],
               "companyId":0,
               "tagList":[

               ],
               "serverGroup":[

               ],
               "outputs":[

               ],
               "parentTaskId":0,
               "rootProcessId":0,
               "timeout":0,
               "stepCode":"RUN_SCRIPT_STEP"
            }
         ],
         "code":"P2",
         "properties":[

         ],
         "serverGroups":[

         ],
         "migratedFlag":false,
         "runAsync":false,
         "parentCompanyId":0,
         "parentGroupId":0,
         "inputs":[
            {
               "processId":0,
               "propertyValue":"P1.inputs[0].key",
               "propertyKey":"key1",
               "companyId":0,
               "required":false,
               "type":"reference",
               "propValueArr":[

               ]
            }
         ],
         "target":[

         ],
         "companyId":0,
         "tagList":[

         ],
         "serverGroup":[

         ],
         "rootProcessId":0,
         "timeout":0
      }
   ],
   "startTaskId":0,
   "outputs":[

   ],
   "targets":[

   ],
   "processParameters":[

   ],
   "excludeTargets":[

   ],
   "parentProcessId":0,
   "tasks":[
      {
         "continueOnFailure":0,
         "excludeTarget":[

         ],
         "processId":0,
         "taskName":"SCRIPT1",
         "sequenceNumber":0,
         "nextTaskId":0,
         "outputs":[

         ],
         "parentTaskId":0,
         "stepCode":"RUN_SCRIPT_STEP",
         "taskId":0,
         "runType":"remote",
         "sequenceNext":"SCRIPT2",
         "code":"SCRIPT1",
         "properties":[
            {
               "processId":0,
               "propertyValue":"7545",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "runAsyncFlag":0,
         "runAsync":false,
         "inputs":[

         ],
         "taskParameters":[

         ],
         "target":[

         ],
         "taskProperties":[

         ],
         "serverGroup":[

         ],
         "tagList":[

         ],
         "companyId":0,
         "timeout":0,
         "rootProcessId":0
      },
      {
         "continueOnFailure":0,
         "excludeTarget":[

         ],
         "processId":0,
         "taskName":"SCRIPT2",
         "sequenceNumber":0,
         "nextTaskId":0,
         "outputs":[

         ],
         "parentTaskId":0,
         "stepCode":"RUN_SCRIPT_STEP",
         "taskId":0,
         "runType":"remote",
         "sequenceNext":"P2",
         "code":"SCRIPT2",
         "properties":[
            {
               "processId":0,
               "propertyValue":"7339",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "runAsyncFlag":0,
         "runAsync":false,
         "inputs":[

         ],
         "taskParameters":[

         ],
         "target":[

         ],
         "taskProperties":[

         ],
         "serverGroup":[

         ],
         "tagList":[

         ],
         "companyId":0,
         "timeout":0,
         "rootProcessId":0
      }
   ],
   "code":"P1",
   "properties":[

   ],
   "serverGroups":[

   ],
   "migratedFlag":false,
   "runAsync":false,
   "parentCompanyId":0,
   "parentGroupId":0,
   "inputs":[
      {
         "processId":0,
         "propertyValue":"123",
         "propertyKey":"key",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      }
   ],
   "target":[
      {
         "processId":0,
         "propertyValue":"2515",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      }
   ],
   "companyId":0,
   "tagList":[

   ],
   "serverGroup":[

   ],
   "rootProcessId":0,
   "timeout":0
}

Response:  JSON payload

Sample response:

{
   "startCode":"SCRIPT1",
   "excludeTarget":[

   ],
   "processId":8277,
   "location":"40034/10087/1363214938869/",
   "processName":"REST Test",
   "version":"2",
   "subProcesses":[
      {
         "startCode":"SCRIPT3",
         "processId":0,
         "excludeTarget":[

         ],
         "processName":"Sub process1",
         "subProcesses":[

         ],
         "startTaskId":0,
         "outputs":[

         ],
         "targets":[

         ],
         "processParameters":[

         ],
         "excludeTargets":[

         ],
         "parentProcessId":0,
         "serverGroups":[

         ],
         "tasks":[
            {
               "continueOnFailure":0,
               "processId":0,
               "excludeTarget":[

               ],
               "taskName":"SCRIPT3",
               "sequenceNumber":0,
               "nextTaskId":0,
               "outputs":[

               ],
               "parentTaskId":0,
               "stepCode":"RUN_SCRIPT_STEP",
               "taskId":0,
               "runType":"remote",
               "sequenceNext":"SCRIPT4",
               "code":"SCRIPT3",
               "properties":[
                  {
                     "processId":0,
                     "propertyValue":"7545",
                     "propertyKey":"scriptId",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  }
               ],
               "runAsyncFlag":0,
               "runAsync":false,
               "taskParameters":[

               ],
               "inputs":[
                  {
                     "processId":0,
                     "propertyValue":"P2.inputs[0].key1",
                     "propertyKey":"key2",
                     "companyId":0,
                     "required":false,
                     "type":"reference",
                     "propValueArr":[

                     ]
                  }
               ],
               "target":[

               ],
               "taskProperties":[

               ],
               "serverGroup":[

               ],
               "tagList":[

               ],
               "companyId":0,
               "timeout":0,
               "rootProcessId":0
            },
            {
               "continueOnFailure":0,
               "taskId":0,
               "excludeTarget":[

               ],
               "runType":"remote",
               "processId":0,
               "properties":[
                  {
                     "processId":0,
                     "propertyValue":"7339",
                     "propertyKey":"scriptId",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  },
                  {
                     "processId":0,
                     "propertyValue":"3",
                     "propertyKey":"version",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  },
                  {
                     "processId":0,
                     "propertyValue":"40034/10087/1349374450927/",
                     "propertyKey":"scriptLocation",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  },
               ],
               "code":"SCRIPT4",
               "runAsyncFlag":0,
               "taskName":"SCRIPT4",
               "sequenceNumber":0,
               "runAsync":false,
               "inputs":[

               ],
               "taskParameters":[

               ],
               "nextTaskId":0,
               "target":[

               ],
               "taskProperties":[

               ],
               "companyId":0,
               "tagList":[

               ],
               "serverGroup":[

               ],
               "outputs":[

               ],
               "parentTaskId":0,
               "rootProcessId":0,
               "timeout":0,
               "stepCode":"RUN_SCRIPT_STEP"
            }
         ],
         "code":"P2",
         "properties":[

         ],
         "migratedFlag":false,
         "runAsync":false,
         "parentCompanyId":0,
         "parentGroupId":0,
         "inputs":[
            {
               "processId":0,
               "propertyValue":"P1.inputs[0].key",
               "propertyKey":"key1",
               "companyId":0,
               "required":false,
               "type":"reference",
               "propValueArr":[

               ]
            }
         ],
         "target":[

         ],
         "companyId":0,
         "serverGroup":[

         ],
         "tagList":[

         ],
         "timeout":0,
         "rootProcessId":0
      }
   ],
   "activeFlag":"Y",
   "startTaskId":0,
   "role":"Admin",
   "outputs":[

   ],
   "targets":[

   ],
   "processParameters":[

   ],
   "sharedFlag":"N",
   "excludeTargets":[

   ],
   "parentProcessId":0,
   "serverGroups":[

   ],
   "tasks":[
      {
         "continueOnFailure":0,
         "processId":0,
         "excludeTarget":[

         ],
         "taskName":"SCRIPT1",
         "sequenceNumber":0,
         "nextTaskId":0,
         "outputs":[

         ],
         "parentTaskId":0,
         "stepCode":"RUN_SCRIPT_STEP",
         "taskId":0,
         "runType":"remote",
         "sequenceNext":"SCRIPT2",
         "code":"SCRIPT1",
         "properties":[
            {
               "processId":0,
               "propertyValue":"7545",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
         ],
         "runAsyncFlag":0,
         "runAsync":false,
         "taskParameters":[

         ],
         "inputs":[

         ],
         "target":[

         ],
         "taskProperties":[

         ],
         "serverGroup":[

         ],
         "tagList":[

         ],
         "companyId":0,
         "timeout":0,
         "rootProcessId":0
      },
      {
         "continueOnFailure":0,
         "processId":0,
         "excludeTarget":[

         ],
         "taskName":"SCRIPT2",
         "sequenceNumber":0,
         "nextTaskId":0,
         "outputs":[

         ],
         "parentTaskId":0,
         "stepCode":"RUN_SCRIPT_STEP",
         "taskId":0,
         "runType":"remote",
         "sequenceNext":"P2",
         "code":"SCRIPT2",
         "properties":[
            {
               "processId":0,
               "propertyValue":"7339",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
         ],
         "runAsyncFlag":0,
         "runAsync":false,
         "taskParameters":[

         ],
         "inputs":[

         ],
         "target":[

         ],
         "taskProperties":[

         ],
         "serverGroup":[

         ],
         "tagList":[

         ],
         "companyId":0,
         "timeout":0,
         "rootProcessId":0
      }
   ],
   "code":"P1",
   "properties":[

   ],
   "migratedFlag":true,
   "runAsync":false,
   "templateFlag":"Y",
   "parentCompanyId":0,
   "parentGroupId":0,
   "inputs":[
      {
         "processId":0,
         "propertyValue":"123",
         "propertyKey":"key",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      }
   ],
   "purchasedFlag":"N",
   "target":[
      {
         "processId":0,
         "propertyValue":"2515",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      }
   ],
   "companyId":40034,
   "tagList":[

   ],
   "serverGroup":[

   ],
   "user":"10087",
   "rootProcessId":0,
   "timeout":0
}

 

/process/{id}

 

DESCRIPTION: Deletes a Process.

URL STRUCTURE: 

httpsː//smart.cloud.com/v0/process/<id>?access_token=<valid token generated by authentication>

METHOD: DELETE

Ex:

curl -v -X DELETE 'https://smart.cloud.com/v0/process/8277?access_token=nvk7QZGTybCKItXCb4XTxXGqt'

RESPONSE: JSON payload

Sample response:

{"startCode":"SCRIPT1","excludeTarget":[],"processId":8277,"location":"40034/10087/1363214938869/","processName":"REST Test__deleted__8277__deleted__8277","version":"2","subProcesses":[{"startCode":"SCRIPT3","processId":0,"excludeTarget":[],"processName":"Sub process1","subProcesses":[],"startTaskId":0,"outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"parentProcessId":0,"tasks":[{"continueOnFailure":0,"processId":0,"excludeTarget":[],"taskName":"SCRIPT3","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"SCRIPT4","code":"SCRIPT3","properties":[{"processId":0,"propertyValue":"7545","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"4","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1351197110403/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"taskParameters":[],"inputs":[{"processId":0,"propertyValue":"P2.inputs[0].key1","propertyKey":"key2","companyId":0,"required":false,"type":"reference","propValueArr":[]}],"target":[],"taskProperties":[],"tagList":[],"serverGroup":[],"companyId":0,"timeout":0,"rootProcessId":0},{"continueOnFailure":0,"taskId":0,"excludeTarget":[],"runType":"remote","processId":0,"properties":[{"processId":0,"propertyValue":"7339","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"3","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1349374450927/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"code":"SCRIPT4","runAsyncFlag":0,"taskName":"SCRIPT4","sequenceNumber":0,"runAsync":false,"inputs":[],"taskParameters":[],"nextTaskId":0,"target":[],"taskProperties":[],"companyId":0,"serverGroup":[],"tagList":[],"outputs":[],"parentTaskId":0,"rootProcessId":0,"timeout":0,"stepCode":"RUN_SCRIPT_STEP"}],"serverGroups":[],"code":"P2","properties":[],"migratedFlag":false,"runAsync":false,"parentCompanyId":0,"parentGroupId":0,"inputs":[{"processId":0,"propertyValue":"P1.inputs[0].key","propertyKey":"key1","companyId":0,"required":false,"type":"reference","propValueArr":[]}],"target":[],"companyId":0,"tagList":[],"serverGroup":[],"timeout":0,"rootProcessId":0}],"description":"","startTaskId":0,"role":"Admin","outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"sharedFlag":"N","parentProcessId":0,"tasks":[{"continueOnFailure":0,"processId":0,"excludeTarget":[],"taskName":"SCRIPT1","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"SCRIPT2","code":"SCRIPT1","properties":[{"processId":0,"propertyValue":"7545","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"4","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1351197110403/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"taskParameters":[],"inputs":[],"target":[],"taskProperties":[],"tagList":[],"serverGroup":[],"companyId":0,"timeout":0,"rootProcessId":0},{"continueOnFailure":0,"processId":0,"excludeTarget":[],"taskName":"SCRIPT2","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"P2","code":"SCRIPT2","properties":[{"processId":0,"propertyValue":"7339","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"3","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1349374450927/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"taskParameters":[],"inputs":[],"target":[],"taskProperties":[],"tagList":[],"serverGroup":[],"companyId":0,"timeout":0,"rootProcessId":0}],"serverGroups":[],"code":"P1","properties":[],"migratedFlag":true,"runAsync":false,"parentCompanyId":0,"templateFlag":"Y","parentGroupId":0,"inputs":[{"processId":0,"propertyValue":"123","propertyKey":"key","companyId":0,"required":false,"type":"string","propValueArr":[]}],"purchasedFlag":"N","target":[{"processId":0,"propertyValue":"2515","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]}],"companyId":40034,"tagList":[],"serverGroup":[],"user":"10087","rootProcessId":0,"timeout":0}

 

/process/{id}

 

DESCRIPTION: Gets process details.

URL STRUCTURE: 

httpsː//smart.cloud.com/v0/process/<id>?access_token=<valid token generated by authentication>

METHOD: GET

PARAMETERS:

processid (required

Ex:

httpsː//smart.cloud.com/v0/process/8277?access_token=nvk7QZGTybCKItXCb4XTxXGqt

RESPONSE: JSON payload

Sample response:

{"startCode":"SCRIPT1","excludeTarget":[],"processId":8277,"location":"40034/10087/1363214938869/","processName":"REST Test","version":"2","subProcesses":[{"startCode":"SCRIPT3","processId":0,"excludeTarget":[],"processName":"Sub process1","subProcesses":[],"startTaskId":0,"outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"parentProcessId":0,"tasks":[{"continueOnFailure":0,"processId":0,"excludeTarget":[],"taskName":"SCRIPT3","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"SCRIPT4","code":"SCRIPT3","properties":[{"processId":0,"propertyValue":"7545","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"4","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1351197110403/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"taskParameters":[],"inputs":[{"processId":0,"propertyValue":"P2.inputs[0].key1","propertyKey":"key2","companyId":0,"required":false,"type":"reference","propValueArr":[]}],"target":[],"taskProperties":[],"tagList":[],"serverGroup":[],"companyId":0,"timeout":0,"rootProcessId":0},{"continueOnFailure":0,"taskId":0,"excludeTarget":[],"runType":"remote","processId":0,"properties":[{"processId":0,"propertyValue":"7339","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"3","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1349374450927/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"code":"SCRIPT4","runAsyncFlag":0,"taskName":"SCRIPT4","sequenceNumber":0,"runAsync":false,"inputs":[],"taskParameters":[],"nextTaskId":0,"target":[],"taskProperties":[],"companyId":0,"serverGroup":[],"tagList":[],"outputs":[],"parentTaskId":0,"rootProcessId":0,"timeout":0,"stepCode":"RUN_SCRIPT_STEP"}],"serverGroups":[],"code":"P2","properties":[],"migratedFlag":false,"runAsync":false,"parentCompanyId":0,"parentGroupId":0,"inputs":[{"processId":0,"propertyValue":"P1.inputs[0].key","propertyKey":"key1","companyId":0,"required":false,"type":"reference","propValueArr":[]}],"target":[],"companyId":0,"tagList":[],"serverGroup":[],"timeout":0,"rootProcessId":0}],"description":"","startTaskId":0,"role":"Admin","outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"sharedFlag":"N","parentProcessId":0,"tasks":[{"continueOnFailure":0,"processId":0,"excludeTarget":[],"taskName":"SCRIPT1","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"SCRIPT2","code":"SCRIPT1","properties":[{"processId":0,"propertyValue":"7545","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"4","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1351197110403/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"taskParameters":[],"inputs":[],"target":[],"taskProperties":[],"tagList":[],"serverGroup":[],"companyId":0,"timeout":0,"rootProcessId":0},{"continueOnFailure":0,"processId":0,"excludeTarget":[],"taskName":"SCRIPT2","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"P2","code":"SCRIPT2","properties":[{"processId":0,"propertyValue":"7339","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"3","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1349374450927/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"taskParameters":[],"inputs":[],"target":[],"taskProperties":[],"tagList":[],"serverGroup":[],"companyId":0,"timeout":0,"rootProcessId":0}],"serverGroups":[],"code":"P1","properties":[],"migratedFlag":true,"runAsync":false,"parentCompanyId":0,"templateFlag":"Y","parentGroupId":0,"inputs":[{"processId":0,"propertyValue":"123","propertyKey":"key","companyId":0,"required":false,"type":"string","propValueArr":[]}],"purchasedFlag":"N","target":[{"processId":0,"propertyValue":"2515","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]}],"companyId":40034,"tagList":[],"serverGroup":[],"user":"10087","rootProcessId":0,"timeout":0}

 

/process/{id}/versions

 

DESCRIPTION: Gets a list of versions for a process.

URL STRUCTURE: 

httpsː//smart.cloud.com/v0/process/<id>/versions?access_token=<valid token generated by authentication>

METHOD: GET

INPUT: 

Ex:

httpsː//smart.cloud.com/v0/process/8277/versions?access_token=nvk7QZGTybCKItXCb4XTxXGqt

RESPONSE: JSON payload

Sample response:

[{"processId":8277,"excludeTarget":[],"processName":"REST Test","version":"2","subProcesses":[],"startTaskId":0,"role":"Admin","outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"parentProcessId":0,"serverGroups":[],"tasks":[],"properties":[],"migratedFlag":false,"runAsync":false,"parentCompanyId":0,"parentGroupId":0,"inputs":[],"target":[],"companyId":40034,"serverGroup":[],"tagList":[],"user":"10087","timeout":0,"rootProcessId":0},{"processId":8277,"excludeTarget":[],"processName":"REST Test","version":"1","subProcesses":[],"startTaskId":0,"role":"Admin","outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"parentProcessId":0,"serverGroups":[],"tasks":[],"properties":[],"migratedFlag":false,"runAsync":false,"parentCompanyId":0,"parentGroupId":0,"inputs":[],"target":[],"companyId":40034,"serverGroup":[],"tagList":[],"user":"10087","timeout":0,"rootProcessId":0}]

 

/process/{id}/launch

 

DESCRIPTION: Launches a process

URL STRUCTURE: 

httpsː//smart.cloud.com/v0/process/<id>/launch?access_token=<valid token generated by authentication>

METHOD: POST

INPUT: JSON payload

Ex:

{"startCode":"SCRIPT1","excludeTarget":[],"processId":8277,"processName":"REST Test","subProcesses":[],"startTaskId":0,"outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"parentProcessId":0,"tasks":[{"continueOnFailure":0,"excludeTarget":[],"processId":0,"taskName":"SCRIPT1","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"SCRIPT2","code":"SCRIPT1","properties":[{"processId":0,"propertyValue":"7545","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"4","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1351197110403/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"inputs":[],"taskParameters":[],"target":[],"taskProperties":[],"serverGroup":[],"tagList":[],"companyId":0,"timeout":0,"rootProcessId":0},{"continueOnFailure":0,"taskId":0,"runType":"remote","processId":0,"excludeTarget":[],"properties":[{"processId":0,"propertyValue":"7339","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"3","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1349374450927/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"code":"SCRIPT2","runAsyncFlag":0,"taskName":"SCRIPT2","sequenceNumber":0,"runAsync":false,"taskParameters":[],"inputs":[],"nextTaskId":0,"target":[],"taskProperties":[],"companyId":0,"tagList":[],"serverGroup":[],"outputs":[],"parentTaskId":0,"rootProcessId":0,"timeout":0,"stepCode":"RUN_SCRIPT_STEP"}],"code":"P1","properties":[],"serverGroups":[],"migratedFlag":false,"runAsync":false,"parentCompanyId":0,"schedule":{"startTime":1363215756343,"scheduleType":12,"scheduleId":0,"prevFireTime":0,"jobId":0,"repeatInterval":1,"timesTriggered":0,"nextFireTime":0,"dirty":false,"repeatCount":1,"companyId":0,"endTime":86560732799350},"parentGroupId":0,"inputs":[{"processId":0,"propertyValue":"123","propertyKey":"key","companyId":0,"required":false,"type":"string","propValueArr":[]}],"target":[{"processId":0,"propertyValue":"2515","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]},{"processId":0,"propertyValue":"2478","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]}],"companyId":0,"tagList":[],"serverGroup":[],"rootProcessId":0,"timeout":0}

RESPONSE: JSON payload 

Sample response:

{"processInstanceId":8251,"processName":"REST Test (1)","jobdetailid":8263,"processid":8}

 

/process/{id}/launch

 

DESCRIPTION: Launches a process with runonce Schedule.

URL STRUCTURE: 

httpsː//smart.cloud.com/v0/process/<id>/launch?access_token=<valid token generated by authentication>

METHOD: POST

INPUT: NONE

RESPONSE: JSON payload 

Sample response:

{"processInstanceId":621,"processName":"Simple Rest process","jobdetailid":619,"processid":401}

 

/process/{id}/launch

 

DESCRIPTION: Launches a process with runonce Schedule and jobName.

URL STRUCTURE: 

httpsː//smart.cloud.com/v0/process/<id>/launch?access_token=<access_token>&jobname=<jobname>

METHOD: POST

PARAMETERS: jobname (required), version (optional)

RESPONSE: JSON payload 

Sample response:

{"processInstanceId":622,"processName":"newprocessrest","jobdetailid":620,"processid":401}

 

 

/process/{id}/launch 

Description: Launches a process with a custom schedule.

URL structure: httpsː//smart.cloud.com/v0/process/<id>/launch?access_token=<access_token>

URL example: httpsː//smart.cloud.com/v0/process/<id>/launch?access_token=<access_token>

Method: POST

Parameters: 

  • jobname (optional)
  • version (optional)

Input: JSON Payload 

Ex:

{"startCode":"SCRIPT1","excludeTarget":[],"processId":8277,"processName":"REST Test","subProcesses":[],"startTaskId":0,"outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"parentProcessId":0,"tasks":[{"continueOnFailure":0,"excludeTarget":[],"processId":0,"taskName":"SCRIPT1","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"SCRIPT2","code":"SCRIPT1","properties":[{"processId":0,"propertyValue":"7545","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"4","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1351197110403/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"inputs":[],"taskParameters":[],"target":[],"taskProperties":[],"serverGroup":[],"tagList":[],"companyId":0,"timeout":0,"rootProcessId":0},{"continueOnFailure":0,"taskId":0,"runType":"remote","processId":0,"excludeTarget":[],"properties":[{"processId":0,"propertyValue":"7339","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"3","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1349374450927/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"code":"SCRIPT2","runAsyncFlag":0,"taskName":"SCRIPT2","sequenceNumber":0,"runAsync":false,"taskParameters":[],"inputs":[],"nextTaskId":0,"target":[],"taskProperties":[],"companyId":0,"tagList":[],"serverGroup":[],"outputs":[],"parentTaskId":0,"rootProcessId":0,"timeout":0,"stepCode":"RUN_SCRIPT_STEP"}],"code":"P1","properties":[],"serverGroups":[],"migratedFlag":false,"runAsync":false,"parentCompanyId":0,"schedule":{"startTime":1363215756343,"scheduleType":12,"scheduleId":0,"prevFireTime":0,"jobId":0,"repeatInterval":1,"timesTriggered":0,"nextFireTime":0,"dirty":false,"repeatCount":1,"companyId":0,"endTime":86560732799350},"parentGroupId":0,"inputs":[{"processId":0,"propertyValue":"123","propertyKey":"key","companyId":0,"required":false,"type":"string","propValueArr":[]}],"target":[{"processId":0,"propertyValue":"2515","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]},{"processId":0,"propertyValue":"2478","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]}],"companyId":0,"tagList":[],"serverGroup":[],"rootProcessId":0,"timeout":0}

 

Response: JSON payload 

Sample response:

{
   "processInstanceId":8251,
   "processName":"REST Test (1)",
   "jobdetailid":8263,
   "processid":8
}

 

/process/{id}/launch 

Description: Launches a particular code within a process.

URL structure: httpsː//smart.cloud.com/v0/process/<id>/launch?access_token=<access_token>&instanceid=<process instnace id>&jobname=<process job name>&override=<true|false>&processcodes=<valid process code>

URL example: httpsː//smart.cloud.com/v0/process/<id>/launch?access_token=<access_token>&instanceid=<process instnace id>&jobname=<process job name>&override=<true|false>&processcodes=<valid process code>

Method: POST

Parameters: 

  • instanceid (optional) - id of launched process instance (which you can get with processinstnace api: /processinstnace?processid=<processid>)
  • jobname (optional) - process job name
  • override (optional) - true|false ("true" will override any existing recurring schedule on this process)
  • processcodes (optional) - comma separated list of processcodes (Will run a particular process code. In this case need to send valid instanceid.) 

Response: JSON payload 

Sample response:

{  
   "processInstanceId":8251,
   "processName":"REST Test (1)",
   "jobdetailid":8263,
   "processid":8
}

 

/process/{id}/addserver/ 

Description: Adds a server to an existing process (scale up) without a custom schedule.

URL structure: httpsː//smart.cloud.com/v0/process/<id>/addserver?access_token=<access_token>&instanceid=<process instance id>&jobname=<process job name>&processcodes=<valid process code>

URL example: httpsː//smart.cloud.com/v0/process/<id>/addserver?access_token=<access_token>&instanceid=<process instance id>&jobname=<process job name>&processcodes=<valid process code>

Method: POST

Parameters: 

  • instanceid (required) - id of launched process instance (which you can get with processinstnace api: /processinstnace?processid=<processid>)
  • jobname (optional) - process job name
  • processcodes (required) - comma separated list of processcodes (Will run a particular process code. In this case need to send valid instanceid.) 

Response: JSON payload 

Sample response:

{  
   "processInstanceId":8251,
   "processName":"REST Test (1)",
   "jobdetailid":8263,
   "processid":8
}

 

/process/{id}/addserver/ 

Description: Adds a server to an existing process (scale up) with a custom schedule.

URL structure: httpsː//smart.cloud.com/v0/process/<id>/addserver?access_token=<access_token>&instanceid=<process instance id>&jobname=<process job name>&processcodes=<valid process code>

URL example: httpsː//smart.cloud.com/v0/process/<id>/addserver?access_token=<access_token>&instanceid=<process instance id>&jobname=<process job name>&processcodes=<valid process code>

Method: POST

Parameters: 

  • instanceid (required) - id of launched process instance (which you can get with processinstnace api: /processinstnace?processid=<processid>)
  • jobname (optional) - process job name
  • processcodes (required) - comma separated list of processcodes (Will run a particular process code. In this case need to send valid instanceid.) 

INPUT: JSON payload

Ex:

{"startCode":"SCRIPT1","excludeTarget":[],"processId":8277,"processName":"REST Test","subProcesses":[],"startTaskId":0,"outputs":[],"targets":[],"processParameters":[],"excludeTargets":[],"parentProcessId":0,"tasks":[{"continueOnFailure":0,"excludeTarget":[],"processId":0,"taskName":"SCRIPT1","sequenceNumber":0,"nextTaskId":0,"outputs":[],"parentTaskId":0,"stepCode":"RUN_SCRIPT_STEP","taskId":0,"runType":"remote","sequenceNext":"SCRIPT2","code":"SCRIPT1","properties":[{"processId":0,"propertyValue":"7545","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"4","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1351197110403/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"runAsyncFlag":0,"runAsync":false,"inputs":[],"taskParameters":[],"target":[],"taskProperties":[],"serverGroup":[],"tagList":[],"companyId":0,"timeout":0,"rootProcessId":0},{"continueOnFailure":0,"taskId":0,"runType":"remote","processId":0,"excludeTarget":[],"properties":[{"processId":0,"propertyValue":"7339","propertyKey":"scriptId","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"3","propertyKey":"version","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":"40034/10087/1349374450927/","propertyKey":"scriptLocation","companyId":0,"required":false,"type":"string","propValueArr":[]},{"processId":0,"propertyValue":".sh","propertyKey":"scriptType","companyId":0,"required":false,"type":"string","propValueArr":[]}],"code":"SCRIPT2","runAsyncFlag":0,"taskName":"SCRIPT2","sequenceNumber":0,"runAsync":false,"taskParameters":[],"inputs":[],"nextTaskId":0,"target":[],"taskProperties":[],"companyId":0,"tagList":[],"serverGroup":[],"outputs":[],"parentTaskId":0,"rootProcessId":0,"timeout":0,"stepCode":"RUN_SCRIPT_STEP"}],"code":"P1","properties":[],"serverGroups":[],"migratedFlag":false,"runAsync":false,"parentCompanyId":0,"schedule":{"startTime":1363215756343,"scheduleType":12,"scheduleId":0,"prevFireTime":0,"jobId":0,"repeatInterval":1,"timesTriggered":0,"nextFireTime":0,"dirty":false,"repeatCount":1,"companyId":0,"endTime":86560732799350},"parentGroupId":0,"inputs":[{"processId":0,"propertyValue":"123","propertyKey":"key","companyId":0,"required":false,"type":"string","propValueArr":[]}],"target":[{"processId":0,"propertyValue":"2515","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]},{"processId":0,"propertyValue":"2478","propertyKey":"agent_id","companyId":0,"required":false,"type":"int","propValueArr":[]}],"companyId":0,"tagList":[],"serverGroup":[],"rootProcessId":0,"timeout":0}

RESPONSE: JSON payload 

Sample response:

{
   "processInstanceId":8251,
   "processName":"REST Test (1)",
   "jobdetailid":8263,
   "processid":8
}

 

/process/{id}/deleteserver/ 

Description: Deletes a server from an existing process (scale down).

URL structure: httpsː//smart.cloud.com/v0/process/<id>/deleteserver?access_token=<access_token>&instanceid=<process instance id>&agentids=<valid_agentIDs>&jobname=<process job name>&processcodes=<valid process code>

URL example: httpsː//smart.cloud.com/v0/process/<id>/deleteserver?access_token=<access_token>&instanceid=<process instance id>&agentids=<valid_agentIDs>&jobname=<process job name>&processcodes=<valid process code>

Method: POST

Parameters: 

  • instanceid (required) - id of launched process instance (which you can get with processinstnace api: /processinstnace?processid=<processid>)
  • agentids (required) - comma separated list of agentID's to be deleted.
  • jobname (optional) - process job name
  • processcodes (optional) - will remove from the particular process/task
  • RequestParam (value = "instanceid", required = true) int instanceID,   

Response: JSON payload 

Sample response:

{
   "processInstanceId":8251,
   "processName":"REST Test (1)",
   "jobdetailid":8263,
   "processid":8
}

 

/scripts/purchase

Description: Purchase a blueprint on providing a blueprint product ID.

URL structure: httpsː //smart.cloud.com/v0/scripts/purchase?access_token=<valid access token>&productid=<valid blueprint product id>

URL example: https: //smart.cloud.com/v0/scripts/purchase?access_token=TfP7baXwewdwdwwwVTy8iUjTXLFUlcy0&productid=1505

Method: POST

Parameters: 

  • productid (required) - Valid blueprint product ID associated with a blueprint available for purchase.

Response: Integer representing the process ID of the purchased blueprint.

Sample response:

{ 1234 }

 

/process/publish/

Description: Publishes or republishes a blueprint to the Blueprint Catalog.

URL structure: /process/publish/<bluprintid>?access_token=<accessToken>allowModification=false

URL example: /process/publish/<bluprintid>?access_token=<accessToken>allowModification=false

Method: POST

Parameters: 

  • access_token (String): A valid Smart Tools access token
  • allowmodification (Boolean): Published blueprint is or is not editable

Input: JSON Payload 

Ex:

{"companyId":-1,"extraAttrs":{},"productId":6571,"productName":"TEST PUB","shortDescription":"shiv","longDescription":"My Product tttt123","type":"process","categoryId":96,"catalogId":3,"sourceObjectId":123,"sourceObjectVersion":1,"publishingOrganizationId":19547,"publishingRole":"Admin","publishingUserId":17356,"reviewBeanList":[],"sharedToRole":[],"sharedToUser":[],"tagList":[],"categoryName":"Community","publishingOrganizationName":"ramsubsi","scalexUniqueKey":"-1_6571_process","published":true,"global":true}

 

Response: JSON payload 

Sample response:

{
  "productName": "TEST PUB",
  "shortDescription": "shiv",
  "longDescription": "My Product tttt123",
  "categoryId": 96,
  "sourceObjectId": 137,
  "sourceObjectVersion": "1",
  "productId":6587,
  "sharedToUser": [
  "9r@gmail.com"
  ],
  "sharedToRole": []
}

 

/catalog/process/

Description: Removes or unpublishes a blueprint from the Blueprint Catalog.

URL structure: catalog/product/<product-id>?access_token=<accessToken>&global=<true|false> 

URL example: catalog/product/<product-id>?access_token=<accessToken>&global=<true|false>

Method: DELETE

Parameters: 

  • access_token (String): A valid Smart Tools access token
  • allowmodification (Boolean): Published blueprint is or is not editable

Success Response: HTTP STATUS CODE 204

 

 

back to top

 

Processinstance

/processinstance 

Description: Gets job list for a process

URL structure: httpsː//smart.cloud.com/v0/processinstance?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance?access_token=nvk7QZGTybCKItXCb4XTxXGqt&processid=8277

Method: GET

Parameters:

processid (required)

Sample response:

[
   {
      "actionGroupId":8251,
      "targetGroupId":0,
      "jobId":8263,
      "status":"complete",
      "targetDetailBeans":[

      ],
      "serverGroups":[

      ],
      "jobName":"REST Test (1)",
      "jobDescription":"This job is auto-created.",
      "parentJobId":0,
      "role":"Admin",
      "companyId":40034,
      "tagList":[

      ],
      "lastRunStatus":"complete",
      "scheduleBeans":[
         {
            "scheduleId":41774,
            "jobId":0,
            "status":"complete",
            "nextFireTime":0,
            "repeatCount":1,
            "endTime":86560703999426,
            "startTime":1363216404283,
            "scheduleType":12,
            "prevFireTime":1363216404283,
            "repeatInterval":1,
            "timesTriggered":1,
            "dirty":false,
            "role":"Admin",
            "companyId":40034,
            "user":"10087"
         }
      ],
      "user":"10087"
   }
]

 

/processinstance/{id} 

Description: Gets process instance details.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Sample response:

{
   "startCode":"SCRIPT1",
   "excludeTarget":[

   ],
   "processId":8277,
   "processName":"REST Test (1)",
   "version":"1",
   "subProcesses":[

   ],
   "startTaskId":0,
   "role":"Admin",
   "outputs":[

   ],
   "targets":[

   ],
   "processParameters":[

   ],
   "excludeTargets":[

   ],
   "parentProcessId":0,
   "tasks":[
      {
         "continueOnFailure":0,
         "processId":0,
         "excludeTarget":[

         ],
         "taskName":"SCRIPT1",
         "sequenceNumber":0,
         "nextTaskId":0,
         "outputs":[

         ],
         "parentTaskId":0,
         "stepCode":"RUN_SCRIPT_STEP",
         "taskId":0,
         "runType":"remote",
         "sequenceNext":"SCRIPT2",
         "code":"SCRIPT1",
         "properties":[
            {
               "processId":0,
               "propertyValue":"7545",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"4",
               "propertyKey":"version",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"40034/10087/1351197110403/",
               "propertyKey":"scriptLocation",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":".sh",
               "propertyKey":"scriptType",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "runAsyncFlag":0,
         "runAsync":false,
         "taskParameters":[

         ],
         "inputs":[

         ],
         "target":[

         ],
         "taskProperties":[

         ],
         "tagList":[

         ],
         "serverGroup":[

         ],
         "companyId":0,
         "timeout":0,
         "rootProcessId":0
      },
      {
         "continueOnFailure":0,
         "taskId":0,
         "excludeTarget":[

         ],
         "runType":"remote",
         "processId":0,
         "properties":[
            {
               "processId":0,
               "propertyValue":"7339",
               "propertyKey":"scriptId",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"3",
               "propertyKey":"version",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":"40034/10087/1349374450927/",
               "propertyKey":"scriptLocation",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            },
            {
               "processId":0,
               "propertyValue":".sh",
               "propertyKey":"scriptType",
               "companyId":0,
               "required":false,
               "type":"string",
               "propValueArr":[

               ]
            }
         ],
         "code":"SCRIPT2",
         "runAsyncFlag":0,
         "taskName":"SCRIPT2",
         "sequenceNumber":0,
         "runAsync":false,
         "inputs":[

         ],
         "taskParameters":[

         ],
         "nextTaskId":0,
         "target":[

         ],
         "taskProperties":[

         ],
         "companyId":0,
         "serverGroup":[

         ],
         "tagList":[

         ],
         "outputs":[

         ],
         "parentTaskId":0,
         "rootProcessId":0,
         "timeout":0,
         "stepCode":"RUN_SCRIPT_STEP"
      }
   ],
   "serverGroups":[

   ],
   "code":"P1",
   "properties":[

   ],
   "migratedFlag":true,
   "runAsync":false,
   "schedule":{
      "startTime":1363216404283,
      "scheduleType":12,
      "scheduleId":0,
      "prevFireTime":0,
      "jobId":0,
      "repeatInterval":1,
      "timesTriggered":0,
      "nextFireTime":0,
      "dirty":false,
      "repeatCount":1,
      "companyId":0,
      "endTime":86560732799290
   },
   "parentCompanyId":0,
   "parentGroupId":0,
   "inputs":[
      {
         "processId":0,
         "propertyValue":"123",
         "propertyKey":"key",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      }
   ],
   "target":[
      {
         "processId":0,
         "propertyValue":"2515",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      },
      {
         "processId":0,
         "propertyValue":"2478",
         "propertyKey":"agent_id",
         "companyId":0,
         "required":false,
         "type":"int",
         "propValueArr":[

         ]
      }
   ],
   "companyId":40034,
   "tagList":[

   ],
   "serverGroup":[

   ],
   "user":"10087",
   "timeout":0,
   "rootProcessId":0
}

 

/processinstance/{id}/childjobs 

Description: Gets job list for a child process.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/childjobs?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/290/childjobs?access_token=nvk7QZGTybCKItXCb4XTxXGqt&type=operational

Method: GET

Parameters:

type (optional) (values can be "operational" or "shutdown"; if type is not given, it will give all child jobs for that process, if there is any schedule attached to the child process)

Sample response:

{
   "result":"SUCCESS",
   "data":[
      {
         "actionGroupId":292,
         "targetGroupId":0,
         "jobId":290,
         "status":"complete",
         "targetDetailBeans":[

         ],
         "serverGroups":[

         ],
         "jobName":"Operational Process (19)",
         "jobDescription":"This job is auto-created.",
         "parentJobId":0,
         "role":"Admin",
         "companyId":40338,
         "tagList":[

         ],
         "lastRunStatus":"FAILED",
         "scheduleBeans":[
            {
               "scheduleId":39682,
               "jobId":0,
               "status":"complete",
               "nextFireTime":0,
               "repeatCount":100,
               "endTime":86560732799136,
               "startTime":1360277440124,
               "scheduleType":14,
               "prevFireTime":1360295260124,
               "repeatInterval":3,
               "timesTriggered":100,
               "dirty":false,
               "role":"Admin",
               "companyId":40338,
               "user":"10425"
            }
         ],
         "user":"10425"
      }
   ]
}

 

/processinstance/{id}/processrundetails 

Description: Gets process run details.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<jobid>/processrundetails?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263/processrundetails?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Sample response:

[
   {
      "processInstanceRunBeans":[

      ],
      "jobId":8263,
      "taskPropertyBeans":[

      ],
      "status":"complete",
      "role":"Admin",
      "jobRunOutputBeans":[

      ],
      "companyId":40034,
      "runId":47396,
      "projectId":-1,
      "user":"",
      "runTimestamp":1363216404320
   }
]

 

/processinstance/{id}/processruns 

Description: Gets process runs

URL strucutre: httpsː//smart.cloud.com/v0/processinstance/<id>/processruns?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263/processruns?access_token=nvk7QZGTybCKItXCb4XTxXGqt&runid=47396

Method: GET

Parameters:

  • runid (required)
  • code (optional)  

Sample response:

[  
   {  
      "processCode":"P1",
      "status":"complete",
      "parentProcessCode":"",
      "executionSequence":1,
      "processName":"REST Test (1)",
      "serialversionuid":1,
      "companyId":0,
      "processInstancerunId":1185,
      "childProcessInstancerunBean":[  

      ]
   }
]

 

/processinstance/{id}/stepruns 

Description: Gets step runs

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/stepruns?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263/stepruns?access_token=nvk7QZGTybCKItXCb4XTxXGqt&instanceid=1185

Method: GET

Parameters:

instanceid (required)

Sample response:

[
   {
      "targetDetailBean":{
         "agentId":0,
         "companyId":0
      },
      "stepRunLogOutputBean":{
         "stepRunId":0,
         "companyId":0
      },
      "stepRunId":0,
      "executionSequence":2,
      "jobDetailId":8263,
      "taskName":"SCRIPT1",
      "projectRunId":47396,
      "runStatus":"complete",
      "processInstanceRunId":0,
      "stepOutputType":0,
      "companyId":40034,
      "stepId":1231,
      "stepCode":"SCRIPT1"
   },
   {
      "targetDetailBean":{
         "agentId":0,
         "companyId":0
      },
      "stepRunLogOutputBean":{
         "stepRunId":0,
         "companyId":0
      },
      "stepRunId":0,
      "executionSequence":3,
      "jobDetailId":8263,
      "taskName":"SCRIPT2",
      "projectRunId":47396,
      "runStatus":"complete",
      "processInstanceRunId":0,
      "stepOutputType":0,
      "companyId":40034,
      "stepId":1232,
      "stepCode":"SCRIPT2"
   }
]

 

/processinstance/{id}/stepdetails 

Description: Gets step details

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/stepdetails?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263/stepdetails?access_token=nvk7QZGTybCKItXCb4XTxXGqt&runid=47396&stepid=1232

Method: GET

Parameters:

  • instanceid (required)
  • stepid (required)

Sample response:

{
   "continueOnFailure":0,
   "processId":0,
   "excludeTarget":[

   ],
   "taskName":"SCRIPT2",
   "sequenceNumber":0,
   "nextTaskId":0,
   "className":"com.centro.task.step.RunScriptStep",
   "outputs":[
      {
         "processId":0,
         "propertyKey":"agents",
         "companyId":0,
         "required":false,
         "type":"array",
         "propValueArr":[
            {
               "processId":0,
               "propertyKey":"skip",
               "companyId":0,
               "required":false,
               "type":"array",
               "propValueArr":[
                  {
                     "processId":0,
                     "propertyValue":"2515",
                     "propertyKey":"agent_id",
                     "companyId":0,
                     "required":false,
                     "type":"int",
                     "propValueArr":[

                     ]
                  },
                  {
                     "processId":0,
                     "propertyValue":"0",
                     "propertyKey":"exitcode",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  },
                  {
                     "processId":0,
                     "propertyValue":"helloWorld\r\n",
                     "propertyKey":"output",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  }
               ]
            },
            {
               "processId":0,
               "propertyKey":"skip",
               "companyId":0,
               "required":false,
               "type":"array",
               "propValueArr":[
                  {
                     "processId":0,
                     "propertyValue":"2478",
                     "propertyKey":"agent_id",
                     "companyId":0,
                     "required":false,
                     "type":"int",
                     "propValueArr":[

                     ]
                  },
                  {
                     "processId":0,
                     "propertyValue":"0",
                     "propertyKey":"exitcode",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  },
                  {
                     "processId":0,
                     "propertyValue":"helloWorld\r\n",
                     "propertyKey":"output",
                     "companyId":0,
                     "required":false,
                     "type":"string",
                     "propValueArr":[

                     ]
                  }
               ]
            }
         ]
      },
      {
         "processId":0,
         "propertyValue":"complete",
         "propertyKey":"Status",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      }
   ],
   "parentTaskId":0,
   "stepCode":"RUN_SCRIPT_STEP",
   "taskId":0,
   "runType":"remote",
   "code":"SCRIPT2",
   "properties":[
      {
         "processId":0,
         "propertyValue":"7339",
         "propertyKey":"scriptId",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      },
      {
         "processId":0,
         "propertyValue":"3",
         "propertyKey":"version",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      },
      {
         "processId":0,
         "propertyValue":"40034/10087/1349374450927/",
         "propertyKey":"scriptLocation",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      },
      {
         "processId":0,
         "propertyValue":".sh",
         "propertyKey":"scriptType",
         "companyId":0,
         "required":false,
         "type":"string",
         "propValueArr":[

         ]
      }
   ],
   "runAsyncFlag":0,
   "runAsync":false,
   "taskParameters":[

   ],
   "inputs":[

   ],
   "target":[

   ],
   "taskProperties":[

   ],
   "serverGroup":[

   ],
   "tagList":[

   ],
   "companyId":0,
   "timeout":0,
   "rootProcessId":0
}

 

 

/processinstance/{id}/stepoutput 

Description: Gets step output.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/stepoutput?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263/stepoutput?access_token=nvk7QZGTybCKItXCb4XTxXGqt&stepid=1232

Method: GET

Parameters:

stepid (required)

Sample response:

[  
   {  
      "targetDetailBean":{  
         "nodeMac":"40:40:90:c1:db:bc",
         "nodeIf":"eth0",
         "nodeDesc":"",
         "osCat":"#1 SMP Fri May 20 03:51:51 BST 2011",
         "agentId":2515,
         "hostName":"test-zss1-db",
         "companyId":0,
         "nodeHw":"x86_64",
         "osName":"Linux",
         "ipAddress":"50.57.187.29"
      },
      "stepExitCode":"0",
      "stepTagLoc":"/opt/citrix/mitos/proc",
      "stepRunLogOutputBean":{  
         "outputText":"helloWorld\r\n",
         "stepRunId":70974,
         "companyId":0
      },
      "stepRunId":70974,
      "executionSequence":0,
      "jobDetailId":8263,
      "projectRunId":47396,
      "stepTag":"metaphas-1363216411001",
      "runStatus":"complete",
      "remoteServerName":"2515",
      "activeFlag":"Y",
      "processInstanceRunId":0,
      "stepOutputType":1,
      "companyId":0,
      "stepId":1232,
      "stepType":"step"
   },
   {  
      "targetDetailBean":{  
         "nodeMac":"40:40:70:ef:29:de",
         "nodeIf":"eth0",
         "nodeDesc":"",
         "osCat":"#37-Ubuntu SMP Wed Apr 25 10:17:19 UTC 2012",
         "agentId":2478,
         "hostName":"ubuntu1204-ms-sx5",
         "companyId":0,
         "nodeHw":"x86_64",
         "osName":"Linux",
         "ipAddress":"198.61.192.135"
      },
      "stepExitCode":"0",
      "stepTagLoc":"/opt/citrix/mitos/proc",
      "stepRunLogOutputBean":{  
         "outputText":"helloWorld\r\n",
         "stepRunId":70975,
         "companyId":0
      },
      "stepRunId":70975,
      "executionSequence":0,
      "jobDetailId":8263,
      "projectRunId":47396,
      "stepTag":"metaphas-1363216411001",
      "runStatus":"complete",
      "remoteServerName":"2478",
      "activeFlag":"Y",
      "processInstanceRunId":0,
      "stepOutputType":1,
      "companyId":0,
      "stepId":1232,
      "stepType":"step"
   }
]

 

 

/processinstance/{id}/processtargets 

Description: Gets the servers on which a particular process was run.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/processtargets?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263/processtargets?access_token=nvk7QZGTybCKItXCb4XTxXGqt&runid=47396&processcode=SCRIPT1

Method: GET

Parameters:

  • runid (required)
  • processcode (optional)

Sample response:

[  
   {  
      "nodeId":2478,
      "activeFlag":"Y",
      "description":"",
      "nodeAttrList":[  

      ],
      "nodeName":"ubuntu1204-ms-sx5",
      "agentId":2478,
      "attrHash":{  

      },
      "companyId":0,
      "tagList":[  

      ],
      "osn":"Linux"
   },
   {  
      "nodeId":2515,
      "activeFlag":"Y",
      "description":"",
      "nodeAttrList":[  

      ],
      "nodeName":"test-zss1-db",
      "agentId":2515,
      "attrHash":{  

      },
      "companyId":0,
      "tagList":[  

      ],
      "osn":"Linux"
   }
]

 

/processinstance/{id}/targets 

Description: Gets the servers on which the whole process was run.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<jobid>/targets?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8263/targets?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Sample response:

[  
   {  
      "nodeId":2478,
      "activeFlag":"Y",
      "description":"",
      "nodeAttrList":[  

      ],
      "nodeName":"ubuntu1204-ms-sx5",
      "agentId":2478,
      "attrHash":{  

      },
      "companyId":0,
      "tagList":[  

      ],
      "osn":"Linux"
   },
   {  
      "nodeId":2515,
      "activeFlag":"Y",
      "description":"",
      "nodeAttrList":[  

      ],
      "nodeName":"test-zss1-db",
      "agentId":2515,
      "attrHash":{  

      },
      "companyId":0,
      "tagList":[  

      ],
      "osn":"Linux"
   }
]

 

/processinstance/{id}/pause 

Description: Pauses a job.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/pause?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8267/pause?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Parameters:

jobid (required)

Sample response:

{  
   "actionGroupId":0,
   "targetGroupId":0,
   "jobId":8267,
   "targetDetailBeans":[  

   ],
   "parentJobId":0,
   "role":"Admin",
   "companyId":40034,
   "tagList":[  

   ],
   "serverGroups":[  

   ],
   "user":"",
   "scheduleBeans":[  

   ]
}

 

/processinstance/{id}/resume 

Description: Pauses a job.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/resume?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8267/resume?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Parameters:

jobid (required)

Sample response:

{  
   "actionGroupId":0,
   "targetGroupId":0,
   "jobId":8267,
   "targetDetailBeans":[  

   ],
   "parentJobId":0,
   "role":"Admin",
   "companyId":40034,
   "tagList":[  

   ],
   "serverGroups":[  

   ],
   "user":"",
   "scheduleBeans":[  

   ]
}

 

/processinstance/{id}/cancel 

Description: Cancels a job.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/cancel?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8267/cancel?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Parameters:

jobid (required)

Sample response:

{  
   "actionGroupId":0,
   "targetGroupId":0,
   "jobId":8267,
   "targetDetailBeans":[  

   ],
   "parentJobId":0,
   "role":"Admin",
   "companyId":40034,
   "tagList":[  

   ],
   "serverGroups":[  

   ],
   "user":"",
   "scheduleBeans":[  

   ]
} 

/processinstance/{id}/pauserun 

Description: Pauses a run.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/pauserun?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8267/pauserun?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Parameters:

runid (required)

Sample response:

{  
   "processInstanceRunBeans":[  

   ],
   "jobId":8267,
   "taskPropertyBeans":[  

   ],
   "role":"Admin",
   "jobRunOutputBeans":[  

   ],
   "companyId":40034,
   "runId":47613,
   "projectId":0,
   "user":"10087",
   "runTimestamp":0
}

 

/processinstance/{id}/resumerun 

Description: Resumes a run.

URL structure: httpsː//smart.cloud.com/v0/processinstance/<id>/resumerun?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8267/resumerun?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Parameters:

runid (required)

Sample response:

{  
   "processInstanceRunBeans":[  

   ],
   "jobId":8267,
   "taskPropertyBeans":[  

   ],
   "role":"Admin",
   "jobRunOutputBeans":[  

   ],
   "companyId":40034,
   "runId":47613,
   "projectId":0,
   "user":"10087",
   "runTimestamp":0
}

 

/processinstance/{id}/cancelrun 

Description: Cancels a run.

URL strucutre: httpsː//smart.cloud.com/v0/processinstance/<id>/cancelrun?access_token=<valid token generated by authentication>

URL example: httpsː//smart.cloud.com/v0/processinstance/8267/cancelrun?access_token=nvk7QZGTybCKItXCb4XTxXGqt

Method: GET

Parameters:

runid (required)

Sample response:

{  
   "processInstanceRunBeans":[  

   ],
   "jobId":8267,
   "taskPropertyBeans":[  

   ],
   "role":"Admin",
   "jobRunOutputBeans":[  

   ],
   "companyId":40034,
   "runId":47613,
   "projectId":0,
   "user":"10087",
   "runTimestamp":0
}

 

Share

/share

Description: Shares a blueprint or a script to users or user roles

URL structure: https://smart.cloud.com/v0/share?access_token=<valid access token>&objectId=<id of script/blueprint>&objectType=<Script/Process>&userIdString=<User ID in arrary>&roleString=<User roles in array>

URL example: https:// smart.cloud.com/v0/scripts/share?access_token=16C0UwkUWQQo6jmaJFLEqshpk&objectId=73417&objectType=SCRIPT&userIdString=18460&roleString=null

Method: POST

Parameters:

  • objectId (mandatory) - ID of a script or blueprint that needs to be shared
  • objectType (mandatory) - Shared object type that is a script or blueprint
  • userIdString (mandatory if roleString is null) - Single or multiple user IDs separated by comma
  • roleString (mandatory if userIdString is null) - Single or multiple user roles separated by comma. For example, Admin,Architect

Response: JSON payload

Sample response:

{  
   "companyId":0,
   "extraAttrs":{  

   },
   "shareId":201,
   "objectId":73417,
   "objectType":"script",
   "details":[  
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "shareId":201,
         "sharedToUser":"18460",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      },
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "shareId":201,
         "sharedToRole":"null",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      }
   ],
   "createdByRole":"Admin",
   "createdByUser":"17892"
}

/unshare

Description: Unshare a blueprint or a script to users or user roles

URL structure: https://smart.cloud.com/v0/share?access_token=<valid access token>&objectId=<id of script/blueprint>&objectType=<Script/Process>&userIdString=<User ID in arrary>&roleString=<User roles in array>&shareId=<sharing task ID>

URL example: https:// smart.cloud.com/v0/scripts/share?access_token=2mfJYBNZLo9piEytdlsax2wOe&objectId=87937&objectType=SCRIPT&userIdString=null&roleString=null&shareId=224

Method: POST

Parameters:

  • objectId (mandatory) - ID of a script or blueprint that needs to be shared
  • objectType (mandatory) - Shared object type that is a script or blueprint
  • userIdString (mandatory if roleString is null) - Single or multiple user IDs separated by comma
  • roleString (mandatory if userIdString is null) - Single or multiple user roles separated by comma. For example, Admin,Architect
  • shareId (mandatory) - Sharing task ID.

Response: JSON payload

Sample response:

{  
   "companyId":0,
   "extraAttrs":{  

   },
   "shareId":224,
   "objectId":87937,
   "objectType":"script",
   "details":[  
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "shareId":224,
         "sharedToUser":"null",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      },
      {  
         "companyId":0,
         "extraAttrs":{  

         },
         "shareId":224,
         "sharedToRole":"null",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      }
   ],
   "createdByRole":"Admin",
   "createdByUser":"17892"
}

 

Miscellaneous

/download/info

Description: Get packages download information.

URL structure: httpsː//smart.cloud.com/v0/download/info?access_token=<valid token generated by authentication>

URL example: https: //smart.cloud.com/v0/download/info?access_token=OGcrZg7gBrq7xWHlyeeeGIzyG

Method: GET

Sample response:

{  
   "result":"SUCCESS",
   "data":[  
      {  
         "arch":"win32",
         "link":"https://smart.cloud.com/downloadfile/agent/win32/59dc2b10-103e-40e1-9d77-44c98fda7d75/CitrixLifecycleManagementAgent.exe",
         "downloadKey":"59dc2b10-103e-40e1-9d77-44c98fda7d75",
         "filename":"CitrixLifecycleManagementAgent.exe"
      },
      {  
         "arch":"win64",
         "link":"https://smart.cloud.com/downloadfile/agent/win64/59dc2b10-103e-40e1-9d77-44c98fda7d75/CitrixLifecycleManagementAgent.exe",
         "downloadKey":"59dc2b10-103e-40e1-9d77-44c98fda7d75",
         "filename":"CitrixLifecycleManagementAgent.exe"
      },
      {  
         "arch":"rpm32",
         "link":"https://smart.cloud.com/downloadfile/agent/rpm32/59dc2b10-103e-40e1-9d77-44c98fda7d75/citrix-lifecycle-management-agent.bin",
         "downloadKey":"59dc2b10-103e-40e1-9d77-44c98fda7d75",
         "filename":"citrix-lifecycle-management-agent.bin"
      },
      {  
         "arch":"rpm64",
         "link":"https://smart.cloud.com/downloadfile/agent/rpm64/59dc2b10-103e-40e1-9d77-44c98fda7d75/citrix-lifecycle-management-agent.bin",
         "downloadKey":"59dc2b10-103e-40e1-9d77-44c98fda7d75",
         "filename":"citrix-lifecycle-management-agent.bin"
      },
      {  
         "arch":"deb32",
         "link":"https://smart.cloud.com/downloadfile/agent/deb32/59dc2b10-103e-40e1-9d77-44c98fda7d75/citrix-lifecycle-management-agent.bin",
         "downloadKey":"59dc2b10-103e-40e1-9d77-44c98fda7d75",
         "filename":"citrix-lifecycle-management-agent.bin"
      },
      {  
         "arch":"deb64",
         "link":"https://smart.cloud.com/downloadfile/agent/deb64/59dc2b10-103e-40e1-9d77-44c98fda7d75/citrix-lifecycle-management-agent.bin",
         "downloadKey":"59dc2b10-103e-40e1-9d77-44c98fda7d75",
         "filename":"citrix-lifecycle-management-agent.bin"
      }
   ]
}

 

 

back to top

 

0 Comments