GET
/repos/{owner}/{repo}/labels/{name}Get a repository label
Retrieves a label from a repository by its name. Supply the repository owner, repository name, and label name to identify the label to retrieve. The response includes the label's metadata, color, archive state, and related URLs.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
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.
namestringrequired
The name of the label to retrieve.
200Returns the label object with its identifier, URLs, name, description, color, default-label flag, and archive information.
idintegerrequired
Unique identifier for the label.
node_idstringrequired
urlstringrequired
URL for the label
namestringrequired
The name of the label.
descriptionstringrequired
Optional description of the label, such as its purpose.
colorstringrequired
6-character hex code, without the leading #, identifying the color
defaultbooleanrequired
Whether this label comes by default in a new repository.
archived_atstringrequired
Timestamp indicating when the label was archived, or `null` if it has not been archived.
archived_byobjectrequired
The user who archived the label, or `null` if it has not been archived.
404Returned when the repository or label does not exist.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 404 is returned when the repository or label identified by owner, repo, and name cannot be found. Use the repository name without the .git extension, and provide the label name exactly as it is stored.