APi to remove owner from an entitlement

Hi,

I’m trying to remove owner from an entitlement. I see patch api call for an entitlement, but when I try this below PATCH call it throws me syntax error. could some help me in this.

[
  {
    "op": "replace",
    "path": "/owner",
    "value": {
        }
  }
]

Hi @chandramohans27

Can you past the curl request here? It should look something like below

curl -L -X PATCH 'https://{org}.api.identitynow.com/beta/entitlements/:id' \
-H 'Content-Type: application/json-patch+json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '[
  {
    ""op": "replace",
	"path": "/owner",
	"value": {
        "type": "IDENTITY",
        "id": "XXXXXXXXXXXXXXXXXXXXXX",
        "name": "john.doe"  //OPTIONAL
  }
]'

NOTE: When you’re patching owner, only owner type and owner id must be provided. Owner name is optional, and it won’t be modified. If the owner name is provided, it should correspond to the real name. The only owner type currently supported is IDENTITY

Hi @rajeshs

Thanks for tour reply,

Please find the CURL request, I use for removing the owner from an entitlement.

curl --location --request PATCH 'https://tenant-sb.api.identitynow.com/beta/entitlements/ac23fdc9a8114903a0d80e19f*****' \
--header 'Content-Type: application/json-patch+json' \
--header 'Authorization: Bearer ******\
--data '[
  {
    "op": "replace",
    "path": "/owner",
    "value": {
        }
  }
]'

Try this,

[
  {
    "op": "replace",
    "path": "/owner",
    "value": null
  }
]

Please let me know if it works

2 Likes

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