When developing a REST API POST Call......
Assume I want to pass a single Parameter in the URL...
https://mydomain.com/app/REST/mydomain/ReturnAllEmployees?AuthKey=MyAuthKey
To do this I have a BO with a single Plain Text Attribute called AuthKey.
When called, that BO.AuthKey is populated with MyAuthKey
Now Assume I don't want to pass a single Parameter in the URL, but instead I pass a json body with several values called
{
"Data1": "somedata",
"Data2": 1234.56,
"Data3": "someotherdata"
}
I have a receiving BO with Attributes... Data1, Data2, Data3
A call to https://mydomain.com/app/REST/mydomain/ReturnAllEmployees?
with that body populates the BO with the data as expected.
However, imagine now we want a combination of these two scenarios...
I want to pass a single Parameter in the URL and also a json body
ie...
URL = https://mydomain.com/app/REST/mydomain/ReturnAllEmployees?AuthKey=MyAuthKey
Body = {
"Data1": "somedata",
"Data2": 1234.56,
"Data3": "someotherdata"
}
I cannot imagine that we only need a single BO to receive this with the Attributes....
AuthKey
Data1
Data2
Data3
I would expect I would need a Parent BO to accept the Parameter and then a Child BO for the json Attributes
Hence the we would have
ParentBO...
Authkey
ChildBO
Data1
Data2
Data3
This means we would need a reference in the ParentBO to refer to the ChildBO
If this is correct...Is there some correct name to call the reference attribute...?
For example....
ParentBO...
Authkey
body (a peer reference to ChildBO)
ChildBO
Data1
Data2
Data3
Would appreciate any suggestions here please.