mr.tonic Posted January 23, 2017 Share Posted January 23, 2017 Hi Guys,I'm following documentation to modify Report Schedule (Job): http://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v630/jobs-service#Editing_a_Job_DefinitionThe goal is to modify mailNotification subModel, but even with simple update I encounter issues.Jasper Reports Server version: 6.3.0POST /jasperserver/rest_v2/jobs/11056/ HTTP/1.1Host: jasper-server.example.com:10080Authorization: Basic <token>Accept: application/job+jsonContent-Type: application/job+jsonCache-Control: no-cache{ "label": "Modified Label"}[/code]I've tried providing a full Job descriptor and minimal descriptor, but response is still the same.It's HTML login page:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <title>TIBCO Jaspersoft: Login</title>...[/code]Also log file indicates CSRF error:2017-01-23 10:19:17,166 ERROR CsrfGuard,http-apr-0:0:0:0:0:0:0:0-10080-exec-12:44 - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:<ipaddress>, method:POST, uri:/jasperserver/rest_v2/jobs/11056/, error:required token is missing from the request)[/code]Also to mention, other GET requests work perfectly fine. Link to comment Share on other sites More sharing options...
Solution mr.tonic Posted February 27, 2017 Author Solution Share Posted February 27, 2017 If anyone has the same issue.http://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v630/rest-api-overview#Sending_REST_Requests_from_a_BrowserTo allow testing of the REST API through a browser, configure your browser REST client to include the following header in every request:X-REMOTE-DOMAIN: 1 1 Link to comment Share on other sites More sharing options...
krikke_wl Posted March 1, 2018 Share Posted March 1, 2018 Hi I see the same error in my logs, but when I add X-REMOTE-DOMAIN to my POSTMAN put request, I still get this error: HTTP Status 401 - Domain 1 forbidden.type Status reportmessage Domain 1 forbidden.description This request requires HTTP authentication.Apache Tomcat/7.0.32 any idea? regards Link to comment Share on other sites More sharing options...
eberle.sistemas Posted February 19 Share Posted February 19 On 2/27/2017 at 5:49 AM, mr.tonic said: If anyone has the same issue. http://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v630/rest-api-overview#Sending_REST_Requests_from_a_Browser thank you very much for your contribution, you solved a problem I was struggling with. 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