Last post 09-01-2017, 2:37 AM by sheza. 5 replies.
Sort Posts: Previous Next
    Posted: 08-31-2017, 1:18 AM


    I'm trying to automate resolving common commvault issues utilising the CV REST API.


    For the first part I'd like to get a list of running Virtual Server Agent jobs and suspend these jobs to do some things to the proxies (reboot, clean up windows/temp/vmware-system etc.)

    I've got the REST stuff working, however trying to query the running jobs appears limited.

    Reading the doco, it looks like there's only 2 filters clientid and jobfilter.  Jobfilter is a range of job types, DASH copy, install, Synth full etc.


    The problem is that it returns *all* the jobs and I'm only able to filter on the response rather than the request.


    The response has a lot more fields including the ever useful:


    The status of the job.

    Valid values are:

    • Running
    • Waiting
    • Pending
    • Suspend
    • Pending
    • Suspended

    However this doesn't look like I can filter it on the request end, only on the response are retrieving all the jobs.


    While I can filter by client, the single VSA client is a subset of ~50% of the server in the DC, too many to recall at once and filter.


    Any ideas on how I can do this?  Is REST the wrong tool to use here?  Should I be trying to hook into the workflow engine somehow?





  • Re: REST API
    Posted: 08-31-2017, 5:10 AM

    Hi ,

    You can use the POST JOBS API for achieve this. It has filter support for various activities and also different agents. 

     Please refer to 

    Please let me know in case of any further questions. 




  • Re: REST API
    Posted: 08-31-2017, 11:32 AM

    Hi Boffhead,

    We've added two other query parameters for GET Job API, available in our SP9 documentation which would take some more time to be available for all customers.

    I've attached the document for your reference which contains info about these query params that could help you get all active jobs.

    Same sample could be found @

    (Look at the second example on the right hand side for GET Job API)

     Hope it helps.



  • Re: REST API
    Posted: 08-31-2017, 6:26 PM

    Awesome, thanks guys, I'll have a look at that this morning.

  • Re: REST API
    Posted: 08-31-2017, 7:05 PM

    Update, I've had a look at these.


    @srikanthiyer - I've done that but I can't achieve what I need to with that the current filters as of SP8 and latest service pack.


    @Yashwanth - That looks exactly what I need  "All active jobs for all clients" via "?jobCategory=Active"

    I've just upgraded this Commserve to SP8 latest hotfix, this'll be a good reason to get SP9 on when it comes out.



  • Re: REST API
    Posted: 09-01-2017, 2:37 AM

    Hi Brendan,

    You can use this API even on SP8.

    "All active jobs for all clients" via "?jobCategory=Active"




The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Copyright © 2020 Commvault | All Rights Reserved. | Legal | Privacy Policy