createRecords() POST fails with an Array (\n) Error


#1

Own DSP Instance 1.9.4-1

{“dateCaptured”: null,
“datePlanned”: null}

When trying to POST data through the DreamFactory API I get the following error:
{
“error”: [
{
“context”: null,
“message”: “array (\n)”,
“code”: 500
}
]
}

  1. Does the JSON Object need to have ALL the fields of the table for it to work?
  2. Why would this structure not work (i’ve tried with all the records and a subset)?

#2

I’ve tested locally with

POST /rest/db/table

    {
      "name": null,
      "type": null
    }

and

POST /rest/db/table

{
  "record": [
    {
      "name": null,
      "type": null
    }
  ]
}

Both worked without this error. Can you provide some more detail so I can reproduce this in my environment?


#3

My table is called tblTask and I post the following to it (using the createRecords() API call):
{“id”:null,“fk_companyID”:"{COMPANY_ID}",“datePlanned”:“2015-07-06T22:00:00.000Z”,“isWorkFlowCompleted”:false,“isTypeImport”:true,“isTypeGradeSplit”:false,“isTypeGradeProcessingCanning”:false,“isTypeGradeProcessingLive”:false,“isTypeGradeSiteTransfer”:false,“isTypeDestroyStock”:false,“isTypeSpawning”:false,“description”:“1232”}

If I enclose it with a {“record”: []} then its as if DF crashes and the entire app loads in a subframe, picture to follow.

The create works with other tables, just not this one?

*Note: I’m using Lookup Keys for the {COMPANY_ID} part.