<?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: Splunk Add-on Builder REST API - Passing Global Account values to REST URL in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498028#M61278</link>
    <description>&lt;P&gt;So I happen to be working with the Zoom API and your link to the documentation helped me out, so I'll use their endpoint API as a reference. Per the documentation they suggest using the namespace, so the URL parameter should have the value &lt;STRONG&gt;${&lt;STRONG&gt;settings&lt;/STRONG&gt;.additional_parameters.param_name}&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I'm using JWT for authentication, and have created a Text property in Add-on Setup Paramaters with Global Account Settings checked. This parameter's Internal Name = jwt_token . Yes, adding "token" is redundant... I have also created another Data Input Parameter called Query URL, internal name = query_url&lt;/P&gt;

&lt;P&gt;So my REST URL looks like this: &lt;BR /&gt;
&lt;A href="https://api.zoom.us/v2/$%7Bquery_url%7D?access_token=$%7B__settings__.additional_parameters.jwt_token%7D&amp;amp;page_size=300" target="_blank"&gt;https://api.zoom.us/v2/${query_url}?access_token=${__settings__.additional_parameters.jwt_token}&amp;amp;page_size=300&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In Data Input Parameters I add which API endpoint I will be targeting, in this particular case =users and on the Add-on Setup Parameters tab there will be an "Additional Parameters", and that is where I add my JWT. If you're having problems with the built in Username &amp;amp; Password, I'd suggest building your own parameters for those values. Hope this helps!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:20:37 GMT</pubDate>
    <dc:creator>samejgink</dc:creator>
    <dc:date>2020-09-30T05:20:37Z</dc:date>
    <item>
      <title>Splunk Add-on Builder REST API - Passing Global Account values to REST URL</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498025#M61275</link>
      <description>&lt;P&gt;In the Splunk Add-on Builder, I configured a modular input using a REST API to pull data from FortiOS/FortiGate. I am trying to pass global account values (setup parameters), but the recommended variables from the following link do not work when I test the connection:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/AddonBuilder/3.0.1/UserGuide/ConfigureDataCollection#Pass_values_from_setup_parameters"&gt;https://docs.splunk.com/Documentation/AddonBuilder/3.0.1/UserGuide/ConfigureDataCollection#Pass_values_from_setup_parameters&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here is the error message:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ERROR] - [test] HTTPError reason=HTTP Error Unable to find the server at %7b%7bglobal_account.username%7d%7d when sending request to url=https://{{global_account.username}}/api/v2/cmdb/firewall/address?with_meta=true&amp;amp;vdom=*&amp;amp;access_token={{global_account.password}} method=GET
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm guessing the variable syntax is incorrect, or am I wrong to try and pass the global account values to the URL?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 20:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498025#M61275</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2020-03-19T20:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on Builder REST API - Passing Global Account values to REST URL</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498026#M61276</link>
      <description>&lt;P&gt;Looks like the URL is wrong. &lt;BR /&gt;
I would expect a URL of &lt;A href="https://MyFortigate.somewhere/api"&gt;https://MyFortigate.somewhere/api&lt;/A&gt;.... and not the global_account.username&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 10:54:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498026#M61276</guid>
      <dc:creator>laurie_gellatly</dc:creator>
      <dc:date>2020-03-28T10:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on Builder REST API - Passing Global Account values to REST URL</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498027#M61277</link>
      <description>&lt;P&gt;@laurie_gellatly - thanks for your input. I have since forgone using the global account values, since the variables I need are FortiGate URL and API Token, and don't complete align with username/password. &lt;/P&gt;

&lt;P&gt;However, I felt it was interesting that these variable names do not work when passing them to the REST URL (as specified in the documentation). I'm wondering if anyone has found the successful variable names for the global variables.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 16:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498027#M61277</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2020-03-30T16:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on Builder REST API - Passing Global Account values to REST URL</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498028#M61278</link>
      <description>&lt;P&gt;So I happen to be working with the Zoom API and your link to the documentation helped me out, so I'll use their endpoint API as a reference. Per the documentation they suggest using the namespace, so the URL parameter should have the value &lt;STRONG&gt;${&lt;STRONG&gt;settings&lt;/STRONG&gt;.additional_parameters.param_name}&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I'm using JWT for authentication, and have created a Text property in Add-on Setup Paramaters with Global Account Settings checked. This parameter's Internal Name = jwt_token . Yes, adding "token" is redundant... I have also created another Data Input Parameter called Query URL, internal name = query_url&lt;/P&gt;

&lt;P&gt;So my REST URL looks like this: &lt;BR /&gt;
&lt;A href="https://api.zoom.us/v2/$%7Bquery_url%7D?access_token=$%7B__settings__.additional_parameters.jwt_token%7D&amp;amp;page_size=300" target="_blank"&gt;https://api.zoom.us/v2/${query_url}?access_token=${__settings__.additional_parameters.jwt_token}&amp;amp;page_size=300&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In Data Input Parameters I add which API endpoint I will be targeting, in this particular case =users and on the Add-on Setup Parameters tab there will be an "Additional Parameters", and that is where I add my JWT. If you're having problems with the built in Username &amp;amp; Password, I'd suggest building your own parameters for those values. Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:20:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-REST-API-Passing-Global-Account-values-to/m-p/498028#M61278</guid>
      <dc:creator>samejgink</dc:creator>
      <dc:date>2020-09-30T05:20:37Z</dc:date>
    </item>
  </channel>
</rss>

