- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Put request not working
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
03-01-2025 11:41 AM
03-01-2025 11:41 AM
Put request not working
Good afternoon,
Has anyone used a PUT request for tenantPermission
in a datastore?
python
CopyEdit
import requests
url = "https://changeme/api/zones/zoneId/data-stores/id"
payload = {
"datastore": {
"visibility": "private",
"resourcePermissions": {
"all": True,
"allPlans": True,
"sites": [{"id": 1}],
"plans": [{"id": 1}]
},
"active": True,
"tenantPermissions": [
{
"accounts": [1,3],
"defaultTarget": [1, 3],
"defaultStore": [1, 3]
}
]
}
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Bearer xxx"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)
I would like to point out that this type of request does not work, even though the response returns a 200
status.
- Tags:
- API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2025 07:37 AM
03-07-2025 07:37 AM
Re: Put request not working
Hi @Khalil_Gasanov ,
We’re working on correcting the api documentation. The new changes can be seen in the dev branch of the docs here
In the meantime you have 2 options to pass these values:
-
"tenantPermissions": [ {"id": 1, "defaultStore": true, , "defaultTarget": true}, {"id": 3, "defaultStore": true, , "defaultTarget": true} ]
-
Or as an object like:
"tenantPermissions": { "accounts": [1] }