Can someone share the request body and URL information to update Role attriutes like role owner, displayname etc… ?
I am getting below error
url/cc/api/role/update/
request body
{
“id”:“”,
“owner”:“”
}
{
“msg_template”: “NotFoundException: Identity with ID or name 2c9180877a83ae10017aa423f79b45c4 was not found.”,
“slpt_error_code”: “SLPT-1009”,
“formatted_msg”: “NotFoundException: Identity with ID or name 2c9180877a83ae10017aa423f79b45c4 was not found.”,
“exception_id”: “17B5A5A0E76”,
“error_code”: 1009,
“exception_class”: “groovyx.net.http.HttpResponseException”,
“exception_detail”: {
“file”: “RESTClient.java”,
“method”: “defaultFailureHandler”,
“line_number”: 240,
“class”: “groovyx.net.http.RESTClient”
},
“http_response_code”: 404,
“timestamp”: “2021-08-18 17:40:56.566”,
“exception_message”: “Not Found”
}
There is now a beta collection for managing roles. Take a look at PATCH /roles/{id}. The beta collection is going to have better documentation and support than the /cc version.
An example of updating the owner and name of a role might look like this:
@colin_mckibben - I have noticed that , owner update looking for identityname as well along with identity id. When we have input just identity ID , API return the 200 response but owner is getting updated in IDN. But when I tried with name ( along with ID) , role getting owner update. can you please check and confirm the same?
Yes, you are correct. The docs are currently incorrect regarding the example for updating the owner of a role. Here is the correct PATCH body for updating the owner and name of a role.
[
{
"op": "replace",
"path": "/owner",
"value": {
"type": "IDENTITY",
"id": "2c9180a46faadee4016fb4e018c20639",
"name": "identity name here"
}
},
{
"op": "replace",
"path": "/name",
"value": "New role name"
}
]
I will put in a ticket to get the docs fixed. Thank you for pointing this out!