<?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 Re: Unattended installation/configuration/Token Mgmt in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Unattended-installation-configuration-Token-Mgmt/m-p/269436#M3592</link>
    <description>&lt;P&gt;Also the following does not work:&lt;/P&gt;&lt;P&gt;curl -X 'POST' \&lt;BR /&gt;'&lt;A href="https://10.0.22.24/api/cluster/v2/environments/66bf6127-7a37-40d9-b687-183cba58c020/tokenManagementToken" target="_blank"&gt;https://10.0.22.24/api/cluster/v2/environments/66bf6127-7a37-40d9-b687-183cba58c020/tokenManagementToken&lt;/A&gt;' \&lt;BR /&gt;-H 'accept: application/json; charset=utf-8' \&lt;BR /&gt;-H 'Authorization: Api-Token dt0c01.NIUWRR7LOH7K4JZOX27FYYZZ.GMXDP65SGHVXOPEMDWZS2QGLDSPK6JBIPEBFGII75J7ZGMMYUG35KKBT3CN3RWMR' \&lt;BR /&gt;-H 'Content-Type: application/json; charset=utf-8' \&lt;BR /&gt;-d '{&lt;BR /&gt;"expiresIn": {&lt;BR /&gt;"unit": "SECONDS",&lt;BR /&gt;"value": 3600&lt;BR /&gt;},&lt;BR /&gt;"name": "Token Management"&lt;BR /&gt;}'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This comes with a 403:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"error": {&lt;BR /&gt;"code": 403,&lt;BR /&gt;"message": "Token is missing required scope. Use one of: EnvironmentTokenManagement (\"Token Management\" Token creation for existing environments)"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Thu, 06 Feb 2025 14:35:52 GMT</pubDate>
    <dc:creator>xstreur</dc:creator>
    <dc:date>2025-02-06T14:35:52Z</dc:date>
    <item>
      <title>Unattended installation/configuration/Token Mgmt</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Unattended-installation-configuration-Token-Mgmt/m-p/269421#M3591</link>
      <description>&lt;UL&gt;
&lt;LI&gt;We need to do unattended installation/configuration of several Dynatrace instances (Cluster, Environment, oneAgents and activeGate).&amp;nbsp; After the installation&lt;BR /&gt;of the Cluster Server, we get a API Token, which seems to be able to do things on a cluster level. We need a token here that also makes it possible to&amp;nbsp;continue the install/configure on a Environment level. We seem to get stuck here.&lt;BR /&gt;&lt;BR /&gt;curl -X 'POST' \&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; '&lt;A href="https://10.0.22.24/api/cluster/v2/tokens" target="_blank" rel="noopener"&gt;https://10.0.22.24/api/cluster/v2/tokens&lt;/A&gt;' \&lt;/P&gt;
&lt;P&gt;&amp;nbsp; -H 'accept: application/json; charset=utf-8' \&lt;/P&gt;
&lt;P&gt;&amp;nbsp; -H 'Authorization: Api-Token &amp;lt;afterinstallation-Token&amp;gt; \&lt;/P&gt;
&lt;P&gt;&amp;nbsp; -H 'Content-Type: application/json; charset=utf-8' \&lt;/P&gt;
&lt;P&gt;&amp;nbsp; -d '{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; "expiresIn": {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "unit": "DAYS",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "value": 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; },&lt;/P&gt;
&lt;P&gt;&amp;nbsp; "name": "EnvTknMgmt",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;"scopes": [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "EnviromentTokenManagement"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; "error": {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "code": 400,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "message": "Could not map JSON at 'scopes[0]' near line 8 column 5"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 12:27:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Unattended-installation-configuration-Token-Mgmt/m-p/269421#M3591</guid>
      <dc:creator>xstreur</dc:creator>
      <dc:date>2025-02-10T12:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unattended installation/configuration/Token Mgmt</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Unattended-installation-configuration-Token-Mgmt/m-p/269436#M3592</link>
      <description>&lt;P&gt;Also the following does not work:&lt;/P&gt;&lt;P&gt;curl -X 'POST' \&lt;BR /&gt;'&lt;A href="https://10.0.22.24/api/cluster/v2/environments/66bf6127-7a37-40d9-b687-183cba58c020/tokenManagementToken" target="_blank"&gt;https://10.0.22.24/api/cluster/v2/environments/66bf6127-7a37-40d9-b687-183cba58c020/tokenManagementToken&lt;/A&gt;' \&lt;BR /&gt;-H 'accept: application/json; charset=utf-8' \&lt;BR /&gt;-H 'Authorization: Api-Token dt0c01.NIUWRR7LOH7K4JZOX27FYYZZ.GMXDP65SGHVXOPEMDWZS2QGLDSPK6JBIPEBFGII75J7ZGMMYUG35KKBT3CN3RWMR' \&lt;BR /&gt;-H 'Content-Type: application/json; charset=utf-8' \&lt;BR /&gt;-d '{&lt;BR /&gt;"expiresIn": {&lt;BR /&gt;"unit": "SECONDS",&lt;BR /&gt;"value": 3600&lt;BR /&gt;},&lt;BR /&gt;"name": "Token Management"&lt;BR /&gt;}'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This comes with a 403:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"error": {&lt;BR /&gt;"code": 403,&lt;BR /&gt;"message": "Token is missing required scope. Use one of: EnvironmentTokenManagement (\"Token Management\" Token creation for existing environments)"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 14:35:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Unattended-installation-configuration-Token-Mgmt/m-p/269436#M3592</guid>
      <dc:creator>xstreur</dc:creator>
      <dc:date>2025-02-06T14:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unattended installation/configuration/Token Mgmt</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Unattended-installation-configuration-Token-Mgmt/m-p/269473#M3596</link>
      <description>&lt;P&gt;You have typo (&lt;EM&gt;Envir&lt;STRONG&gt;oment&lt;/STRONG&gt;TokenManagement&lt;/EM&gt;), it should be&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;EnvironmentTokenManagement&lt;/EM&gt; for the scope.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For the follow up you are using a Cluster token without the right scope.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also even if it is just local cluster I would advise against posting tokens publicly.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs.dynatrace.com/managed/shortlink/api-cluster-tokens-create-new#request-body-objects" target="_blank"&gt;https://docs.dynatrace.com/managed/shortlink/api-cluster-tokens-create-new#request-body-objects&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 01:09:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Unattended-installation-configuration-Token-Mgmt/m-p/269473#M3596</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2025-02-07T01:09:59Z</dc:date>
    </item>
  </channel>
</rss>

