<?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>Question Re: Calling REST POST but MissingApiVersionParameter error in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaa-p/12620440#M4733705</link>
    <description>&lt;P&gt;Hi Szilvia.&lt;/P&gt;&lt;P&gt;In my opinion, there is a problem in your using in 'sp' of parameters. Because of &lt;STRONG&gt;%2F&lt;/STRONG&gt; is mean '&lt;STRONG&gt;/'&lt;/STRONG&gt; char in HTML url structure. You can refer &lt;A href="https://www.w3schools.com/tags/ref_urlencode.ASP" target="_blank"&gt;HTML url encode&lt;/A&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Can you change code and try like this : '/triggers/manual/run' instead of '%2Ftriggers%2Fmanual%2Frun'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But probably, it won't work. I mean, you send '&lt;STRONG&gt;sp&lt;/STRONG&gt;' of parameters as '&lt;STRONG&gt;sp=/triggers/manual/run&lt;/STRONG&gt;' but system will understand as if '&lt;STRONG&gt;a path&lt;/STRONG&gt;' because it contains '&lt;STRONG&gt;/&lt;/STRONG&gt;' char. System wants to see in parameter &lt;STRONG&gt;a value&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;You know, when need define a path, we use '&lt;STRONG&gt;/&lt;/STRONG&gt;' special char.&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Oct 2022 18:02:23 GMT</pubDate>
    <dc:creator>kursatbeyoglu</dc:creator>
    <dc:date>2022-10-16T18:02:23Z</dc:date>
    <item>
      <title>Calling REST POST but MissingApiVersionParameter error</title>
      <link>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaq-p/12620439</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I'm trying to trigger an Azure Logic App from ByDesign but for some reason, even though I have the api-version in the URL it still doesn't run that Logic App. It works perfectly from Postman though. I get the following error (400 - Bad Request): &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2104483-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I created a Web Service in Cloud Application Studio that is using the generated POST request URL details from the Logic App. After that I created the communication scenario, then in ByDesign I created the Communication arrangement. Then I created an action for triggering this Logic App where I execute the external webservice call:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;import ABSL;

var HttpMethod = "POST";
var HttpResource = "/workflows/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/triggers/manual/paths/invoke"; 
var ContentType = "application/json";                        
var Body = ""; 
var HeaderParameter : collectionof NameAndValue;  // not required

var URLParameter: collectionof NameAndValue;
var URLParameterEntry :NameAndValue;

URLParameterEntry.Name = "api-version";
URLParameterEntry.Value = "2016-10-01";

URLParameter.Add(URLParameterEntry);

URLParameterEntry.Name = "sp";
URLParameterEntry.Value = "%2Ftriggers%2Fmanual%2Frun";

URLParameter.Add(URLParameterEntry);

URLParameterEntry.Name = "sv";
URLParameterEntry.Value = "1.0";

URLParameter.Add(URLParameterEntry);

URLParameterEntry.Name = "sig";
URLParameterEntry.Value = "xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx";

URLParameter.Add(URLParameterEntry);

URLParameterEntry.Name = "AccountingPeriodVar";
URLParameterEntry.Value = this.AccountingPeriod.content;

URLParameter.Add(URLParameterEntry);

URLParameterEntry.Name = "CompanyCodeVar" ;
URLParameterEntry.Value = this.CompanyCode.content;

URLParameter.Add(URLParameterEntry);

var wsresult = WebServiceUtilities.ExecuteRESTService("CS_Trigger", "Trigger_EWS", "POST", HttpResource, URLParameter, HeaderParameter,ContentType, Body);

