v. 3.7.1 REST API Question(s)

3 views
Skip to first unread message

Henry Versemann

unread,
Dec 19, 2017, 3:46:18 PM12/19/17
to dot...@googlegroups.com

I am able to setup through my REST API requests to add employees (add request) and assign department relationships  to individuals(update request), while processing an input file.

I have also been able to change the department relationship from one department to another.

But how would I remove a relationship between an employee and a department, if they left their current employment, but we still, at least temporarily wanted to retain the remainder of their other information?

Would I just have to manually make those changes myself to unpublish and/or archive them?

 

Thanks for the help.

 

Henry

John Michael Thomas

unread,
Dec 19, 2017, 11:03:08 PM12/19/17
to dotCMS User Group
The way the REST API update currently works, if you leave out any information (any field and any relationships) when you update the content, that information will essentially be removed from the content.

So if I understand your question correctly, to remove the Employee from the relationship with the Department all you should have to do is update the employee record and not include the relationship field in the update.

Henry Versemann

unread,
Dec 19, 2017, 11:05:07 PM12/19/17
to dot...@googlegroups.com

John,

OK. That’s easy enough then.

Thanks.

 

Henry

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/c70c410b-b008-4f04-aa50-33df8beead03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages