Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Having issues with POST

    Posted 06-05-2025 18:40

    Jbowes | 2018-03-22 16:14:11 UTC | #1

    I have a web service that takes input to a post from the request body. I have the service in PureCloud all setup and it works from the test page. I added a 'Call Data Action' to our workflow and have it all setup. But it hits the failure leg everytime and I am not seeing the call in the web logs on our server and I have double checked the configuration. And it works fine from the test page in the admin tool for Pure Cloud.


    Jason_Mathison | 2018-03-22 16:16:05 UTC | #2

    Please post all of your configuration and contracts (with anything sensitive replaced with FOOs and BARs )


    Jbowes | 2018-03-22 16:19:08 UTC | #3

    here is the input contract:

    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "JSON Schema for my JSON file format", "type": "object", "properties": { "obrefno": { "description": "The responsible id to search for", "type": "string" }, "respid": { "description": "The responsible id to search for", "type": "number" }, "comment": { "description": "The responsible id to search for", "type": "string" } }, "additionalProperties": true }


    Jbowes | 2018-03-22 16:19:32 UTC | #4

    the output contract:

    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "JSON Schema for my JSON file format", "type": "object", "properties": {}, "additionalProperties": true }


    Jbowes | 2018-03-22 16:21:08 UTC | #5

    request config:

    { "requestUrlTemplate": "https://purecloudsvc.FOO.com/PureCloudServices/api/PostNewNote", "requestType": "POST", "headers": {}, "requestTemplate": "{\"Comment\":\"${input.comment}\",\"ObRefNo\":\"${input.obrefno}\",\"ResponsibleId\":${input.respid}}" }


    Jbowes | 2018-03-22 16:21:41 UTC | #6

    response config:

    { "translationMap": {}, "successTemplate": "${rawResult}" }


    Jbowes | 2018-03-22 16:27:41 UTC | #7

    When I run it from the actions part of admin it works and I get a log entry in my web logs. But when it runs from the workflow it fails and I don't get a log entry.


    Jason_Mathison | 2018-03-22 17:09:09 UTC | #8

    The issue appears to be that when you try to execute this action in a flow the obrefno input is not set / null.

    One other note, if you reworked your input contract so that the key names are exactly the same as what your service expects, you could replace the hand built requestTemplate with

    "requestTemplate": "${input.rawRequest}"


    Jbowes | 2018-03-22 18:13:36 UTC | #9

    Ok awesome thank you. That helped alot.


    system | 2018-04-22 18:26:23 UTC | #10

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 2663