on 07-05-2018 4:25 PM
Hi everyone,
By working through the second part of the great blog series of sharadha.k about IoT Prototype with Business Rules and Workflow i was hitting the problem that I'm not able to fetch the X-CRSF-Token.
My response just sending me an 503 error back. Is it an internal error or do I forgot something to do?
Hoping anyone knows a solution!
best regards,
Kai
Kai,
I too got a similar error when I tested in the non-trial environment but managed to find the cause. I used the URL below and got response as 200 and got the XSRF token too.
https://bpmrulesruntimerules-xxxxxx.hana.ondemand.com/rules-service/v1/rules/xsrf-token
I got the url (first part) from the URL mentioned under connectivity services -> destination ->bpmrulesruntime . If you notice closely the term 'rules' appear twice once before the runtime and once after. I guess you can try with the same URL or check and confirm once in your destinations.
Hope this helps. Let me know if it works.
- Sharadha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check out the SAP Cloud Platform Business Rules Execution API it seems that the path to fetch the token has changed to:
/v1/rules/xsrf-token
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
I am having a POST problem when attempting to call the subsequent ajax call after obtaining the X-CSRF-Token.
When performing the same on Postman it worked but not from Custom SAPUI5 application deployed on SCP.
1. PostMan (Business Rules Posting) - stranger thing is, it is still using the old format when invoke the post rules which is https://bpmrulesruntimerules-c6d698ada.ap1.hana.ondemand.com/rules-service/v1/rules/invoke?rule_serv...
When performing the same from SAPUI5 i am getting the following error, see below attached images - with the new URL format /bpmrulesruntime/rules-service/rest/v1/rule-services/java/SE_GSL/GSLRuleService.
This is the neo-app.json setting.
Performing the same with the URL format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramon
I would log this as a separate request if I were you as this question has already been answered. This is a legitimate question as I too am having issues generating the X-CSRF-Token's and I believe it relates to the API's being modified.
https://api.sap.com/api/SAP_CP_BusinessRules_Runtime_V2/resource
When I look at the previous API's they are stating DEPRECATED as the Status. I currently cannot generate a token using the V1 API's nor the V2 API's so I would suggest opening another question like I did here
https://answers.sap.com/questions/12708781/apis-to-utilise-for-sap-cloud-platform-business-ru.html
Thanks & Regards
Phil Cooley
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The URL you use is not correct. Please follow the API documentation from here:
https://api.sap.com/api/SAP_CP_BusinessRules_Runtime
Get XSRF Token: /v1/rules/xsrf-token
Post the rule service: /rest/v1/rule-services/java/{projectName}/{ruleserviceName}
403 forbidden comes when the token expires.
Instead of using REST Client, you can also use API Business Hub to test the rules.
https://api.sap.com/api/SAP_CP_BusinessRules_Runtime
Hope that helps,
Archana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Everyone again,
Thank you for your fast reply!!
First I used the chrome version of postman and there I tried it with different kinds of the URL of course also with the false URL in the screenshot. But I still just got 503 and no Token.
Now I've tried it with a newer Version of Postman and I've got a 403 response but with X-CRSF-Token.
So I think it wasn't just the wrong URL.
Thank You again for your support!
Best regards,
Kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kai,
Please check the service URL. The URL to be used is /rules-service/v1/rules/xsrf-token, while you have used /rule-service/v1/rules/xsrf-token.
The 503 (service unavailable) error is encountered when the bpmrulesruntime URL is incorrect. Please verify if you are using the correct host. Go to SAP Cloud Platform Cockpit, go to connectivity -> destinations and select the destination bpmrulesruntime. Copy the URL maintained in the destination.
The URL to get XSRF token would be <url copied from cockpit>/rules-service/v1/rules/xsrf-token
Regards,
Sesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.