0
votes

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?

1
Hi @Sirch, Just checking in to see whether this issue is still blocking you now? Any update for this issue? - Vito Liu

1 Answers

1
votes

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:

enter image description here