Managed File Transfer

 View Only
Expand all | Collapse all

Automate the Enable/Disable Schedulers in Sterling Integrators

  • 1.  Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Fri December 16, 2022 09:53 AM
    I do have too many FSA schedulers and I would like to disable/enable them in single step of process.
    Is it possible to automate the enable/disable of schedulers in SI? I looked through the XAPI services and couldn't find an api that performs this function. Is there anything in ops command that can do the job?


    ------------------------------
    Sach NA
    ------------------------------

    #IBMSterlingB2BIntegratorandIBMSterlingFileGatewayDevelopers
    #DataExchange


  • 2.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Mon December 19, 2022 01:03 AM
    Hi,

    opscmd was also the first thing that came to my mind but did not find anything related to schedules there.
    What would be possible is to change the status in the DB directly although that would not be recommended by IBM :-)
    The table is SCHEDULE.

    Best regards
    Manuel

    ------------------------------
    Manuel Frank
    Integration Architect
    Andreas STIHL AG & Co. KG
    Waiblingen
    ------------------------------



  • 3.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Mon December 19, 2022 04:45 AM
    Thanks for the reply. Any other option do we have other than SCHEDULER TABLE update?





  • 4.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Tue December 20, 2022 12:31 PM
    You can use the REST API's assuming you are on 5.2.6.3 or above. DB update is an alternative but definitely not over preferable.

    ------------------------------
    Balraj Dhir
    ------------------------------



  • 5.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Tue December 20, 2022 12:31 PM
    B2B REST API's should do the needful

    ------------------------------
    Balraj Dhir
    ------------------------------



  • 6.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Tue February 14, 2023 03:49 AM

    As mentioned by others, REST APIs will help (in case you're on the right version). Please find below an example via Postman and another via cURL to retrieve a schedule details and update them. Change {{ip_address}} and {{port}} accordingly as well as the schedule name and parameters. You may identify values to be changed because are underlined.

    Hope it helps.


    /*** Retrieve Adapter status: API Sampe ***/
    http://{{ip_address}}:{{port}}/B2BAPIs/svc/schedules/?searchFor=FSAxxx

    /*** Retrieve Adapter status: API Sampe  via cURL***/
    curl --location --request GET 'http://{{ip_address}}:{{port}}/B2BAPIs/svc/schedules/?searchFor=FSAxxx' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic xxxxxxxx=' 

    /*** Update Adapter status : API Sampe ***/
    http://{{ip_address}}:{{port}}/B2BAPIs/svc/schedules/FSAxxx

        {
            "scheduleType": "Service",
            "timerOrClock": "Timer",
            "system": "node1",
            "excecutionDay": "Every Day",
            "runAtStartUp": {
                "code": true,
                "display": "Yes"
            },
            "runAsUser": "admin",
            "timerSchedule": {
                "hours": 2,
                "minutes": 0
            },
            "scheduleStatusEnabled": {
                "code": true,
                "display": "No"
            }
        }

    /*** Update Adapter status : API Sampe via cURL ***/
    curl --location --request PUT 'http://{{ip_address}}:{{port}}/B2BAPIs/svc/schedules/FSAxxx' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic xxxxxxxx=' \
    --data-raw '{
        "scheduleType": "Service",
        "timerOrClock": "Timer",
        "system": "node1",
        "excecutionDay": "Every Day",
        "runAtStartUp": {
            "code": true,
            "display": "Yes"
        },
        "runAsUser": "admin",
        "timerSchedule": {
            "hours": 2,
            "minutes": 0
        },
        "scheduleStatusEnabled": {
            "code": true,
            "display": "No"
        }
    }'



    ------------------------------
    Emiliano Pacelli
    ------------------------------



  • 7.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Wed December 21, 2022 11:30 AM

    Hello all,

     

    I guess you can use the REST API UPDATE SCHEDULE for that.

    With that you can disable/enable schedules and a lot more.

    Hope that helps!

     

    Mit freundlichen Grüßen / Kind regards

     

    Detlev Niche

     

    Technical Specialist for IBM Sterling Data Exchange

    IBM Sustainability Software, DACH 

    IBM Certified Administrator - Sterling Connect:Direct


    Phone:

    +49-172 2647710

     IBM Deutschland GmbH

    Email:

    Detlev.Niche@de.ibm.com

     Wilhelm-Fay-Str. 30-34

     65936 Frankfurt


    IBM Data Privacy Statement

    IBM Deutschland GmbH / Vorsitzender des Aufsichtsrats: Sebastian Krause
    Geschäftsführung: Gregor Pillen (Vorsitzender), Nicole Reimer, Gabriele Schwarenthorer, Christine Rupp, Frank Theisen
    Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB 14562 / WEEE-Reg.-Nr. DE 99369940

     

     






  • 8.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Mon December 19, 2022 11:13 AM
    Edited by System Test Sun July 23, 2023 10:38 PM
    Have you tried

    UPDATE SCHEDULE SET STATUS='INACTIVE' WHERE SERVICENAME IN ('FSA1','FSA2'....'FSAn')

    where FSA1, FSA2,...FSAn are the names of the schedules you want to disable?

    Of course, you have to be careful about the servicename and that you dont disable ones you want active.
    But, then you can check in the dashboard if the ones you want active are active and the ones you want disabled are disabled

    ------------------------------
    Satya Venkataraman
    ------------------------------



  • 9.  RE: Automate the Enable/Disable Schedulers in Sterling Integrators

    Posted Tue December 20, 2022 09:24 AM
    You can use Rest API --> <b2bserver>:5078/B2BAPIs/svc/schedules/

    something like:

    PATCH <b2bserver>:5078/B2BAPIs/svc/schedules/<SCHEDULE_NAME_FSA>

    {
    "scheduleStatusEnabled": false,
    }

    ------------------------------
    ENIO RUBENS BASSO
    ------------------------------