Hey all,
Run into an issue when consuming an API endpoint that I need to send an object that looks like this:
The values aren't important for this question but the format is. Currently the only way I've found in Outsystems is to create a structure that has 2 attributes in it, first it is just simply matching the top object and second an object that has a list in it as the value.
From here a "parent" structure is created that contains both of these structures inside it like so: The names of these need to be hidden but the lines indicate what the structures look like.
As far as I can see this is the only way to send a physical "array" inside a parent structure. If there is another way please I would love to see how.
If not this is a major issue with the API endpoint that is being consumed as it can't be changed to accommodate Outsystems.
Cheers,
Gareth
Hi,
Seems the right way to do it.
If it works your fine.
-- Daniel
I guess I should have added that it doesn't work. This is what is captured in the Full log in Service Center:The names of the individual objects are added in which I believe is what is causing the issue and as you say that looks correct, The API endpoint doesn't accept it as this. Hence the reason if it supports the format above.
Maybe this Forge component can help you transform the Json produced by OutSystems into the desired format.
https://www.outsystems.com/forge/component-overview/413/ardojson-o11
Without going into too much detail, my organisation would prefer to not have the reliance on a forge component if that could be helped.
A forge component doesn't meet key compliance standards we have in place.
I'm happy to try it as I can use it as evidence to say that Outsystems doesn't support what we want to out of the box.
Thanks mate.
I just tried it as a test and it does exactly the same thing but worse really.
It takes the name of the objects and makes them keys instead, so basically even with a forge component attempt Outsystems simply can't support this json format being used in this way.