How to insert a new row in datatable using api

Hi,
Please consider the below situation

Data table
columns
conversation_id - string
pnr - string
message_id - string

In above could you please give me the actual values of parameters to insert the values as a row in the datatable.

API used is: https://developer.genesys.cloud/routing/architect/#post-api-v2-flows-datatables--datatableId--rows

Thank you,
Subith O U

Hello,

Table columns have a keyname and a label.
The field/column that you chose as the main key will be in an attribute named "key".
You can check the name of columns in your datatable with GET /api/v2/flows/datatables/{datatableId} with expand=schema.

I assume that conversation_id is what you selected as the key and that pnr and message_id were defined with the same value for name and label.

The body for your request will then be:

{
"key: "your conversation id",
"pnr": ".....",
"message_id": "your message id"
}

You can directly type this, in the JSON area (right handside of your screenshot), in the API Explorer.
The definition of this API endpoint has an issue and doesn't reflect proper structure when using the Add Object Property ....

Regards,

Thank you for your response.
Its working i older version of API platform, But when comes to newer version, I Cannot provide json format.

Hello,

I assume that by "API platform", you are referring to the API Explorer available on the Developer Center site.

If that's the case - yes, sorry, I thought the API Explorer on Devloper Center was allowing free text input. But it is not the case.

This is a bug with the API resource's definition. Please report the invalid definition via a case with Genesys Customer Care. The API is incorrectly defining the property as a map<string,object> , which is not accurate, but API Explorer provides the wizard correctly per the incorrect definition.

Regards,

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