Repository Commits Resource¶
Added in 2.0
Provides information on the commits in a repository.
This will fetch a page of commits from the repository. Each page will
usually be 30 items, but the exact count is dependent on the repository
type. To paginate results, provide a start
parameter with a value of
the commit ID to start from. Usually this will be set to the parent
field from the last commit.
Data on commits will not be available for all types of repositories.
Details¶
Name | commits |
URI | /api/repositories/{repository_id}/commits/ |
Token Policy ID | repository_commits |
HTTP Methods |
|
Parent Resource | Repository Resource |
Child Resources | None |
Anonymous Access | Yes, if anonymous site access is enabled |
Fields¶
author_nameString | The real name or username of the author who made the commit. |
dateString | The timestamp of the commit. This will be in ISO8601 format. |
idString | The revision identifier of the commit. The format depends on the repository type (it may be a number, SHA-1 hash, or some other type). This should be treated as a relatively opaque. |
messageString | The commit message, if any. |
parentString | The revision of the parent commit. This may be an empty string if this is the first revision in the commit history for a repository or branch. |
Links¶
Name | Method | Resource |
---|---|---|
self | GET | Repository Commits Resource |
HTTP GET¶
Retrieves a set of commits from a particular repository.
The start
parameter is a commit ID to use as a starting point. This
allows both pagination and logging of different branches. Successive
pages of commit history can be fetched by using the parent
field of
the last entry as the start
parameter for another request.
Request Parameters¶
branchString | The ID of the branch to limit the commits to, as provided by the ‘id’ field of the repository branches API. Added in 2.5 |
startString | A commit ID to start listing from. |
Errors¶
100 - Does Not ExistHTTP 404 - Not Found | Object does not exist |
101 - Permission DeniedHTTP 403 - Forbidden | You don’t have permission for this |
103 - Not Logged InHTTP 401 - Unauthorized | You are not logged in |
105 - Invalid Form DataHTTP 400 - Bad Request | One or more fields had errors |
209 - Repository Action Not SupportedHTTP 501 - Not Implemented | The specified repository is not able to perform this action. |
210 - Repository Information ErrorHTTP 500 - Internal Server Error | There was an error fetching extended information for this repository. |