user_to_app_to_role_by_user_id didn't work for me.
I had to use user_to_app_to_role:
curl -X PATCH --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'X-DreamFactory-Api-Key: 36fda24fe5588fa4285ac6c6c2fdfbdb6b6bc9834699774c9bf777f706d05a88' --header 'X-DreamFactory-Session-Token: ' --header 'Authorization: Basic Y3J5c3RhbEBidWlsZG15YXBwLnRvZGF5OmhGOV40WFAyQFJUbQ==' -d '{
"user_to_app_to_role": [
{
"user_id": 14,
"app_id": 7,
"role_id": 4
}
]
}' 'http:///api/v2/system/user/14'