<?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: REST API Option List: cannot use url-encoding in url path in HPE Morpheus Enterprise</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247231#M405</link>
    <description>&lt;P&gt;Hi, It looks like the &lt;CODE style="background : #f0f1f2;"&gt;%&lt;/CODE&gt; symbol is itself being encoded resulting in this &lt;CODE style="background : #f0f1f2;"&gt;%252F&lt;/CODE&gt; in the request.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150531i5E62E76A952C5716/image-size/large?v=v2&amp;amp;px=2000" role="button" title="0f78ed4059044ca046568561373833af94c2131c.png" alt="0f78ed4059044ca046568561373833af94c2131c.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Are the json files not accessible directly from the repository by obtaining their raw URL there? In my brief testing all the files present with the standard “/” path part separation when going that route.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2025 14:34:31 GMT</pubDate>
    <dc:creator>Ollie-Phillips</dc:creator>
    <dc:date>2025-01-31T14:34:31Z</dc:date>
    <item>
      <title>REST API Option List: cannot use url-encoding in url path</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247227#M401</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I am trying to populate a REST Option List, whose contents would come from a json file stored in GitLab (I am perfectly able to populate other REST OptionLists coming from other sources).&lt;BR /&gt;
The GitLab REST API allows you to get a raw file from a repo via an endpoint where the &lt;STRONG&gt;path to the file is URL encoded&lt;/STRONG&gt;.&lt;BR /&gt;
Example: if the file &lt;CODE style="background : #f0f1f2;"&gt;myFile.json&lt;/CODE&gt; is in GitLab in the&lt;CODE style="background : #f0f1f2;"&gt; config&lt;/CODE&gt; folder of ProjectA (path: &lt;CODE style="background : #f0f1f2;"&gt;ProjectA/config/myFile.json&lt;/CODE&gt;), the endpoint to invoke would contain the pathfile “&lt;CODE style="background : #f0f1f2;"&gt;config/myFile.json&lt;/CODE&gt;” URL encoded as “&lt;CODE style="background : #f0f1f2;"&gt;config%2Fmyfile.json&lt;/CODE&gt;”&lt;/P&gt;
&lt;P&gt;This ends up in a URL of the form:&lt;BR /&gt;
&lt;CODE style="background : #f0f1f2;"&gt;https://mygitlab/gitlab/api/v4/projects/5/repository/files/config%2FmyFile.json/raw?ref=main' --header 'PRIVATE-TOKEN: glpat-xxxxxxxxxxxxxxxxxxxx'&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I can get data with that URL from Postman and curl, and I can also invoke other GitLab endpoints from the Morpheus REST OptionList that do not require encoding (e.g. the endpoint to get a list of  projects).&lt;BR /&gt;
So I guess the reason for failure is the encoding character %2F.&lt;BR /&gt;
Is there a way to overcome this?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Paolo&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 11:21:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247227#M401</guid>
      <dc:creator />
      <dc:date>2025-01-30T11:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Option List: cannot use url-encoding in url path</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247228#M402</link>
      <description>&lt;P&gt;Ok Ollie, thanks for the suggestions. I will try one of the options.&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;BR /&gt;
Paolo&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 07:12:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247228#M402</guid>
      <dc:creator />
      <dc:date>2025-02-04T07:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Option List: cannot use url-encoding in url path</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247229#M403</link>
      <description>&lt;P&gt;It’s not a bug, but I guess you could add an idea to disable the request encoding in the option list settings - that seems like it would prevent this double encoding - check out the ideas section of this forum.&lt;/P&gt;
&lt;P&gt;In the meantime, if the JSON file has to be used and has to be accessed in this way, then maybe script a simple webserver that will get it and serve it to Morpheus at an endpoint on the webserver.&lt;/P&gt;
&lt;P&gt;That’s one way.&lt;/P&gt;
&lt;P&gt;Another way, could be to script an option source plugin.&lt;/P&gt;
&lt;P&gt;With both those approaches you’d have full control over the client code that called out to the Gitlab REST endpoint.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 18:57:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247229#M403</guid>
      <dc:creator>Ollie-Phillips</dc:creator>
      <dc:date>2025-02-03T18:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Option List: cannot use url-encoding in url path</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247230#M404</link>
      <description>&lt;P&gt;Hello Ollie,&lt;BR /&gt;
thanks for your reply.&lt;BR /&gt;
If you mean the one you can get from the browser by selecting the “Open Raw” icon, then it does not work. I guess that using that url requires a different authentication mechanism (the REST API requires an access token). I tried setting “Basic authentication” and usr/pwd, but no way (not even from Postman/curl).&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 14:14:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247230#M404</guid>
      <dc:creator />
      <dc:date>2025-02-03T14:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Option List: cannot use url-encoding in url path</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247231#M405</link>
      <description>&lt;P&gt;Hi, It looks like the &lt;CODE style="background : #f0f1f2;"&gt;%&lt;/CODE&gt; symbol is itself being encoded resulting in this &lt;CODE style="background : #f0f1f2;"&gt;%252F&lt;/CODE&gt; in the request.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150531i5E62E76A952C5716/image-size/large?v=v2&amp;amp;px=2000" role="button" title="0f78ed4059044ca046568561373833af94c2131c.png" alt="0f78ed4059044ca046568561373833af94c2131c.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Are the json files not accessible directly from the repository by obtaining their raw URL there? In my brief testing all the files present with the standard “/” path part separation when going that route.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 14:34:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/rest-api-option-list-cannot-use-url-encoding-in-url-path/m-p/7247231#M405</guid>
      <dc:creator>Ollie-Phillips</dc:creator>
      <dc:date>2025-01-31T14:34:31Z</dc:date>
    </item>
  </channel>
</rss>

