Legacy Dev Forum Posts

 View Only

Sign Up

Using the /api/v2/flows/datatables API in the Developer Tool getting 400 Error

  • 1.  Using the /api/v2/flows/datatables API in the Developer Tool getting 400 Error

    Posted 06-05-2025 18:24

    jtran7 | 2023-01-05 19:29:59 UTC | #1

    I been trying to test the API to create Data table using this link as a reference on how the setup their schema. However it keeps giving a 400 error saying it could not recognized the input.

    I tried a few format but it hasn't worked even thou I;m sure the body is correct: { "name": "Data Table", "description": "new Data Table", "division": { "id": "c3dcae56-7c7c-488a-825e-64ebda01f00d", "name": "Home" }, "schema": { "id": "b3dcae56-7c7c-499a-825e-64ebda01f00d", "$schema": "http://json-schema.org/draft-04/schema#", "title": "Schema", "description": "Test Table", "type": "object", "required": ["key"], "properties": {

    "key": { "title": "item_id", "type": "string", "$id": "/properties/key"

    }

    }, "additionalProperties": "False" } }

    Here a screenshot below


    tim.smith | 2023-01-05 21:40:08 UTC | #2

    Please use the new developer tools; the tools shown in your screenshot are no longer supported. You can find the new API Explorer, specifically that resource, here: https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-flows-datatables. The new integrated tools organize the schema documentation more clearly and offer a guided wizard to help you create the request. More information about its features can be found in the Using API Explorer guide.

    That said, the issue you're facing won't be solved by the new API Explorer as the documentation is deficient for the additionalProperties property of JsonSchemaDocument. Unfortunately, that property is only documented as "object", so you have no way of knowing what you can put in it. From what I can see on the backend, it appears to expect a boolean (i.e. "additionalProperties": false in JSON) or an object of type JsonSchemaDocument. So for the request in your screenshot, use a JSON value of false instead of a string with the world "False" in it.


    jtran7 | 2023-01-06 03:15:24 UTC | #3

    Hi Tim,

    I saw an example and they were using the false value. What I'm trying now is create a data action where it will take the input contract used and place them into the request template body. For some reason the data action shows me this error:

    "* REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"the event input has no valid 'schema' element.","code":"flows.datatables.syntax.error","status":400,"messageParams":{},"contextId":"76cfb053-a6db-4c76-89a2-17f030dbc3e6","details":[],"errors":[]} [9655f908-a119-410c-a2b2-88f3f5ec7083]"

    I guess it has something to do with my request template input. Is there a way I can past the input for the contracts to the request template even if the request URL template doesn't have any inputs to it? I assume this is how to set that up. {

    "name": "${input.name}", "description": "${input.description}", "additionalProperties": "${input.AdditionalProperties}", "properties": { "key": { "title": "${input.title}", "type": "${input.datatype}" } }, "type": "${input.type}", "required": ["${input.required}"]

    }


    Jason_Mathison | 2023-01-06 16:53:37 UTC | #4

    Hi Jason,

    The error message you are seeing is what is being returned by the data tables API, which is complaining that a schema is not being included in the request. You should be able to see exactly what is being sent to the data action API in the "Resolve Body Template" step of the test mode output.

    --Jason


    system | 2023-02-06 16:54:19 UTC | #5

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