The Layer Index corresponds to the index of the layer in the ArcGIS Server (AGS) map resource REST service that is defined in UI Admin > System Settings > Geodata Map Service.
If you paste the URL (i.e. http://[Windows User]/ArcGIS/rest/services/esridemo/MapServer) from the Geodata map service into a web browser you'll see something like the example below. Note that the number in parentheses represents the layer index.