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.