Skip to main content

Hi Everyone,

I am trying to create a task bot schedule in control room using AA control room API.
The the Delete API is working fine but when i am trying to Create a new or Update a existing schedule using API am getting 500 (server error).
If you have encounter such issue you help will me appreciated. 

Error message:-

Below id the json request body that i am using:- 
 

{

  "schedule": {

    "status": "ACTIVE",

    "description": "Schedule automation to run email bot.",

    "scheduleType": "NONE",

    "dailyRecurrence": {

      "interval": 0

    },

    "timeZone": "Asia/Calcutta",

    "startDate": "2025-11-16",

    "endDate": "",

    "startTime": "16:00",

    "repeatEnabled": false,

    "misfireScheduleConfig": false,

    "ownedBy": 12865,

    "scheduleResiliency": {

      "common": {

        "detectAndNotify": {

          "enabled": false,

          "hideSensitiveInformation": false

        },

        "recording": {

          "enabled": false,

          "botStatus": "FAILED"

        },

        "handleUnexpectedPopups": false

      }

    }

  },

  "deployment": {

    "botId": 461432,

    "automationName": "Demo_1",

    "description": "My first bot deploy using api",

    "botLabel": "",

    "runElevated": false,

    "hideBotAgentUi": false,

    "handleUnexpectedPopups": false,

    "automationPriority": "PRIORITY_MEDIUM",

    "UnattendedRequest": {

      "runAsUserIds": [

        "12865"

      ],

      "poolIds": [],

      "numOfRunAsUsersToUse": 0,

      "deviceUsageType": "RUN_ONLY_ON_DEFAULT_DEVICE"

    }

  }

}

Hi ​@sudeeptapradhan048,

 

Please make these exact changes (these are the ones that most often trigger 500s):

  1. Time zone: Use the canonical IANA ID Asia/Kolkata (not Asia/Calcutta).
    Why: Asia/Kolkata is the supported ID shown in AA docs; Calcutta is deprecated/unsupported. 

  2. Property name casing: Change UnattendedRequest to unattendedRequest.
    Why: Working v2 examples use lowercase; wrong casing has caused 400/500 for others. 

  3. Run‑once schedule + recurrence: Remove dailyRecurrence (or send {}) for scheduleType: "NONE".
    Why: For one‑time runs, interval isn’t valid; sending interval: 0 is a common trigger for server errors. The community’s confirmed v2 payload omits it. 

  4. Number of run‑as users: Set "numOfRunAsUsersToUse": "1" (or 1), not 0.
    Why: The working v2 sample uses "1"; 0 can break server‑side validation. 

  5. Remove empty/managed fields : Delete "endDate": "" and ownedBy.
    Why: Run‑once samples omit endDate; ownedBy is server‑managed. 

  6. Extra fields: Drop handleUnexpectedPopups under deployment (keep only inside schedule.scheduleResiliency.common).
    Why: The working v2 payload doesn’t include it at the deployment level. 

  7. Endpoint version: Ensure you’re calling POST /v2/schedule/automations (v1 is deprecated in recent A360 versions). 


HI ​@Padmakumar 
Thank you for your response. My issue resolved now.
Hi Community please find the issue i have faced and working solution for that.
 

Issue-1 :- When i was trying to use the CR scheduling API on swagger i was getting the below error.

Solution :- Copy the API URL to postman or something you like and add replace http with https, it will work.

Issue-2 :- Getting 500 HTTP response due to request body for Creating and Updating schedule's.
Solution :-

Create :-

{your CR URL}/v2/schedule/automations
working request body :-
 

{

  "schedule": {

    "status": "ACTIVE",

    "description": "Schedule automation to run email bot.",

    "scheduleType": "NONE",

    "dailyRecurrence": {},

    "timeZone": "Asia/Kolkata",

    "startDate": "2025-11-16",

    "startTime": "16:00",

    "repeatEnabled": false,

    "misfireScheduleConfig": false,

    "scheduleResiliency": {

      "common": {

        "detectAndNotify": {

          "enabled": false,

          "hideSensitiveInformation": false

        },

        "recording": {

          "enabled": false,

          "botStatus": "FAILED"

        },

        "handleUnexpectedPopups": false

      }

    }

  },

  "deployment": {

    "botId": Task bot ID(ex-1234),

    "automationName": "Task bot name",

    "description": "My first bot deploy using api",

    "botLabel": "",

    "runElevated": false,

    "hideBotAgentUi": false,

    "automationPriority": "PRIORITY_MEDIUM",

    "unattendedRequest": {

      "runAsUserIds": [

        "12222"

      ],

      "poolIds": [],

      "numOfRunAsUsersToUse": 1,

      "deviceUsageType": "RUN_ONLY_ON_DEFAULT_DEVICE"

    }

  }

}
 

Update:-

{your CR URL}/v2/schedule/automations/{Schedule ID (ex-1234)}
Note - If you don’t know schedule id remove the s from http ({your CR URL}/v2/schedule/automations) and you will get all the schedule details(Other ways are also available in swagger)


working request body :-

{

  "schedule": {

    "status": "ACTIVE",

    "description": "Schedule automation to run email bot.",

    "scheduleType": "NONE",

    "dailyRecurrence": {

      "interval": 0

    },

    "timeZone": "Asia/Kolkata",

    "startDate": "2025-12-16",

    "startTime": "14:00",

    "repeatEnabled": false,

    "misfireScheduleConfig": false,

    "scheduleResiliency": {

      "common": {

        "detectAndNotify": {

          "enabled": false,

          "hideSensitiveInformation": false

        },

        "recording": {

          "enabled": false,

          "botStatus": "FAILED"

        },

        "handleUnexpectedPopups": false

      }

    }

  },

  "deployment": {

    "botId": Task bot ID(ex-1234),

    "automationName": "Task bot name",

    "description": "My first bot update using api",

    "botLabel": "",

    "runElevated": false,

    "hideBotAgentUi": false,

    "automationPriority": "PRIORITY_MEDIUM",

    "unattendedRequest": {

      "runAsUserIds": [

        "12222"

      ],

      "poolIds": [],

      "numOfRunAsUsersToUse": 1,

      "deviceUsageType": "RUN_ONLY_ON_DEFAULT_DEVICE"

    }

  }

}