We have an ArcGIS map service that includes about 50 layers, and many of them have related tables. I need to build a schematic of this service that includes layer name, source feature class (or table), attributes that are included -- but I also need to find which table(s) are related to a given layer, which is where I am stuck.
I have access to the source MXD. So in theory, I can open each layer in ArcMap and look at it. But, with 50 layers, I'm looking for a Python method -- especially one that I can reuse if this MXD/service changes in upcoming months (layers or tables added/removed, e.g.) to re-create my list of referenced data.
I can use the arcpy.mapping module to list the layers/tables, but I do not know how to use it to ask about relationships to other layers/tables.