API - json body with nested nodes
Hi all,
I tried to create a web API extension in Dynamic 365 BC (Spring 2019 version) that accept a json body with nested nodes. To do this I created three API pages with this structure:
-
The "page 2" as part of "page 1"
-
The "page 3" as part of the "page 2"
During the test with Postman I had the follow results:
-
I don’t have problem with the GET method, in fact the all json is displayed correctly (with data and the nested nodes)
-
When I try to send a POST I don't have error but only the sourcetables of the "page 1" and "page 2" are written. It is like that the last node array is ignored. This is the problem that I have.
Is it possible to create API that accept a json body with more nested nodes (3,4 o more)? Someone have some idea about my issue?
Thanks!
PS: This is the body that my "mock" API should accept:
{
"no": "TEST001",
"description": "this is test 001",
"lines": [
{
"lineNo": 10000,
"lineDescription": "this is test 001 line",
"sublines": [
{
"sublineNo": 10000,
"subLineDescription": "this is test 001 subline"
}
]
}
]
}
for "page 2" & "page 3", probably you defined as part page on "page 1" and "page 2" respectively. on definition of that, the id or name of the part page must be same with the "entitySetName" property value.
see the screen shot:

try this and then it will work fine and then let me know
Thank you. We're aware of this and is actively working on enabling deeper level nesting. Same issue is reported on aka.ms/bcideas.