Get a commit's statuses, by branch/tag/commit reference
GET
/repos/{owner}/{repo}/commits/{ref}/statuses
const url = 'https://gitea.example.com/api/v1/repos/example/example/commits/example/statuses?sort=oldest&state=pending';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://gitea.example.com/api/v1/repos/example/example/commits/example/statuses?sort=oldest&state=pending' \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
ref
required
string
Name of branch/tag/commit
Query Parameters
Section titled “Query Parameters”sort
string
Type of sort
state
string
Type of state
page
integer
Page number of results to return (1-based)
limit
integer
Page size of results
Responses
Section titled “Responses”CommitStatusList
Media typeapplication/json
Array<object>
CommitStatus holds a single status of a single Commit
object
context
string
created_at
string format: date-time
creator
User represents a user
object
active
Is user active
boolean
avatar_url
URL to the user’s avatar
string
created
string format: date-time
description
The user’s description
string
email
string format: email
followers_count
User counts
integer format: int64
following_count
integer format: int64
full_name
The user’s full name
string
id
The user’s id
integer format: int64
is_admin
Is the user an administrator
boolean
language
User locale
string
last_login
string format: date-time
location
The user’s location
string
login
The user’s username
string
login_name
The user’s authentication sign-in name.
string
prohibit_login
Is user login prohibited
boolean
restricted
Is user restricted
boolean
starred_repos_count
integer format: int64
visibility
User visibility level option: public, limited, private
string
website
The user’s website
string
description
string
id
integer format: int64
status
CommitStatusState holds the state of a CommitStatus It can be “pending”, “success”, “error” and “failure”
string
target_url
string
updated_at
string format: date-time
url
string
Example
[ { "creator": { "login_name": "empty" } }]APIError is error format response
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
Media typeapplication/json