rest GET failure

Hi there, I'm trying to get an API working. After following the tutorial with the Rijksmuseum API I learned a lot. I Already got my first API working. I now encounter a obstacle. When I call the API of" I get the following response. { "totalItemCount":564, "pageCount":6,"size":100, "_links":{"self":{"href":"\/api\/kvk?query=KPN"}, "next":{"href":"\/api\/kvk?query=KPN&page=2"}, "first":{"href":"\/api\/kvk?query=KPN&page=1"}, "last":{"href":"\/api\/kvk?query=KPN&page=6"}}, "_embedded":{"rechtspersoon":[ {"dossiernummer":"27124701", "handelsnaam":"KPN", "subdossiernummer":"0854", "_links":{"self":{"href":"\/api\/kvk\/27124701\/0854"}}}]}} Now I would like to get the "Dossiernummer", but it seems captured in the embedded part. My first guess was to make an association on "rechtspersoon". because this one had the "[" icon behind it. But it doesn't work. My next try was to use the association "embedded" but did didn't work either. My third try was to make an association on "_embedded" en then on "rechtspersoon". But al these tries give an error in my Java. Can someone point me in the right direction? If some needs an API please let me know then i can generate one for you on the site. ===Edit after comment=== Chris de Gelder thanks for the comment. Unfortunately it didn't work. The data doesn't show in the page. I set up the model as followed; The Microflow I also shared. the Api code I generated is a temporary one so feel free to test it. The show message I added to see if the query was good.
2 answers

As Chris said in the comment for an array: [] you'll need a many relationship. However what you have setup in the last step to your 'rechtspersoon' is not the correct many relationship.

The rest module only looks in the same direction as the arrows (it only looks at relationships it owns). Your relationship is owned by 'rechtspersoon' and not be embedded.
If you'd change the relationship to a reference set owend by 'embeddeds' this should work.


Thanks for the feedback. After also watching the Webinar Expert Webinar: REST Integration. The relationships finally became clear to me.

In the Rest you have { and [.

  • { is an attribute and is reflected in the modeler as an association * to 1
  • [ is an array and is reflected in the modeler as an association * to *

The tutorial was wasn't clear in this. Thank you for the help.