I would like to be able to use the Azure DevOps API to send emails about certain pull requests.
I am looking at this page as a reference: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20share/share%20pull%20request?view=azure-devops-rest-6.0
I am not sure how the body of the POST should be formatted, especially the "IdentityRef" entry. How do I get this IdentityRef for individual users?
The request body format is like this
{
"message": "xxx",
"receivers": [
{
"id": "xxx"
}
]
}
If you want to share the pull request with individual user, you could get the user ID via this REST API
GET https://vsaex.dev.azure.com/{organization}/_apis/userentitlements?api-version=6.0-preview.3
Result:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.