<?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: How to validate a value from the response in a synthetic test for api test? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257489#M33979</link>
    <description>&lt;P&gt;Yes it's HTTP Monitor,&lt;/P&gt;&lt;P&gt;the Set rule for response validation works but i have more than 100 values to valide.&lt;/P&gt;</description>
    <pubDate>Sun, 29 Sep 2024 17:59:38 GMT</pubDate>
    <dc:creator>pseg1984</dc:creator>
    <dc:date>2024-09-29T17:59:38Z</dc:date>
    <item>
      <title>How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257432#M33962</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have a basic synthetic test for a call api which returns a response.&lt;/P&gt;&lt;P&gt;The response is like:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;"abc": {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "efg": [&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ijk": "hello",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "klm": "bye",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;/P&gt;&lt;P&gt;How to validate "ijk" is equal to "hello"&lt;/P&gt;&lt;P&gt;i tried this:&lt;/P&gt;&lt;P&gt;var responseBody = response.getResponseBody();&lt;/P&gt;&lt;P&gt;var jsonData = JSON.parse(responseBody);&lt;/P&gt;&lt;P&gt;if (jsonData.abc.efg[0] ===&amp;nbsp;"hello") {&lt;/P&gt;&lt;P&gt;&amp;nbsp; return true;&lt;/P&gt;&lt;P&gt;}else{&lt;/P&gt;&lt;P&gt;&amp;nbsp; return false;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;The test return script_execution_failed&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 01:08:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257432#M33962</guid>
      <dc:creator>pseg1984</dc:creator>
      <dc:date>2024-09-28T01:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257436#M33963</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/80625"&gt;@pseg1984&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can create response validation rule to either pass or fail based on the required fetched response&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="response validation.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22991iD73E40649898357E/image-size/large?v=v2&amp;amp;px=999" role="button" title="response validation.png" alt="response validation.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 11:16:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257436#M33963</guid>
      <dc:creator>Peter_Youssef</dc:creator>
      <dc:date>2024-09-28T11:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257440#M33964</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/80625"&gt;@pseg1984&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using rest Api, Go to environment API v2 &amp;gt; Synthetic monitors &amp;gt; PUT.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peter_Youssef_0-1727522425435.png" style="width: 661px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22992iE8B2787578C24E18/image-dimensions/661x38?v=v2" width="661" height="38" role="button" title="Peter_Youssef_0-1727522425435.png" alt="Peter_Youssef_0-1727522425435.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;create the token with the required scope "ExternalSyntheticIntegration" and use it to unlock the key and execute the command then you can specify response validation rule in the Json file.&lt;/LI&gt;&lt;LI&gt;you should receive the below message&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="undefined"&gt;&lt;img /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you're using rest API, you can utilize the Curl command and execute it without having access to Dynatrace.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;BR,&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 11:28:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257440#M33964</guid>
      <dc:creator>Peter_Youssef</dc:creator>
      <dc:date>2024-09-28T11:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257441#M33965</link>
      <description>&lt;P&gt;With Set rule for response validation can i add more than 100 values to validate? do we have to separate by comma?&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 11:57:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257441#M33965</guid>
      <dc:creator>pseg1984</dc:creator>
      <dc:date>2024-09-28T11:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257442#M33966</link>
      <description>&lt;P&gt;I don't understand.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 11:58:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257442#M33966</guid>
      <dc:creator>pseg1984</dc:creator>
      <dc:date>2024-09-28T11:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257444#M33968</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/80625"&gt;@pseg1984&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Very simple SRE and DevOps team are interested in running scripts and Rest APIs instead of exposing User Interfaces for multiple solutions, That's why I've described the second approach as alternative solution, both working as well.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Peter.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 14:47:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257444#M33968</guid>
      <dc:creator>Peter_Youssef</dc:creator>
      <dc:date>2024-09-28T14:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257459#M33974</link>
      <description>&lt;P&gt;Ok so let me check for curl command, it looks interesting for me.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 16:18:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257459#M33974</guid>
      <dc:creator>pseg1984</dc:creator>
      <dc:date>2024-09-28T16:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257468#M33977</link>
      <description>&lt;P&gt;Can someone reply to this question?&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 18:30:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257468#M33977</guid>
      <dc:creator>pseg1984</dc:creator>
      <dc:date>2024-09-28T18:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257478#M33978</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it http monitor?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Yes, please try the bellow option:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Malaik_0-1727597865610.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/23011i0E8DEBD5C980A1CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Malaik_0-1727597865610.png" alt="Malaik_0-1727597865610.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 08:17:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257478#M33978</guid>
      <dc:creator>Malaik</dc:creator>
      <dc:date>2024-09-29T08:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257489#M33979</link>
      <description>&lt;P&gt;Yes it's HTTP Monitor,&lt;/P&gt;&lt;P&gt;the Set rule for response validation works but i have more than 100 values to valide.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 17:59:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257489#M33979</guid>
      <dc:creator>pseg1984</dc:creator>
      <dc:date>2024-09-29T17:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate a value from the response in a synthetic test for api test?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257514#M33985</link>
      <description>&lt;P&gt;If you content can be retrieved by a RegEx so YES.&lt;/P&gt;&lt;P&gt;Just enable the option and put the right RegEx.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 06:29:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-validate-a-value-from-the-response-in-a-synthetic-test/m-p/257514#M33985</guid>
      <dc:creator>Malaik</dc:creator>
      <dc:date>2024-09-30T06:29:32Z</dc:date>
    </item>
  </channel>
</rss>

