How to assign Contacts/Leads to a user using set relationship in REST API v4_1 ?

I am trying to assign a user to Contacts/Leads using set_relationship in REST API v4_1. I am new to sugar can anyone please help with an example or guide me.