Automation Analytics & Intelligence (AAI)

 View Only

Expand all | Collapse all

Define/Add jobstream with description and timezone via rest api

  • 1.  Define/Add jobstream with description and timezone via rest api

    Posted Aug 14, 2025 12:49 PM

    Hi Community,

    Can you please help me to define/add jobstream with description and timezone via rest api? Please suggest!



    Regards,

    Jehan



    -------------------------------------------


  • 2.  RE: Define/Add jobstream with description and timezone via rest api

    Broadcom Employee
    Posted Aug 15, 2025 11:12 AM
    Hi Jehan,
     
    To define a jobstream with a specific SLA time + timezone you'll make two REST calls. The payload examples below are simple and can be expanded based on your SLA requirements.
     
    The first call to define the SLA (substituting target job ID and scheduler ID)
    POST /jobstreams
    payload:
    {
    "name":"my new sla",
    "monitorable":true,
    "forecastable":true,
    "critical":true,
    "annotation":"this is the description field",
    "autoTrimOptions":{},
    "businessAreas":["root"],
    "targetJobKey":{"jobId":<jobID>,"schedulerId":<schedID>,"name":"test_job"}
    }
     
    The second call to set the specific SLA w/ timezone (using the jobstream ID returned from first call)
    PUT /jobstreams/<jobstreamID>
    payload:
    {
    "annotation":"this is an updated description field!",
    "name":"my new sla",
    "lateTimeOfDay":"15:00:00",
    "endTimeZone":"US/Hawaii",
    "businessAreas":["root"]
    }



    ------------------------------
    Mike Kruse
    Automation Capability Specialist
    Agile Operations Division, Broadcom Software
    micheal.kruse@broadcom.com
    ------------------------------



  • 3.  RE: Define/Add jobstream with description and timezone via rest api

    Posted Aug 15, 2025 11:38 AM
    Thanks Mike,
    This is great help however I was looking for 1 POST that can include both actions if possible. I need that to be defined on the Alert Criteria tab as below snaps

    [cid:image001.png@01DC0DD8.FEF33140]

    Regards,
    Jehan




  • 4.  RE: Define/Add jobstream with description and timezone via rest api

    Broadcom Employee
    Posted Aug 15, 2025 11:56 AM

    I'm not able to see your screenshot, but you can specify alert timezone in the initial create call using the following:

    "alertDefinitions":[{"alertType":"JOBSTREAM_ALERT_TIMEZONE","timeZone":"US/Pacific","severity":"Critical"}]

    Depending on how you want your alerts set, that can get more complex. In this example, a Late alert is being set along with a **** window.

    "alertDefinitions":[
    {
    "alertType":"JOBSTREAM_LATE",
    "alertFrequency":null,
    "timeChange":null,
    "durationChange":null,
    "severity":"critical",
    "alertDistributionTypes":["SNMP","SMTP"]
    },
    {
    "alertType":"JOBSTREAM_ALERT_TIMEZONE",
    "timeZone":"US/Hawaii",
    "severity":"Critical"
    },
    {
    "alertType":"JOBSTREAM_ALERT_BLACKOUT_PERIOD",
    "severity":"Critical",
    "startDay":"Saturday",
    "startTime":"08:00",
    "endDay":"Sunday",
    "endTime":"20:00"
    }
    ]

    For defining a specific SLA time, the second call is required (The jobstream must be created first before a specific SLA can be set).



    ------------------------------
    Mike Kruse
    Automation Capability Specialist
    Agile Operations Division, Broadcom Software
    micheal.kruse@broadcom.com
    ------------------------------



  • 5.  RE: Define/Add jobstream with description and timezone via rest api

    Posted Aug 15, 2025 11:57 AM

    Mike,

    Also, in the annotation field, how can I force a new line?

    Regards,

    Jehan

    -------------------------------------------



  • 6.  RE: Define/Add jobstream with description and timezone via rest api

    Broadcom Employee
    Posted Aug 15, 2025 12:38 PM

    You can use the \n new line like so:

    annotation: "this is the first line\nhere is a new line\nand another line\nand another!"



    ------------------------------
    Mike Kruse
    Automation Capability Specialist
    Agile Operations Division, Broadcom Software
    micheal.kruse@broadcom.com
    ------------------------------



  • 7.  RE: Define/Add jobstream with description and timezone via rest api

    Posted Aug 15, 2025 01:25 PM

    MIke,

    If you issue that, it comes as 1 liner when you view the jobstream

    Description Jehan TEST Jehan TEST1 Jehan TEST2 Jehan TEST3

    However if you are to edit jobstream it comes as below

    Jehan TEST
    Jehan TEST1
    Jehan TEST2
    Jehan TEST3

    We want to look as latter not needing to edit the jobstream.

    -------------------------------------------



  • 8.  RE: Define/Add jobstream with description and timezone via rest api

    Broadcom Employee
    Posted Aug 18, 2025 04:33 PM

    You are correct.. I was seeing the new line on the Edit screen, but not while viewing the jobstream. I'll have to look into it a bit more to see if there's a way to handle that.



    ------------------------------
    Mike Kruse
    Automation Capability Specialist
    Agile Operations Division, Broadcom Software
    micheal.kruse@broadcom.com
    ------------------------------



  • 9.  RE: Define/Add jobstream with description and timezone via rest api

    Posted Aug 26, 2025 08:59 AM

    @Mike,

    Do we have any update?

    - Jehan

    -------------------------------------------



  • 10.  RE: Define/Add jobstream with description and timezone via rest api

    Broadcom Employee
    Posted Aug 26, 2025 04:13 PM

    Hi Jehan - I've confirmed the current version of AAI does not support the multi-line description display outside of the edit screen itself.

    I'd ask that you raise a request for enhancement via support case with specifics of the behavior you're looking for. Consider how multi-line output may display in jobstream summary screens, as well as behavior for data insight tables or pdf exports.

    Thanks,

    Mike



    ------------------------------
    Mike Kruse
    Automation Capability Specialist
    Agile Operations Division, Broadcom Software
    micheal.kruse@broadcom.com
    ------------------------------