500.0 Internal Fault when trying to patch a role

Hello,

I am working in Postman and trying to build out operation to Remove access profiles for a role. From everything I can find in the on dev docs this should work. I have tried both the V3 and Beta apis and get the same results. Any ideas as to what I am doing wrong?

Here is the build out:

URL: {{IdN_Sandbox_API_Uri}}/beta/roles/{{RoleID}}

Body:

[
    {
        "op":"remove",
        "path": "/accessProfiles",
        "value":{
            "type":"ACCESS_PROFILE",
            "id":"{{accessProfileID}}"
        }
    }
]

Response:

{
    "messages": [
        {
            "localeOrigin": "REQUEST",
            "locale": "en-US",
            "text": "An internal fault occurred."
        },
        {
            "localeOrigin": "DEFAULT",
            "locale": "en-US",
            "text": "An internal fault occurred."
        }
    ],
    "detailCode": "500.0 Internal fault",
    "trackingId": "89eff968f0d942e6965e5f9ea853c657"
}
1 Like

“remove” operation does not need any value as it is going to simply remove the section that is defined by path. If you like to remove a specific access profile, you can use “/accessProfiles/n” where n is the index of the item to be removed (index starts from 0)

1 Like

Body:

[
    {
        "op":"remove",
        "path": "/accessProfiles/0"
    }
]

Response:

{
    "messages": [
        {
            "localeOrigin": "DEFAULT",
            "locale": "en-US",
            "text": "An internal fault occurred."
        },
        {
            "localeOrigin": "REQUEST",
            "locale": "en-US",
            "text": "An internal fault occurred."
        }
    ],
    "detailCode": "500.0 Internal fault",
    "trackingId": "2e2cded9ed47491290a5028777df6788"
}
1 Like

This could be one off cases. I just tested a PATCH operation with exactly same body as you have and it worked fine

1 Like

Thank you for the information.

1 Like

Could I be getting this message because the Roles I am trying to modify are disabled?

I tested it on a disabled role and it worked
Have you added this to the header?
Content-Type : application/json-patch+json
instead of
Content-Type : application/json

2 Likes

That was in deed the issue I updated the Content-Type and was able to update a role successfully.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.