The PrimaryRoleId parameter can be used within the Search endpoint, but the Relationship search function is slightly different and has fewer parameters - role IDs cannot currently be applied to a relationship search. This is something we hope to address with the development of a new FHIR R4 API which is currently under development.