6 Replies Latest reply on Aug 13, 2019 5:00 AM by Ganesh Venkataramanan

    Unable to create job using control-m automation api

    Ganesh Venkataramanan
      Share This:

      I am trying to use automation api to create jobs on our control-m environment. I am able to validate the job using "build" command however unable to create the job using "run" command. The error is not helpful.

       

      test@sabre-rhel7[101-create-first-job-flow] $ ctm build AutomationAPISampleFlow.json

      [

        {

          "deploymentFile": "AutomationAPISampleFlow.json",

          "successfulFoldersCount": 0,

          "successfulSmartFoldersCount": 1,

          "successfulSubFoldersCount": 0,

          "successfulJobsCount": 1,

          "successfulConnectionProfilesCount": 0,

          "successfulDriversCount": 0,

          "isDeployDescriptorValid": false

        }

      ]

       

      sabuser@sabre-rhel7[101-create-first-job-flow] $ ctm run AutomationAPISampleFlow.json

      {

        "errors": [

          {

            "message": "[Failed to create new folder SAB_API_SAMPLE]"

          }

        ]

      }

       

      MY JSON file:

       

      {

          "Defaults" : {

              "Application": "XXXX",

              "SiteStandard": "NON_WCM_APP_SITE_STANDARD",

              "SubApplication" : "SAB_API_TEST",

              "ControlmServer" : "XXXX",

              "RunAs" : "XXX",

              "Host" : "XXX"

          },

       

       

          "SAB_API_SAMPLE": {

              "Type": "Folder",

              "CommandJob": {

                  "Type": "Job:Command",

                  "Command": "echo my 1st job"

              }

          }

      }