Do you have a few references you have consulted so that people don't have to provide the obvious links to the help topics and the GeoNet Space on ArcGIS Server? I suspect that you need more indepth information than is provided in those links.
perhaps the documentation would help with examples
Tutorial: Basic web map printing and exporting using arcpy.mapping—Documentation | ArcGIS for Server
This link will help explain what Jake is saying:
Retrieving data ...