Sorry I’m unable to share, but this is the gist of what you need to call
use conduit api calls starting with
to go from username of the reviewer to phid of the that user (officially you probably are supposed to use user.search)
You can do this one time, so you have a mapping from username to phid, user phids don’t change over time.
to look up a revision to check for current reviewers, I use
api/differential.revision.search (e.g. for a review D12345) - note you need the reviewers attachment or you just get basic info on the review
This will return JSON that shows you the reviews and reviewers
you’ll need to get the revision PHID that comes back in the json
api/differential.revision.edit to set the reviewers, by passing the
reviewers.add transaction type and a value of a list of users (using their PHIDs)
passing the revision PHID from above as the objectIdentifier
All the API calls, give you a nice example of how to do with this curl
You just need to get an API-TOKEN from your settings
Its that simple.