<?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>maxluong Tracker</title>
    <link>https://communities.vmware.com/wbsdv95928/tracker</link>
    <description>maxluong Tracker</description>
    <pubDate>Fri, 17 Nov 2023 19:55:01 GMT</pubDate>
    <dc:date>2023-11-17T19:55:01Z</dc:date>
    <item>
      <title>VMware API 400 error help</title>
      <link>https://communities.vmware.com/t5/VMware-vCloud-API-Discussions/VMware-API-400-error-help/m-p/2901157#M2113</link>
      <description>&lt;P&gt;We are using Groovy and httpRequest plugin to make these two requests. One of them does not work as expected.&lt;/P&gt;&lt;P&gt;1. This works fine:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;def resReports = httpRequest url: "https://skyline.vmware.com/public/api/data",
ignoreSslErrors: true,
httpMode: 'POST',
contentType: 'APPLICATION_JSON',
acceptType: 'APPLICATION_JSON',
customHeaders: [[name: 'Authorization', value: "${workingToken}"]],
requestBody: "{\"query\":\"{ activeFindings( filter: {categoryName: SECURITY, severity: CRITICAL} limit: 20 ) { findings { findingId severity products findingDescription findingImpact recommendations totalAffectedObjectsCount } totalRecords timeTaken}}\"}"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;2. This for some reason, does not work. The only thing changed was the requestBody, but I cannot find where the error lies since it follows &lt;A href="https://docs.vmware.com/en/VMware-Skyline/1.0/skyline-api-guide/GUID-C442EB1C-F457-40BC-B8FD-E29E39AD9763.html" target="_blank" rel="noopener"&gt;this documented format&lt;/A&gt; very closely.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;def resReports = httpRequest url: "https://skyline.vmware.com/public/api/data",
ignoreSslErrors: true,
httpMode: 'POST',
contentType: 'APPLICATION_JSON',
acceptType: 'APPLICATION_JSON',
customHeaders: [[name: 'Authorization', value: "${workingToken}"]],
requestBody: "{\"query\":\"{ activeFindings( filter: {findingId: \"vSphere-CVE-2020-3992-VMSA#202023\"} limit: 200 ) { findings { findingId products affectedObjects(start: 0, limit: 200) {sourceName objectName objectType version buildNumber solutionTags { type version } firstObserved} } totalRecords timeTaken}}\"}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 18:37:55 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCloud-API-Discussions/VMware-API-400-error-help/m-p/2901157#M2113</guid>
      <dc:creator>maxluong</dc:creator>
      <dc:date>2022-03-29T18:37:55Z</dc:date>
    </item>
  </channel>
</rss>

