I am having trouble determining the proper way to use add_to_definition:
A sample js dict seems to be here:
This may end up me not being able to determine the appropriate workflow. When I used ArcGIS Pro to publish my feature service the first time, the feature layers were published under one service definition (Map):
I am able to update layers using layer.edit_features, and remove them using featureLayerCollection.manager.delete_from_definition(json_delete_dict).
What I am trying to do is write a json_dict directly to the 'Map' Service Definition. I don't want to publish something separately via item.publish (unless I'm supposed to?):
I want to directly 'append', for lack of a better word, the layer to the service definition in the same way the other layers and data were published the first time:
Is it possible to directly add a layer to a service definition without publishing the item first? Am I off base? If I'm not even close, can someone walk me through the steps to add a layer to a service definition? Is there sample code anywhere (specifically a python add_to_definition json dict)?
Appreciate any and all insight.