<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create a Server object from a token in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-a-server-object-from-a-token/m-p/1250003#M8290</link>
    <description>&lt;P&gt;Hi I'm trying to make a cli to automate some routine tasks in server (querying logs, stopping services etc). I love using the API for Python since it's already done a lot of the hard work for me but I'd like to not have to reauthenticate every run. My idea right now is to create the Server object w username/password and then store the token as an environmental variable so I could use it with multiple requests. However, I can't find any documentation on creating a server object from a token. Is there any recommendation here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm retrieving the token using the solution found here: &lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/get-the-token-using-arcgis-python-api/td-p/876344" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/get-the-token-using-arcgis-python-api/td-p/876344&lt;/A&gt;&lt;/P&gt;&lt;P&gt;server._con.token&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2023 17:52:08 GMT</pubDate>
    <dc:creator>bburnett44</dc:creator>
    <dc:date>2023-01-20T17:52:08Z</dc:date>
    <item>
      <title>Create a Server object from a token</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-a-server-object-from-a-token/m-p/1250003#M8290</link>
      <description>&lt;P&gt;Hi I'm trying to make a cli to automate some routine tasks in server (querying logs, stopping services etc). I love using the API for Python since it's already done a lot of the hard work for me but I'd like to not have to reauthenticate every run. My idea right now is to create the Server object w username/password and then store the token as an environmental variable so I could use it with multiple requests. However, I can't find any documentation on creating a server object from a token. Is there any recommendation here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm retrieving the token using the solution found here: &lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/get-the-token-using-arcgis-python-api/td-p/876344" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/get-the-token-using-arcgis-python-api/td-p/876344&lt;/A&gt;&lt;/P&gt;&lt;P&gt;server._con.token&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 17:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/create-a-server-object-from-a-token/m-p/1250003#M8290</guid>
      <dc:creator>bburnett44</dc:creator>
      <dc:date>2023-01-20T17:52:08Z</dc:date>
    </item>
  </channel>
</rss>

