Sample - GitHub REST API
GET/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}

Check whether a user can be assigned

Verifies whether a user can be assigned to a specific issue or pull request. Supply owner, repo, issue_number, and assignee to test the assignment permission for that resource. A successful check has no response body.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

4 parameters
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
issue_numberintegerrequired
The integer that identifies the issue or pull request within the repository.
assigneestringrequired
The username to check for assignment eligibility.

2 status codes
204Confirms that `assignee` can be assigned to the specified issue or pull request; the response has no content.
404Returned when `assignee` cannot be assigned to the specified issue or pull request.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned when assignee cannot be assigned to issue_number. owner, repo, issue_number, and assignee must identify the repository, issue, and user being checked.