I try to create a map with one layer inside. I use Web AppBuilder and API JS on a Portal server.
I use REST API with 'AddItem' verb to create a Map. That work fine, but when I want to add a layer, with the same process, this layer is add to the root of my content.
I don't know if I use the right procedure.
Someone can help me ?