GET/repos/{owner}/{repo}/labels

List labels for a repository

Lists labels in a repository. Use owner and repo to identify the repository, and use page and per_page to paginate the results.

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.
per_pageintegeroptional
Number of labels per page, up to 100. Defaults to 30 when omitted.
Default:30
pageintegeroptional
Page number of the results to retrieve. Defaults to 1 when omitted.
Default:1

2 status codes
200Returns an array of label objects, including each label's identifier, name, description, color, default status, and archive details.
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 cannot be found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned if the repository cannot be found. The owner path parameter and repo path parameter must identify the repository whose labels you want to list.