<?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 API mapping for /api/library/layouts/{id}/permissions not really there? in HPE Morpheus Enterprise Software</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/api-mapping-for-api-library-layouts-id-permissions-not-really/m-p/7248588#M1762</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I’m trying to script some stuff up around layout permissions, and I was attempting to use the “Update Layout Permissions” PUT option listed in the API Documentation, instead of using the larger “Update a Layout” PUT which also includes some permissions settings.&lt;/P&gt;
&lt;P&gt;I’m reading in the current Site ID values that have permissions just to compare, and that’s working fine, but when I feed my JSON back to the API endpoint listed in the documentation, /api/library/layouts/{id}/permissions I’m receiving an error of “WARN  o.s.w.s.PageNotFound - No mapping for PUT /api/library/layouts/996/permissions”&lt;/P&gt;
&lt;P&gt;For the info below, I was just reading in the current layout 996 Site ID permissions, appending the values to a JSON object, and then feeding that back to the API just to make sure things were going work, but I’m see:&lt;/P&gt;
&lt;P&gt;{“success”:false,“msg”:“Unable to find api endpoint PUT /api/library/layouts/996/permissions”}&lt;BR /&gt;
&amp;lt;bound method Response.json of &amp;lt;Response [404]&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;layout 996 perms: {‘instanceTypeLayout’: {‘permissions’: {‘resourcePermissions’: {‘sites’: [{‘id’: 2}, {‘id’: 10}, {‘id’: 13}, {‘id’: 7}, {‘id’: 9}, {‘id’: 8}]}}}}&lt;/P&gt;
&lt;P&gt;Does the /api/library/layouts/{id}/permissions no longer exist or am I maybe missing some typo? This is in version 7.0.7 of Morpheus&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2024 12:58:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2024-10-28T12:58:41Z</dc:date>
    <item>
      <title>API mapping for /api/library/layouts/{id}/permissions not really there?</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/api-mapping-for-api-library-layouts-id-permissions-not-really/m-p/7248588#M1762</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I’m trying to script some stuff up around layout permissions, and I was attempting to use the “Update Layout Permissions” PUT option listed in the API Documentation, instead of using the larger “Update a Layout” PUT which also includes some permissions settings.&lt;/P&gt;
&lt;P&gt;I’m reading in the current Site ID values that have permissions just to compare, and that’s working fine, but when I feed my JSON back to the API endpoint listed in the documentation, /api/library/layouts/{id}/permissions I’m receiving an error of “WARN  o.s.w.s.PageNotFound - No mapping for PUT /api/library/layouts/996/permissions”&lt;/P&gt;
&lt;P&gt;For the info below, I was just reading in the current layout 996 Site ID permissions, appending the values to a JSON object, and then feeding that back to the API just to make sure things were going work, but I’m see:&lt;/P&gt;
&lt;P&gt;{“success”:false,“msg”:“Unable to find api endpoint PUT /api/library/layouts/996/permissions”}&lt;BR /&gt;
&amp;lt;bound method Response.json of &amp;lt;Response [404]&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;layout 996 perms: {‘instanceTypeLayout’: {‘permissions’: {‘resourcePermissions’: {‘sites’: [{‘id’: 2}, {‘id’: 10}, {‘id’: 13}, {‘id’: 7}, {‘id’: 9}, {‘id’: 8}]}}}}&lt;/P&gt;
&lt;P&gt;Does the /api/library/layouts/{id}/permissions no longer exist or am I maybe missing some typo? This is in version 7.0.7 of Morpheus&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 12:58:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/api-mapping-for-api-library-layouts-id-permissions-not-really/m-p/7248588#M1762</guid>
      <dc:creator />
      <dc:date>2024-10-28T12:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: API mapping for /api/library/layouts/{id}/permissions not really there?</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/api-mapping-for-api-library-layouts-id-permissions-not-really/m-p/7248589#M1763</link>
      <description>&lt;P&gt;Awesome and thank you! I didn’t look that deep at the other API end point for the layout update, I just figured being a bigger “object” level it would require more.&lt;/P&gt;
&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 13:42:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/api-mapping-for-api-library-layouts-id-permissions-not-really/m-p/7248589#M1763</guid>
      <dc:creator />
      <dc:date>2024-10-28T13:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: API mapping for /api/library/layouts/{id}/permissions not really there?</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/api-mapping-for-api-library-layouts-id-permissions-not-really/m-p/7248590#M1764</link>
      <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hpe.com/u/rjr162"&gt;@rjr162&lt;/A&gt;, I hope your week is starting well!&lt;/P&gt;
&lt;P&gt;I’ve verified that the endpoint of &lt;CODE style="background : #f0f1f2;"&gt;PUT&lt;/CODE&gt; is a typo in the API docs and it should be &lt;CODE style="background : #f0f1f2;"&gt;POST&lt;/CODE&gt;.  Try your call using that instead and see what you get.&lt;/P&gt;
&lt;P&gt;Alternatively, as you mentioned, you can use the same payload and call the &lt;A href="https://apidocs.morpheusdata.com/reference/updatelayout"&gt;Update a Layout&lt;/A&gt; endpoint as well and supply the permissions there too there.  I used the same payload for both endpoints, so either should work.&lt;/P&gt;
&lt;P&gt;Example payload I used:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;{
  "instanceTypeLayout": {
    "permissions": {
      "resourcePermissions": {
        "sites": [
          {
            "id": 15
          }
        ],
        "all": false
      }
    }
  }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The docs will be updated and should be reflected in the next version.&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 13:32:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/api-mapping-for-api-library-layouts-id-permissions-not-really/m-p/7248590#M1764</guid>
      <dc:creator>KoreyG</dc:creator>
      <dc:date>2024-10-28T13:32:24Z</dc:date>
    </item>
  </channel>
</rss>

