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"
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 accountSign in
Already have an account? Sign in here.
Sign In Now