I ran into this issue: https://kb.netapp.com/data-mgmt%2FSnapCenter%2FSC_KBs%2FUnable_to_edit_or_create_resource_groups_with_a_'space'_in_the_name
We had some resource groups with spaces in their names, which apparently isn't allowed in SCP 6.2...
The solution is to rename this via the swagger API.. and I am able to get the policies etc. but the "PATCH" procedure isn't described, and after trying a few different things I think it's better to ask for help before I break it 😉
By default the PATCH needs the resource group id, and the token which I have.. but in the entry list I guess you have to feed it something specific... I have tried with "name": "resource group name"... and I get a 200 OK returned, but the resource group isn't renamed... I then tried to copy over a bit more from what was returned from the "GET" call... but no dice... can someone please post an example of what is needed to just rename the recource group name.
Only posting this here, because it would be a waste of a support case? 😉 although I think they should describe it better in the documentation... or maybe test the software before releasing it...just for once... 😉
#Rename resource groups from Swagger API...
1 messages · Page 1 of 1 (latest)
....you actually have to use the "PUT" call, and copy in the "object" from the "GET", then nodify the values you want... after a few tried I got it working... funny thing.. we also have some "policy names" which include spaces.. but apparently this is fine... ? I guess I might as well rename them now, as it is most likely to fail with another update.. 😉
Can you post the command you used to get it to work?
First I started up the swagger API with https://yoursnapcenterserver:8144/api/swagger-ui/index.html ... from there I started with the AUTH command, and got my token which I used for the "GET" command under Resource Group... it lists all the groups with an ID... (normally 1.. onwards...) I then ran the GET where I pointed on the resource group ID I wanted to change... I then copied out everything from "response" onwards... keeping the { } .. then paste this into the PUT command and feed it the group ID as well (and of cause the token).. so that it starts with { "name": "your group" ... } (I found out that you can actually just feed it "id": "<id>" here and it will "ignore" the one you specify in the command... this seems to work OK... and I have now renamed about 20 groups without any issues...