Automation Analytics & Intelligence (AAI)

 View Only

  • 1.  Automating the creation of Job Streams

    Posted Aug 04, 2025 03:12 PM

    I have a user that has about 200 processes from Automic they would like to have added to AAI to monitor.  Is there an automated process to set up Job Streams or it is only a manual process?  



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


  • 2.  RE: Automating the creation of Job Streams

    Broadcom Employee
    Posted Aug 05, 2025 12:50 AM

    HI Jared,

    There are multiple means of creating jobstreams:

    • Via the traditional means, the AAI User Interface
    • Via the AAI REST API
    • Via the AAI Command Line Interface (CLI)

    While not automatic, leveraging a template JSON request to use the REST API and/or a template Python script to use the CLI can ease the creation of multiple jobstreams. 

    REST API

    There is documentation along with an example of usage within the swagger documentation found at:
    http[s]://<aai_server>:<port>/aai/swagger-aai.html#/jobstreams/JobStreamsService_addJobStream

    CLI

    You will find an example script named add_jobstream.py on the AAI server within the <INSTALL_DIR>/batch/examples directory.

    I hope that this helps. 

    Many thanks and kind regards,
    Jon

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



  • 3.  RE: Automating the creation of Job Streams

    Posted Aug 05, 2025 09:35 AM

    Thanks.  Didn't know about the REST endpoint other than the subscription services.  This should help a lot.

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



  • 4.  RE: Automating the creation of Job Streams

    Broadcom Employee
    Posted Aug 11, 2025 11:50 AM

    Jared,

    If it helps, I can share a CLI script (python) that takes a CSV file with basic information (target job, scheduler, business area, etc.) as a parameter for creating jobstreams in bulk. 

    Thanks,

    Martin

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



  • 5.  RE: Automating the creation of Job Streams

    Posted Aug 12, 2025 08:09 AM

    Yes, please send it.  While I think they were going to look into the REST API, it won't hurt to have this as an option.

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



  • 6.  RE: Automating the creation of Job Streams

    Posted Aug 12, 2025 09:17 AM

    Hi Martin.

    I am interested too, please share that CLI script (python).

    Thanks,

    Jehan

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



  • 7.  RE: Automating the creation of Job Streams

    Posted Aug 12, 2025 09:18 AM

    Hi Martin,

    Can you also share a copy to me,

    Thanks,

    Jehan

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



  • 8.  RE: Automating the creation of Job Streams

    Posted Aug 12, 2025 09:17 AM

    Hi John.

    I saw the script on the INSTALL dir but where can this run.sh part of the parameter located? 

    print('usage: ./run.sh add_jobstream.py target_job scheduler jobstream_name business_area [parentage]')

    Regards,

    Jehan

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



  • 9.  RE: Automating the creation of Job Streams

    Broadcom Employee
    Posted Aug 11, 2025 11:51 AM

    Jared,

    If it helps, I can share a CLI python script that takes a CSV file as a parameter to create jobstreams in bulk. The CSV file contains the metadata details for each jobstream (scheduler name, target job name, business area, etc.). 

    Thanks,

    Martin

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