Jump to content
We've recently updated our Privacy Statement, available here ×
  • RESTv2 job or schedule update does not work


    Jim W
    • Features: Scheduler Version: v7.2 Product: JasperReports® Server

    Problem Description:

    Suppose you have been working on automating a process to update jobs/schedules for users.  For example, you want to update email related information.  You set up the RESTv2 call passing in the JSON object to update just the email address.  It is not working for you.

    [toc]

    Json object:

    {
        "mailNotification": {"toAddresses": {"address": ["email@email.com"]}}
    }

     

    update url:

    https://mycompany.com/jasperserver-pro/rest_v2/jobs?id=1

    Response: 200

     

    You are logged into the server when posting this request. A response of 200 should mean that the update is successful. However, in reality, the schedule has not been changed.


    Solution:

    If we want to create or read a job, you can use the usual (parent) object name, like "mailNotification", but if you want to update some object you must use model object name, like "mailNotificationModel".  See details in the JasperReports-Server-REST-API document section 17.7 "Updating Jobs in Bulk"


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...