<?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 JSON formatting from PowerShell REST call for transaction snapshots in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/JSON-formatting-from-PowerShell-REST-call-for-transaction/m-p/733080#M8295</link>
    <description>&lt;P&gt;I am making a REST call in PowerShell for transaction snapshots using "&amp;amp;need-props=true&amp;amp;output=json" in the url.&amp;nbsp; I get the response in the response object below: &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;# REST CALL&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;$response = Invoke-RestMethod -uri $url -Header $headers -Method Get&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;&lt;BR /&gt;#VIEW RESPONSE IN JSON&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;$response | ConvertTo-Json&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;I have a question about the formatting of the properties fields (e.g. transactionProperties, httpParameters, etc) in the response:&lt;/P&gt;

&lt;P&gt;&lt;FONT face="terminal,monaco"&gt; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"firstInChain": true,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"transactionProperties": [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"@{name=ProcessID; id=0; value=4312}",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"@{name=Content length; id=0; value=724}"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"errorIDs": [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;11457380&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;],&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;Note in the array for transactionProperties, that the object strings are not in a format that I am familiar with (e.g. "@{name=ProcessID; id=0; value=4312}").&amp;nbsp; Is this proprietary to AppD?&amp;nbsp; Is it a configuration setting or something that formats it this way?&lt;BR /&gt;&lt;BR /&gt;I am wanting to access the key/value pairs, but not quite sure how to do that.&amp;nbsp; I've scoured the AppD site for examples of json output to see if this is normal, but haven't found anything related to the output I am getting.&lt;/P&gt;

&lt;P&gt;Any insights would be most helpful...&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 23:09:54 GMT</pubDate>
    <dc:creator>CommunityUser</dc:creator>
    <dc:date>2019-05-29T23:09:54Z</dc:date>
    <item>
      <title>JSON formatting from PowerShell REST call for transaction snapshots</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/JSON-formatting-from-PowerShell-REST-call-for-transaction/m-p/733080#M8295</link>
      <description>&lt;P&gt;I am making a REST call in PowerShell for transaction snapshots using "&amp;amp;need-props=true&amp;amp;output=json" in the url.&amp;nbsp; I get the response in the response object below: &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;# REST CALL&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;$response = Invoke-RestMethod -uri $url -Header $headers -Method Get&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;&lt;BR /&gt;#VIEW RESPONSE IN JSON&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;$response | ConvertTo-Json&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;I have a question about the formatting of the properties fields (e.g. transactionProperties, httpParameters, etc) in the response:&lt;/P&gt;

&lt;P&gt;&lt;FONT face="terminal,monaco"&gt; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"firstInChain": true,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"transactionProperties": [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"@{name=ProcessID; id=0; value=4312}",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"@{name=Content length; id=0; value=724}"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;"errorIDs": [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;11457380&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;],&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;Note in the array for transactionProperties, that the object strings are not in a format that I am familiar with (e.g. "@{name=ProcessID; id=0; value=4312}").&amp;nbsp; Is this proprietary to AppD?&amp;nbsp; Is it a configuration setting or something that formats it this way?&lt;BR /&gt;&lt;BR /&gt;I am wanting to access the key/value pairs, but not quite sure how to do that.&amp;nbsp; I've scoured the AppD site for examples of json output to see if this is normal, but haven't found anything related to the output I am getting.&lt;/P&gt;

&lt;P&gt;Any insights would be most helpful...&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 23:09:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/JSON-formatting-from-PowerShell-REST-call-for-transaction/m-p/733080#M8295</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2019-05-29T23:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: JSON formatting from PowerShell REST call for transaction snapshots</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/JSON-formatting-from-PowerShell-REST-call-for-transaction/m-p/733081#M8296</link>
      <description>&lt;P&gt;As a follow up, I found that when requesting a single snapshot, the properties fields&amp;nbsp;are properly formatted as expected.&amp;nbsp; It is only when requesting more than one, the formatting is different.&amp;nbsp; The same goes for metrics as well as snapshots...&lt;/P&gt;

&lt;P&gt;Here is a simple example from the EUM metrics... when I query for a single metric on a singe page, it comes back in a usable format:&lt;/P&gt;

&lt;PRE&gt;{
    "metricId":  121189479,
    "metricName":  "BTM|Application Diagnostic Data|Base Page:12463461|End User Response Time (ms)",
    "metricPath":  "End User Experience|Base Pages|web.b.ebscohost.com/ehost/search/selectdb|End User Response Time (ms)",
    "frequency":  "ONE_MIN",
    "metricValues":  [
                         {
                             "startTimeInMillis":  1562605200000,
                             "occurrences":  1,
                             "current":  675,
                             "min":  675,
                             "max":  675,
                             "useRange":  true,
                             "count":  1,
                             "sum":  675,
                             "value":  675,
                             "standardDeviation":  0
                         }
                     ]
}
&lt;/PRE&gt;
&lt;P&gt;However, if I query for multiple metrics from that same base page, the same metric as above comes back in non-standard format...&lt;/P&gt;
&lt;PRE&gt;{
    "metricId":  121143678,
    "metricName":  "METRIC DATA NOT FOUND",
    "metricPath":  "End User Experience|Base Pages|www.ebsco.com/academic-libraries/library-technology|End User Response Time (ms)",
    "frequency":  "ONE_MIN",
    "metricValues":  [

                     ]
},
{
    "metricId":  121189479,
    "metricName":  "BTM|Application Diagnostic Data|Base Page:12463461|End User Response Time (ms)",
    "metricPath":  "End User Experience|Base Pages|web.b.ebscohost.com/ehost/search/selectdb|End User Response Time (ms)",
    "frequency":  "ONE_MIN",
    "metricValues":  [
                         "@{startTimeInMillis=1562605200000; occurrences=1; current=675; min=675; max=675; useRange=True; count=1; sum=675; value=675; standardDeviation=0}"
                     ]
},
{
    "metricId":  121145538,
    "metricName":  "METRIC DATA NOT FOUND",
    "metricPath":  "End User Experience|Base Pages|epic/departments/eissales/pages|End User Response Time (ms)",
&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jul 2019 20:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/JSON-formatting-from-PowerShell-REST-call-for-transaction/m-p/733081#M8296</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2019-07-10T20:08:21Z</dc:date>
    </item>
  </channel>
</rss>

