Decision Management & Intelligence (ODM, DI)

Decision Management & Intelligence (ODM, DI)

Connect with experts and peers to elevate technical expertise, solve problems and share insights


#Data
#Data
#Businessautomation
#DecisionManagement
 View Only
  • 1.  Unauthorized When Invoking DecisionService REST API

    Posted 06/16/21 07:25 PM

    I am trying to invoke the Decision Service REST APIs to deploy a RuleApp, but I am getting "401 Unauthorized". I am using the below curl command. I have no issues deploying through the REST API within the ResConsole. What am I doing wrong?

    curl -v -X POST -H "Content-Type: application/octet-stream" --data-binary /tmp/myRuleApp.jar -u resAdmin:resAdmin http://localhost:9080/res/api/v1/ruleapps

    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 2.  RE: Unauthorized When Invoking DecisionService REST API

    Posted 06/16/21 07:28 PM

    I also tried it with the 64-bit encode of the username and password in the header with "Authorization: Basic <code>"



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 3.  RE: Unauthorized When Invoking DecisionService REST API

    Posted 06/16/21 07:50 PM

    the authorization header should work, you encoded <user>:<password>? You might need to use application/zip for the content.

    Look at the network tab in your browser developer tools (F12) when running the command from the res console, that may show you more



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 4.  RE: Unauthorized When Invoking DecisionService REST API

    Posted 06/16/21 08:05 PM

    Try this form

    curl -k -X POST http://resAdmin:resAdmin://localhost:9080/res/api/v1/ruleapps -H 'Content-type: application/octet-stream' -H 'Accept: */*' --compressed --data-binary '/tmp/ruleApp.jar'



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 5.  RE: Unauthorized When Invoking DecisionService REST API

    Posted 06/18/21 01:15 AM

    Thank you Alain for the quick reply. It ended up being an issue with NGINX stripping out the basic auth header when it forwards the request to the REST API.

    Setting the below lines in the NGINX config fixed the issue.

    proxy_set_header Authorization $http_authorization; proxy_pass_header Authorization;

    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration