Update: Need add "extendAdminPermissions": true in request body to change dashboard owner
Hi guys
I'm trying to delete hundreds of private dashboards as admin, but #api-rest-api-3-dashboard-id-delete gives me error about "You may only create, modify or delete dashboards that you own."
so I try to change all of those dashboard's owner to myself, use #api-rest-api-3-dashboard-bulk-edit-put with below payload:
{
"action": "changeOwner",
"entityIds": [
110000,
111111,
222222
],
"changeOwnerDetails": {
"autofixName": true,
"newOwner": "1a2b3cxxxxxxx" (got this by accountId in #api-rest-api-3-myself-get)
}
}but it returns with error message: "Only admin or owner of dashboard can change owner."
I'm very sure about the admin part, as I can change owner of those dashboards in admin page, anything wrong with my API request?
This is the curl format of my request:
curl -X "PUT" "https://aspiraconnect.atlassian.net/rest/api/3/dashboard/bulk/edit" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u 'username:password' \
-d $'{
"action": "changeOwner",
"entityIds": [
11111,
22222,
33333
],
"changeOwnerDetails": {
"autofixName": true,
"newOwner": "1a2b3cxxxxxxx"
}
}'