Patch Features for provisioning-policies - Invalid Path Error

Hello,

I am trying to add new Account profile (AccountExpirationDate) using PATCH provisioning-policies. The docs showing as below.

{

  • “operations”: [
    • {
      • “op”: “add”,

      • “path”: “/displayAttribute”,

      • “value”: {

        • “new-display-attribute”: null},
      • “from”: “string”}]

}


[
{
“op”: “add”,
“path”: “/displayAttribute”,
“value”: {
“new-display-attribute”: null
},
“from”: “String”

}

]

Response

{
“detailMessage”: “Invalid "path" : "/displayAttribute" of JSONPatch: {"op":"add","path":"/displayAttribute","value":{"new-display-attribute":null}}”,
“stackTrace”: ,
“suppressedExceptions”:
}

I kind of stuck to add new attribute in provisioning policy. please let me know how to fix this.

If you are trying to add a new field to the provisioning policy, you will need to specify the index in the fields array where you intend to place it. The following example will insert the new field at index 0 of the fields array.

PATCH https://{org}.api.identitynow.com/v3/sources/{sourceId}/provisioning-policies/CREATE

Body

[
    {
        "op": "add",
        "path": "/fields/0",
        "value": {
            "name": "email",
            "transform": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "email"
                }
            },
            "attributes": {},
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        }
    }
]