Blueprint API

Contents

/process (POST)

Description

Creates a Process.

URL Structure

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

Method

POST

Input

JSON payload

Example

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

Back to top

/process/ (GET)

Description

Gets process details list.

URL Structure 

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

Method

GET

Parameters

type (optional)
To get a list of purchased blueprints, specify "purchased" as the type.

Example

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

Response

JSON payload

Sample response:

[{"purchaseInProgress":false,"outputs":[],"shared":"N","inputs":[],"Description":[],"serverGroup":[],"processInstanceBeans":[],"templateFlag":"Y","targets":[],"excludeTargets":[],"globalProps":[],"timeout":0,"runAsync":false,"parentCompanyId":0,"publishedVersion":0,"excludeTarget":[],"parentProcessId":-1,"processId":227,"processName":[],"creationTimestamp":0,"sku":{},"subProcesses":[],"extraAttrs":{},"tasks":[],"activeFlag":"Y","parentGroupId":0,"processParameters":[{"propertyKey":"version","companyId":19547,"role":"Admin","deleted":false,"processId":227,"propValueArr":[],"propertyValue":"6","user":"44834","extraAttrs":{},"required":false},{"propertyKey":"purchased_flag","companyId":19547,"role":"Admin","deleted":false,"processId":227,"propValueArr":[],"propertyValue":"N","user":"44834","extraAttrs":{},"required":false},{"propertyKey":"shared_flag","companyId":19547,"role":"Admin","deleted":false,"processId":227,"propValueArr":[],"propertyValue":"N","user":"44834","extraAttrs":{},"required":false},{"propertyKey":"file_location","companyId":19547,"role":"Admin","deleted":false,"processId":227,"propValueArr":[],"propertyValue":"19547\\44834\\15542590142024\\","user":"44834","extraAttrs":{},"required":false}],"startTaskId":0,"version":"6","target":[],"tagList":[],"companyId":0,"migratedFlag":true,"credentialId":0,"properties":[]},{"purchaseInProgress":false,"outputs":[],"shared":"N","inputs":[],"Description":"dependancy","serverGroup":[],"processInstanceBeans":[],"templateFlag":"Y","targets":[],"excludeTargets":[],"globalProps":[],"timeout":0,"runAsync":false,"parentCompanyId":0,"publishedVersion":0,"excludeTarget":[],"parentProcessId":-1,"processId":615,"processName":"dependancy","creationTimestamp":0,"sku":{},"subProcesses":[],"extraAttrs":{},"tasks":[],"activeFlag":"Y","parentGroupId":0,"processParameters":[{"propertyKey":"version","companyId":19547,"role":"Admin","deleted":false,"processId":615,"propValueArr":[],"propertyValue":"10","user":"44834","extraAttrs":{},"required":false},{"propertyKey":"purchased_flag","companyId":19547,"role":"Admin","deleted":false,"processId":615,"propValueArr":[],"propertyValue":"N","user":"44834","extraAttrs":{},"required":false},{"propertyKey":"shared_flag","companyId":19547,"role":"Admin","deleted":false,"processId":615,"propValueArr":[],"propertyValue":"N","user":"44834","extraAttrs":{},"required":false},{"propertyKey":"file_location","companyId":19547,"role":"Admin","deleted":false,"processId":615,"propValueArr":[],"propertyValue":"19547\\44834\\245571258180447
","user":"44834","extraAttrs":{},"required":false}],"startTaskId":0,"version":"10","target":[],"tagList":[],"companyId":0,"migratedFlag":true,"credentialId":0,"properties":[]}]

Back to top

/process/{id} (POST)

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

Example

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

Back to top

/process/{id} (DELETE)

Description

Deletes a Process.

URL Structure

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

Method

DELETE

Example

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}

Back to top

/process/{id} (GET)

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)

Example

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}

Back to top

/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

Example

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

Back to top

/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

Example

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

Back to top

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

Back to top

/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

Name Required or Optional
jobname Required
version Optional

Response

JSON payload 

Sample response:

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

Back to top

/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

Name Required or Optional
jobname Required
version Optional

Input

JSON Payload 

Example

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

Back to top

/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

Name Required or Optional Description
instanceid Optional ID of the launched process instance. You can acquire this with the Process Instance API: /processinstnace?processid=<processid>
jobname Optional Process job name.
override Optional Valid values: true, false; "True" overrides any existing recurring schedule on the targeted process.
processcodes Optional Comma-separated list of process codes. Will run a particular process code. In this case, it needs to send a valid instanceid.

 

Response

JSON payload 

Sample response:

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

Back to top

/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

Name Required or Optional Description
instanceid Required ID of launched process instance. You can acquire this with the Process Instance API: /processinstance?processid=<processid>
jobname Optional Process job name.
processcodes Required Comma-separated list of processcodes. Will run a particular process code. In this case, it needs to send valid instanceid.

Response

JSON payload 

Sample response:

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

Back to top

/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

Name Required or Optional Description
instanceid Required ID of launched process instance. You can acquire this with the Process Instance API: /processinstance?processid=<processid>
jobname Optional Process job name.
processcodes Required Comma-separated list of processcodes. Will run a particular process code. In this case, it needs to send valid instanceid.

Input

JSON payload

Example

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

Back to top

/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

Name Required or Optional Description
instanceid Required ID of launched process instance. You can acquire this with the Process Instance API: /processinstance?processid=<processid>
agentids Required Comma-separated list of agent IDs to be deleted.
jobname Optional Process job name.
processcodes Optional Will remove from the particular process or task.
RequestParam Required (value = "instanceid", required = true) int instanceID,

Response

JSON payload 

Sample response:

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

Back to top

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

Back to top

/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

Name Required or Optional Description
access_token Required String. A valid Smart Tools access token
allowmodification Required Boolean. Published blueprint is or is not editable.

Input

JSON Payload 

Example

{"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": []
}

Back to top

/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

Name Required or Optional Description
access_token Required String. A valid Smart Tools access token
allowmodification Required Boolean. Published blueprint is or is not editable.

Success Response

HTTP STATUS CODE 204

Back to top

0 Comments