- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise Software
- >
- API mapping for /api/library/layouts/{id}/permissi...
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 05:58 AM
10-28-2024 05:58 AM
Hello,
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.
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”
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:
{“success”:false,“msg”:“Unable to find api endpoint PUT /api/library/layouts/996/permissions”}
<bound method Response.json of <Response [404]>>
layout 996 perms: {‘instanceTypeLayout’: {‘permissions’: {‘resourcePermissions’: {‘sites’: [{‘id’: 2}, {‘id’: 10}, {‘id’: 13}, {‘id’: 7}, {‘id’: 9}, {‘id’: 8}]}}}}
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
Solved! Go to Solution.
- Tags:
- API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 06:42 AM
10-28-2024 06:42 AM
Re: API mapping for /api/library/layouts/{id}/permissions not really there?
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.
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 06:32 AM
10-28-2024 06:32 AM
SolutionHi @rjr162, I hope your week is starting well!
I’ve verified that the endpoint of PUT is a typo in the API docs and it should be POST. Try your call using that instead and see what you get.
Alternatively, as you mentioned, you can use the same payload and call the Update a Layout endpoint as well and supply the permissions there too there. I used the same payload for both endpoints, so either should work.
Example payload I used:
{
"instanceTypeLayout": {
"permissions": {
"resourcePermissions": {
"sites": [
{
"id": 15
}
],
"all": false
}
}
}
}
The docs will be updated and should be reflected in the next version.
Hope that helps!