Legacy Dev Forum Posts

 View Only

Sign Up

Error message (400 bad request) at simple DataAction

  • 1.  Error message (400 bad request) at simple DataAction

    Posted 06-05-2025 18:41

    robm | 2020-06-30 09:13:37 UTC | #1

    Hi there,

    I'm trying to get to understand the Data Actions feature, so I created a very simple one. The idea is that with the contactlist ID i fetch the name of that contact list.

    But somehow I keep getting the error below:

    { "message": "The request could not be understood by the server due to malformed syntax.", "code": "bad.request", "status": 400, "messageParams": {}, "contextId": "c327948b-2639-472c-bbdf-bcfd6da60519", "details": [ { "errorCode": "ACTION.PROCESSING" } ], "errors": [ { "message": "REST call for action execute failed. Message:requestUrlTemplate could not be resolved into a fully qualified URL. [c327948b-2639-472c-bbdf-bcfd6da60519]", "code": "BAD_REQUEST", "status": 400, "messageParams": {}, "details": [], "errors": [] } ] }

    Input Contract: { "title": "Contact Lists Request", "description": "Requests contact lists", "type": "object", "$schema": "http://json-schema.org/draft-04/schema#", "required": [ "id" ], "properties": { "id": { "description": "The Contaclist ID", "type": "string" } }, "additionalProperties": true }

    Output Contract { "title": "Contact Lists Response", "description": "Returns contact lists", "type": "object", "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "name": { "description": "The name of the contactlist", "type": "string" } }, "additionalProperties": true }

    Configuration Request { "requestUrlTemplate": "/api/v2/outbound/contactlists/${input.id}", "requestType": "GET", "headers": { "Content-Type": "application/json" }, "requestTemplate": "{\"id\": \"${input.id}\"}" }

    Configuration Responset { "translationMap": {}, "translationMapDefaults": {}, "successTemplate": "${rawResult}" }

    Thanks in advance, BR, Rob


    Jerome.Saint-Marc | 2020-06-30 09:44:09 UTC | #2

    Hello,

    I think you are not using the appropriate integration. You need to leverage the PureCloud/Genesys Cloud Data Action (integration) if you want to perform Platform API requests. See here for more info (note: the integration has been renamed Genesys Cloud Data Action).

    Based on the error you get, I think you have used the Web Services Data Action integration (requests made to 3rd party Web Services via full url).

    As a note, once you create this Data Action, using a PureCloud/Genesys Cloud Data Action integration, you don't need to modify the requestTemplate in the Configuration Request. I mean that you are performing an HTTP GET - so what is sent in the body does not matter. I used something like this:

    { "requestUrlTemplate": "/api/v2/outbound/contactlists/${input.id}", "requestType": "GET", "headers": { "Content-Type": "application/json" }, "requestTemplate": "${input.rawRequest}" }

    Regards,


    robm | 2020-06-30 10:31:32 UTC | #3

    Hi Jerome,

    Thanks! what a stupid mistake to make. It works now :slight_smile:

    BR, Rob


    system | 2020-07-31 10:31:34 UTC | #4

    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: 8148