hlynch Posted December 18, 2019 Share Posted December 18, 2019 I'm trying to setup scheduleing jobs through the rest interface.Setting up the request involves creating the Job Descriptor to send over.I've tried to find some docs describing what all is valid to put into the Descriptor, but I've not been successful.Are there any docs out there on the full definiton of what can be in a Job Descriptor? Link to comment Share on other sites More sharing options...
joseng62 Posted December 19, 2019 Share Posted December 19, 2019 Hi Hlynch, Yes there is. I worked in the REST API for schedule job today actually. Best reference is the official documentation : JasperReports-Server-REST-API-ReferenceChapter 16 The job Services. Listing Report Jobs : is helpfull to do a get on a report that has schedule jobs linked to it. So for reference : You can maybe manually create a schedule job. Then do a GET to get the job idThen do Viewing a Job Definition Here you make use of the id and this will return a payload which you can then use as reference. I must say schedule jobs description strucutres are the most complicated of all the REST strucutres. Content-Type :application/job+xml orapplication/job+jsonContent :A well-formed XML or JSON job descriptor. The request can include either acomplete descriptor such as the result of a GET request described in 16.3,“Viewing a Job Definition,” on page 132, or it can be a minimally sufficientdescriptor as shown in 16.4, “Scheduling a Report,” on page 136.Note as in documentation : Do a PUSH to create a schedule. Do a POST to update with version property.Ussually it is the otherway around, but not in this case.Example of one of the GETGET : https://localhost:8443/jasperserver/rest_v2/jobs?reportUnitURI=path_to_your_given_report_onjasperrepoHEADER : Accpet : application/jsonThis will return a json payload on a 200.If you need more, let me know. All of this should be enought to get to going. Link to comment Share on other sites More sharing options...
hlynch Posted December 20, 2019 Author Share Posted December 20, 2019 Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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