<?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: Package cURL config into an app in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Package-cURL-config-into-an-app/m-p/249339#M983</link>
    <description>&lt;P&gt;I have done something similar, for the DocumentService.&lt;/P&gt;&lt;P data-unlink="true"&gt;Expose a Function in the app that would work as middleware to the environment API&amp;nbsp;&lt;A href="https://developer.dynatrace.com/reference/sdks/client-classic-environment-v2/#postsettingsobjects" target="_blank"&gt;settingsObject&lt;/A&gt;&amp;nbsp; that would take payload and pass that to the API2 via the SDK. You need only to map the payload with the body of the request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://developer.dynatrace.com/develop/functions/pass-input/" target="_blank" rel="noopener"&gt;AFIK a Function is the only way to pass input &lt;/A&gt;&amp;nbsp;and also have more freedom with packages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you dont require input from the user, just make the function to do the call with the information hardcoded.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.postSettingsObjects({
    body: [
      {
        schemaId:
          "builtin:container.built-in-monitoring-rule",
        scope: "HOST-D3A3C5A146830A79",
        value: {},
      },
    ],
  });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2024 01:15:07 GMT</pubDate>
    <dc:creator>Dant3</dc:creator>
    <dc:date>2024-06-28T01:15:07Z</dc:date>
    <item>
      <title>Package cURL config into an app</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Package-cURL-config-into-an-app/m-p/249337#M982</link>
      <description>&lt;LI-CODE lang="markup"&gt;# Capture OpenTelemetry Span Attributes

curl -X 'POST' \
  "https://{environmentid}.live.dynatrace.com/api/v2/settings/objects?validateOnly=false" \
  -H 'accept: application/json; charset=utf-8' \
  -H "Authorization: Api-Token $DT_WRITE_SETTINGS_TOKEN" \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '[ { "schemaId": "builtin:attribute-allow-list", "schemaVersion": "0.0.10", "scope": "environment", "value": { "enabled": true, "key": "gen_ai.request.model" } }, { "schemaId": "builtin:attribute-allow-list", "schemaVersion": "0.0.10", "scope": "environment", "value": { "enabled": true, "key": "gen_ai.system" } }]'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this cURL command that I ultimately want to "wrap" into an app and list on the hub. In this way, my users can configure all span attributes in a one-click way.&lt;/P&gt;&lt;P&gt;How do I achieve this? Rework this as Terraform / Monaco and package that way? Python?&lt;/P&gt;&lt;P&gt;If you have any docs, that'd be much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 22:15:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Package-cURL-config-into-an-app/m-p/249337#M982</guid>
      <dc:creator>adam_gardner</dc:creator>
      <dc:date>2024-06-27T22:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Package cURL config into an app</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Package-cURL-config-into-an-app/m-p/249339#M983</link>
      <description>&lt;P&gt;I have done something similar, for the DocumentService.&lt;/P&gt;&lt;P data-unlink="true"&gt;Expose a Function in the app that would work as middleware to the environment API&amp;nbsp;&lt;A href="https://developer.dynatrace.com/reference/sdks/client-classic-environment-v2/#postsettingsobjects" target="_blank"&gt;settingsObject&lt;/A&gt;&amp;nbsp; that would take payload and pass that to the API2 via the SDK. You need only to map the payload with the body of the request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://developer.dynatrace.com/develop/functions/pass-input/" target="_blank" rel="noopener"&gt;AFIK a Function is the only way to pass input &lt;/A&gt;&amp;nbsp;and also have more freedom with packages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you dont require input from the user, just make the function to do the call with the information hardcoded.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.postSettingsObjects({
    body: [
      {
        schemaId:
          "builtin:container.built-in-monitoring-rule",
        scope: "HOST-D3A3C5A146830A79",
        value: {},
      },
    ],
  });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 01:15:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Package-cURL-config-into-an-app/m-p/249339#M983</guid>
      <dc:creator>Dant3</dc:creator>
      <dc:date>2024-06-28T01:15:07Z</dc:date>
    </item>
  </channel>
</rss>

