Thanks you all for reply,
I will try to expand the senario.
The layers should not be visible on map, the idea it's to develop an widget that will let the user to select layers by categories which layers he want to show.
The purpose it's to manage the appearance of the layers in the webapp (like i said) such as popup, symbolgy transparency and etc.
We understand that showing 300 layers at once in one webmap is useless.
but we need some sort of way to manage those layers.
If we want to use for example the 'Attribute table' widget and config which layers or columns will shown and which order - we must load webmap first with those layers.
(some of widgets supports manage after adding layers with 'Add data' widget)
We want to publish once and continue customize in portal.
All layers hosted in Arcgis Server with Portal for arcgis (Federate)
Any suggestion?