I've a bit of a struggle understanding the formatting in the API explorer between GET and POST commands and the translation into Data Actions that work with the API's
I'm trying to add a new record to a data table using the POST API for Data Tables
POST /api/v2/flows/datatables/{datatableId}/rows
Create a new row entry for the datatable. Will add the passed in row entry to the datatable with the given datatableId after verifying it against the schema. The DataTableRow should be a json-ized' stream of key -> value pairs { "Field1": "XYZZY", "Field2": false, "KEY": "27272" }
When I use the Get command I get a specific layout of that table like this:
GET /api/v2/flows/datatables/{datatableId}/rows/{rowId}
datatableId string, required: a9953fc3-b6c5-4fde-a819-92ba7b916b6c - id of datatable
rowId string, required: ATTEMPT - The key for the row
Returns:
{
"PHONE NUMBER": "tel:+447747457851",
"LOGGED": "2023-03-23T15:46:08.639Z",
"key": "ATTEMPT"
}
When I clear that entry from the data table so it's not having any entries and try to recreate it using the POST command I get an 400 Error:
POST /api/v2/flows/datatables/{datatableId}/rows
datatableId string, required: a9953fc3-b6c5-4fde-a819-92ba7b916b6c - id of datatable
Request Body
{
"ATTEMPT": {
"PHONE NUMBER": "tel:+447747457851",
"LOGGED": "2023-03-23T15:46:08.639Z",
"key": "ATTEMPT"
}
}
Where do I go wrong here?
The Table layout is extremely simple:
Name: OBD LIST RESET ALERT
Division: Telecoms
Notes (optional):
Reference Key Label: ATTEMPT
Custom Fields:
Phone Number:
LOGGED:
I would be grateful if one can explain where I am going wrong. I'm new to this and the API course did not give me enough insight to understand where I am making a mistake.
#Unsure/Other------------------------------
Ruud Reinold
BNP Paribas Personal Finance UK
------------------------------