var contentResult = wsresult.Content;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The resulting RequestURL seems good, I tested it in Postman. But for some reason it still believes that the api-version is missing from it so the call is seemingly never made.&lt;/P&gt;
  &lt;P&gt;The RequestURL looks like this in CAS: &lt;A href="https://*********.*********.logic.azure.com:***/workflows/***************************************/triggers/manual/paths/invoke?api-version=2016-10-01&amp;amp;sp=%2Ftriggers%2Fmanual%2Frun&amp;amp;sv=1.0&amp;amp;sig=*******************-*******************************&amp;amp;AccountingPeriodVar=6756&amp;amp;CompanyCodeVar=7657657" target="test_blank"&gt;https://*********.*********.logic.azure.com:***/workflows/***************************************/triggers/manual/paths/invoke?api-version=2016-10-01&amp;amp;sp=%2Ftriggers%2Fmanual%2Frun&amp;amp;sv=1.0&amp;amp;sig=*******************-*******************************&amp;amp;AccountingPeriodVar=6756&amp;amp;CompanyCodeVar=7657657&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Can anyone help me with this?&lt;/P&gt;
  &lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 15:25:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaq-p/12620439</guid>
      <dc:creator>planteksz</dc:creator>
      <dc:date>2022-10-06T15:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calling REST POST but MissingApiVersionParameter error</title>
      <link>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaa-p/12620440#M4733705</link>
      <description>&lt;P&gt;Hi Szilvia.&lt;/P&gt;&lt;P&gt;In my opinion, there is a problem in your using in 'sp' of parameters. Because of &lt;STRONG&gt;%2F&lt;/STRONG&gt; is mean '&lt;STRONG&gt;/'&lt;/STRONG&gt; char in HTML url structure. You can refer &lt;A href="https://www.w3schools.com/tags/ref_urlencode.ASP" target="_blank"&gt;HTML url encode&lt;/A&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Can you change code and try like this : '/triggers/manual/run' instead of '%2Ftriggers%2Fmanual%2Frun'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But probably, it won't work. I mean, you send '&lt;STRONG&gt;sp&lt;/STRONG&gt;' of parameters as '&lt;STRONG&gt;sp=/triggers/manual/run&lt;/STRONG&gt;' but system will understand as if '&lt;STRONG&gt;a path&lt;/STRONG&gt;' because it contains '&lt;STRONG&gt;/&lt;/STRONG&gt;' char. System wants to see in parameter &lt;STRONG&gt;a value&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;You know, when need define a path, we use '&lt;STRONG&gt;/&lt;/STRONG&gt;' special char.&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 18:02:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaa-p/12620440#M4733705</guid>
      <dc:creator>kursatbeyoglu</dc:creator>
      <dc:date>2022-10-16T18:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calling REST POST but MissingApiVersionParameter error</title>
      <link>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaa-p/12620441#M4733706</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for this suggestion, my coworker had the same idea a few days ago. So I tried this idea you mentioned, sadly no luck and I tried with encoding the whole URL from "workflows" with special characters, then tried with non-encoded version, tried to just encode the api-version, or the triggers/manual/run, no luck. I opened a ticket with SAP about this, I hope they can figure out what's wrong with this call.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 05:58:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaa-p/12620441#M4733706</guid>
      <dc:creator>planteksz</dc:creator>
      <dc:date>2022-10-17T05:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calling REST POST but MissingApiVersionParameter error</title>
      <link>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaa-p/12620442#M4733707</link>
      <description>&lt;P&gt;After months of investigation from SAP support finally they figured out what was the problem.&lt;/P&gt;&lt;P&gt;Instead of &lt;I&gt;var Body = "";&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I should have declared it like&lt;EM&gt; &lt;/EM&gt;&lt;I&gt;var Body = "{}";&lt;/I&gt;&lt;/P&gt;&lt;P&gt;This solved the issue and now I was able to trigger the POST request.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 06:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/calling-rest-post-but-missingapiversionparameter-error/qaa-p/12620442#M4733707</guid>
      <dc:creator>planteksz</dc:creator>
      <dc:date>2023-04-18T06:43:06Z</dc:date>
    </item>
  </channel>
</rss>

