Post

2 followers Follow
0
Avatar

REST API - User State read-only

Using REST API, how do I disable a user?  I see:

https://api.clarizen.com/V2.0/services/data/ChangeState

But this does not seem to apply to the User entity.

I've also asked in this older post (so please forgive me).  State is read-only for users and cannot be altered in the UI to remove the read-only.  So there must be another way I've not seen. 

https://success.clarizen.com/hc/en-us/community/posts/203993138-User-Provisioning

Kurt Kremer Answered

Please sign in to leave a comment.

5 comments

0
Avatar

Repeated from other post.  This was the first attempt before seeing the ChangeState above (which does not seem to apply to User)

curl -X POST -H "Authorization: Session xxx" -d "{'State':'Disabled'}" https://api.clarizentb.com/v2.0/services/data/objects/User/xxx
{"errorCode":"InvalidOperation","message":"Invalid operation: Field 'State' cannot be updated. The field is marked 'read-only'.","referenceId":"xxx"}

What would be the REST way of updating state?  I can update other fields.  Just not this one.  And I cannot change its setting in the admin UI.

Kurt Kremer 0 votes
0
Avatar

Confirmed:

{

"errorCode": "General"
"message": "Change State message supported only for Work Item | Expense Sheet | Customer | Timesheet | Staffing Request"
"referenceId": "PGktI2Q0bYOeWmLUIgFUc"

}

Kurt Kremer 0 votes