Commits - Get Commits
Abrufen von Git-Commits für ein Projekt
Parameter, die das präfix searchCriteria in ihrem Namen verwenden, können ohne dieses als Abfrageparameter angegeben werden, z. B. searchCriteria.$top -> $top
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits?api-version=5.0
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits?searchCriteria.historyMode={searchCriteria.historyMode}&searchCriteria.includePushData={searchCriteria.includePushData}&searchCriteria.includeUserImageUrl={searchCriteria.includeUserImageUrl}&searchCriteria.includeWorkItems={searchCriteria.includeWorkItems}&searchCriteria.includeLinks={searchCriteria.includeLinks}&searchCriteria.$top={searchCriteria.$top}&searchCriteria.$skip={searchCriteria.$skip}&searchCriteria.excludeDeletes={searchCriteria.excludeDeletes}&searchCriteria.itemPath={searchCriteria.itemPath}&searchCriteria.author={searchCriteria.author}&searchCriteria.user={searchCriteria.user}&searchCriteria.toCommitId={searchCriteria.toCommitId}&searchCriteria.fromCommitId={searchCriteria.fromCommitId}&searchCriteria.compareVersion.versionOptions={searchCriteria.compareVersion.versionOptions}&searchCriteria.compareVersion.version={searchCriteria.compareVersion.version}&searchCriteria.compareVersion.versionType={searchCriteria.compareVersion.versionType}&searchCriteria.itemVersion.versionOptions={searchCriteria.itemVersion.versionOptions}&searchCriteria.itemVersion.version={searchCriteria.itemVersion.version}&searchCriteria.itemVersion.versionType={searchCriteria.itemVersion.versionType}&searchCriteria.toDate={searchCriteria.toDate}&searchCriteria.fromDate={searchCriteria.fromDate}&searchCriteria.ids={searchCriteria.ids}&api-version=5.0
URI-Parameter
Name | In | Erforderlich | Typ | Beschreibung |
---|---|---|---|---|
organization
|
path | True |
string |
Der Name der Azure DevOps-Organisation. |
repository
|
path | True |
string |
Die ID oder der Anzeigename des Repositorys. Um den Anzeigenamen zu verwenden, muss auch projectId angegeben werden. |
project
|
path |
string |
Projekt-ID oder Projektname |
|
api-version
|
query | True |
string |
Version der zu verwendenden API. Dies sollte auf "5.0" festgelegt werden, um diese Version der API zu verwenden. |
search
|
query |
integer int32 |
Anzahl der zu überspringenden Einträge |
|
search
|
query |
integer int32 |
Maximale Anzahl der abzurufenden Einträge |
|
search
|
query |
string |
Alias oder Anzeigename des Autors |
|
search
|
query |
string |
Versionszeichenfolgenbezeichner (Name von Tag/Branch, SHA1 des Commits) |
|
search
|
query |
Versionsoptionen: Geben Sie zusätzliche Modifizierer für die Version an (z. B. "Zurück") |
||
search
|
query |
Versionstyp (Branch, Tag oder Commit). Bestimmt, wie die ID interpretiert wird. |
||
search
|
query |
boolean |
Gilt nur, wenn ein itemPath angegeben wird. Dadurch wird bestimmt, ob Löscheinträge des angegebenen Pfads ausgeschlossen werden sollen. |
|
search
|
query |
string |
Falls angegeben, wird alphabetisch eine Untergrenze zum Filtern von Commits ausgeführt. |
|
search
|
query |
string |
Wenn angegeben, schließen Sie nur Verlaufseinträge ein, die nach diesem Datum (Zeichenfolge) erstellt wurden. |
|
search
|
query |
Welcher Git-Verlaufsmodus verwendet werden soll. Dies gilt nur für die Suchkriterien, wenn ids = null und ein itemPath angegeben wird. |
||
search
|
query |
string[] |
Gibt bei Angabe der genauen Commit-IDs der abzurufenden Commits an. Darf nicht mit anderen Parametern kombiniert werden. |
|
search
|
query |
boolean |
Gibt an, ob das _links Feld in die flachen Verweise eingeschlossen werden soll |
|
search
|
query |
boolean |
Gibt an, ob die Pushinformationen eingeschlossen werden sollen |
|
search
|
query |
boolean |
Gibt an, ob die Image-URL für Committer und Autoren eingeschlossen werden soll |
|
search
|
query |
boolean |
Ob verknüpfte Arbeitselemente eingeschlossen werden sollen |
|
search
|
query |
string |
Pfad des Elements, unter dem gesucht werden soll |
|
search
|
query |
string |
Versionszeichenfolgenbezeichner (Name von Tag/Branch, SHA1 des Commits) |
|
search
|
query |
Versionsoptionen: Geben Sie zusätzliche Modifizierer für die Version an (z. B. "Zurück") |
||
search
|
query |
Versionstyp (Branch, Tag oder Commit). Bestimmt, wie die ID interpretiert wird. |
||
search
|
query |
string |
Falls angegeben, wird alphabetisch eine Obergrenze zum Filtern von Commits ausgeführt. |
|
search
|
query |
string |
Wenn angegeben, schließen Sie nur Verlaufseinträge ein, die vor diesem Datum erstellt wurden (Zeichenfolge). |
|
search
|
query |
string |
Alias oder Anzeigename des Committers |
Antworten
Name | Typ | Beschreibung |
---|---|---|
200 OK |
Erfolgreicher Vorgang |
Sicherheit
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Beschreibung |
---|---|
vso.code | Ermöglicht das Lesen von Quellcode und Metadaten zu Commits, Changesets, Branches und anderen Versionskontrollartefakten. Ermöglicht außerdem die Suche nach Code und die Benachrichtigung über Versionskontrollereignisse über Diensthaken. |
Beispiele
All commits |
By author |
By committer |
In a date range |
On a branch |
On a branch and in a path |
Paging |
Reachable from a commit |
Reachable from a commit and path |
All commits
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?api-version=5.0
Sample Response
{
"count": 8,
"value": [
{
"commitId": "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"comment": "Merged PR 2: Deleted README.md",
"commentTruncated": true,
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7"
},
{
"commitId": "c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"comment": "Merge pull request 2 from b2 into master",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/c771e2e3605c69d2435a6b34b28ac3db2c89efd2"
},
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
},
{
"commitId": "4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"comment": "Merged PR 1: Added file debug.log",
"commentTruncated": true,
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b"
},
{
"commitId": "8921e81180bdf0e8b448be302698e425273e9df0",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"comment": "Merge pull request 1 from b1 into master",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/8921e81180bdf0e8b448be302698e425273e9df0",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/8921e81180bdf0e8b448be302698e425273e9df0"
},
{
"commitId": "3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"comment": "Added file debug.log",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/3104bd0b0accbc74278fe6880e53215f6b93a5cd"
},
{
"commitId": "9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"comment": "Added file file1.txt",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f"
},
{
"commitId": "4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"comment": "Added README.md file",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4fa42e1a7b0215cc70cd4e927cb70c422123af84"
}
]
}
By author
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.author=Norman Paulk&api-version=5.0
Sample Response
{
"count": 8,
"value": [
{
"commitId": "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"comment": "Merged PR 2: Deleted README.md",
"commentTruncated": true,
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7"
},
{
"commitId": "c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"comment": "Merge pull request 2 from b2 into master",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/c771e2e3605c69d2435a6b34b28ac3db2c89efd2"
},
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
},
{
"commitId": "4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"comment": "Merged PR 1: Added file debug.log",
"commentTruncated": true,
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b"
},
{
"commitId": "8921e81180bdf0e8b448be302698e425273e9df0",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"comment": "Merge pull request 1 from b1 into master",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/8921e81180bdf0e8b448be302698e425273e9df0",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/8921e81180bdf0e8b448be302698e425273e9df0"
},
{
"commitId": "3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"comment": "Added file debug.log",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/3104bd0b0accbc74278fe6880e53215f6b93a5cd"
},
{
"commitId": "9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"comment": "Added file file1.txt",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f"
},
{
"commitId": "4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"comment": "Added README.md file",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4fa42e1a7b0215cc70cd4e927cb70c422123af84"
}
]
}
By committer
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.user=shsamy@microsoft.com&api-version=5.0
Sample Response
{
"count": 8,
"value": [
{
"commitId": "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"comment": "Merged PR 2: Deleted README.md",
"commentTruncated": true,
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7"
},
{
"commitId": "c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"comment": "Merge pull request 2 from b2 into master",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/c771e2e3605c69d2435a6b34b28ac3db2c89efd2"
},
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
},
{
"commitId": "4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"comment": "Merged PR 1: Added file debug.log",
"commentTruncated": true,
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b"
},
{
"commitId": "8921e81180bdf0e8b448be302698e425273e9df0",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"comment": "Merge pull request 1 from b1 into master",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/8921e81180bdf0e8b448be302698e425273e9df0",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/8921e81180bdf0e8b448be302698e425273e9df0"
},
{
"commitId": "3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"comment": "Added file debug.log",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/3104bd0b0accbc74278fe6880e53215f6b93a5cd"
},
{
"commitId": "9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"comment": "Added file file1.txt",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f"
},
{
"commitId": "4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"comment": "Added README.md file",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4fa42e1a7b0215cc70cd4e927cb70c422123af84"
}
]
}
In a date range
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.toDate=6/16/2018 12:00:00 AM&searchCriteria.fromDate=6/14/2018 12:00:00 AM&api-version=5.0
Sample Response
{
"count": 8,
"value": [
{
"commitId": "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"comment": "Merged PR 2: Deleted README.md",
"commentTruncated": true,
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7"
},
{
"commitId": "c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"comment": "Merge pull request 2 from b2 into master",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/c771e2e3605c69d2435a6b34b28ac3db2c89efd2"
},
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
},
{
"commitId": "4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"comment": "Merged PR 1: Added file debug.log",
"commentTruncated": true,
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b"
},
{
"commitId": "8921e81180bdf0e8b448be302698e425273e9df0",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"comment": "Merge pull request 1 from b1 into master",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/8921e81180bdf0e8b448be302698e425273e9df0",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/8921e81180bdf0e8b448be302698e425273e9df0"
},
{
"commitId": "3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"comment": "Added file debug.log",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/3104bd0b0accbc74278fe6880e53215f6b93a5cd"
},
{
"commitId": "9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"comment": "Added file file1.txt",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f"
},
{
"commitId": "4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"comment": "Added README.md file",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4fa42e1a7b0215cc70cd4e927cb70c422123af84"
}
]
}
On a branch
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.itemVersion.version=master&api-version=5.0
Sample Response
link: <9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7>;rel="startingCommitId"
{
"count": 6,
"value": [
{
"commitId": "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"comment": "Merged PR 2: Deleted README.md",
"commentTruncated": true,
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7"
},
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
},
{
"commitId": "4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"comment": "Merged PR 1: Added file debug.log",
"commentTruncated": true,
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b"
},
{
"commitId": "3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"comment": "Added file debug.log",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/3104bd0b0accbc74278fe6880e53215f6b93a5cd"
},
{
"commitId": "9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"comment": "Added file file1.txt",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f"
},
{
"commitId": "4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"comment": "Added README.md file",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4fa42e1a7b0215cc70cd4e927cb70c422123af84"
}
]
}
On a branch and in a path
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.itemPath=/debug.log&searchCriteria.itemVersion.version=master&api-version=5.0
Sample Response
link: <9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7>;rel="startingCommitId"
{
"count": 1,
"value": [
{
"commitId": "3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"comment": "Added file debug.log",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"changes": [
{
"sourceServerItem": "/debug.log",
"changeType": "add"
}
],
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/3104bd0b0accbc74278fe6880e53215f6b93a5cd"
}
]
}
Paging
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?api-version=5.0
Sample Response
link: ;rel="next"
{
"count": 2,
"value": [
{
"commitId": "c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"comment": "Merge pull request 2 from b2 into master",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/c771e2e3605c69d2435a6b34b28ac3db2c89efd2"
},
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
}
]
}
Reachable from a commit
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.compareVersion.version=4fa42e1a7b0215cc70cd4e927cb70c422123af84&searchCriteria.compareVersion.versionType=commit&api-version=5.0
Sample Response
{
"count": 8,
"value": [
{
"commitId": "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:53Z"
},
"comment": "Merged PR 2: Deleted README.md",
"commentTruncated": true,
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7"
},
{
"commitId": "c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:38Z"
},
"comment": "Merge pull request 2 from b2 into master",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/c771e2e3605c69d2435a6b34b28ac3db2c89efd2",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/c771e2e3605c69d2435a6b34b28ac3db2c89efd2"
},
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
},
{
"commitId": "4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:17Z"
},
"comment": "Merged PR 1: Added file debug.log",
"commentTruncated": true,
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4bac640ecfd017eeadfd282a8e31bcd8ab6d132b"
},
{
"commitId": "8921e81180bdf0e8b448be302698e425273e9df0",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:28Z"
},
"comment": "Merge pull request 1 from b1 into master",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/8921e81180bdf0e8b448be302698e425273e9df0",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/8921e81180bdf0e8b448be302698e425273e9df0"
},
{
"commitId": "3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:05:18Z"
},
"comment": "Added file debug.log",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/3104bd0b0accbc74278fe6880e53215f6b93a5cd",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/3104bd0b0accbc74278fe6880e53215f6b93a5cd"
},
{
"commitId": "9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:45Z"
},
"comment": "Added file file1.txt",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/9c1e8b082e2c2f041bdd5db76d6bf5c11572524f"
},
{
"commitId": "4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:04:22Z"
},
"comment": "Added README.md file",
"changeCounts": {
"Add": 1,
"Edit": 0,
"Delete": 0
},
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/4fa42e1a7b0215cc70cd4e927cb70c422123af84",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/4fa42e1a7b0215cc70cd4e927cb70c422123af84"
}
]
}
Reachable from a commit and path
Sample Request
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.itemPath=/README.md&searchCriteria.compareVersion.version=master&searchCriteria.itemVersion.version=4fa42e1a7b0215cc70cd4e927cb70c422123af84&searchCriteria.itemVersion.versionType=commit&api-version=5.0
Sample Response
link: <4fa42e1a7b0215cc70cd4e927cb70c422123af84>;rel="startingCommitId"
{
"count": 1,
"value": [
{
"commitId": "20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"author": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"committer": {
"name": "Norman Paulk",
"email": "Fabrikamfiber16@hotmail.com",
"date": "2018-06-15T17:06:32Z"
},
"comment": "Deleted README.md",
"changeCounts": {
"Add": 0,
"Edit": 0,
"Delete": 1
},
"changes": [
{
"sourceServerItem": "/README.md",
"changeType": "delete"
}
],
"url": "https://dev.azure.com/fabrikam/1fec3816-a6f6-4d90-97eb-3bc4630ac416/_apis/git/repositories/1701bc47-1145-4739-a805-64b02e40dbe7/commits/20510720ffe1443d6ed3cb98ca340bc732ba04e5",
"remoteUrl": "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/20510720ffe1443d6ed3cb98ca340bc732ba04e5"
}
]
}
Definitionen
Name | Beschreibung |
---|---|
Change |
|
Git |
|
Git |
Stellt Eigenschaften bereit, die einen Git-Commit und zugehörige Metadaten beschreiben. |
Git |
Welcher Git-Verlaufsmodus verwendet werden soll. Dies gilt nur für die Suchkriterien, wenn ids = null und ein itemPath angegeben wird. |
Git |
|
Git |
Diese Klasse enthält die Metadaten eines Diensts/einer Erweiterung, die eine status. |
Git |
Statuskontext, der die status eindeutig identifiziert. |
Git |
Zustand des status. |
Git |
|
Git |
Benutzerinformationen und Datum für Git-Vorgänge. |
Git |
Versionsoptionen: Geben Sie zusätzliche Modifizierer für die Version an (z. B. Vorherige) |
Git |
Versionstyp (Branch, Tag oder Commit). Bestimmt, wie die ID interpretiert wird. |
Identity |
|
Item |
|
Item |
|
Reference |
Die Klasse, die eine Auflistung von REST-Verweislinks darstellt. |
Resource |
|
Version |
Der Typ der Änderung, die am Element vorgenommen wurde. |
ChangeCountDictionary
GitChange
Name | Typ | Beschreibung |
---|---|---|
changeId |
integer |
ID der Änderung innerhalb der Gruppe der Änderungen. |
changeType |
Der Typ der Änderung, die am Element vorgenommen wurde. |
|
item |
string |
Aktuelle Version. |
newContent |
Inhalt des Elements nach der Änderung. |
|
newContentTemplate |
Neue Inhaltsvorlage, die beim Pushen neuer Änderungen verwendet werden soll. |
|
originalPath |
string |
Der ursprüngliche Pfad des Elements, wenn er sich vom aktuellen Pfad unterscheidet. |
sourceServerItem |
string |
Pfad des Elements auf dem Server. |
url |
string |
URL zum Abrufen des Elements. |
GitCommitRef
Stellt Eigenschaften bereit, die einen Git-Commit und zugehörige Metadaten beschreiben.
Name | Typ | Beschreibung |
---|---|---|
_links |
Eine Sammlung verwandter REST-Verweislinks. |
|
author |
Autor des Commits. |
|
changeCounts |
Anzahl der Im Commit enthaltenen Änderungstypen (Bearbeitungen, Löschvorgänge usw.). |
|
changes |
Eine Enumeration der im Commit enthaltenen Änderungen. |
|
comment |
string |
Kommentar oder Meldung des Commits. |
commentTruncated |
boolean |
Gibt an, ob der Kommentar aus der vollständigen Git-Commitkommentarnachricht abgeschnitten wird. |
commitId |
string |
ID (SHA-1) des Commits. |
committer |
Committer des Commits. |
|
parents |
string[] |
Eine Enumeration der übergeordneten Commit-IDs für diesen Commit. |
push |
Der diesem Commit zugeordnete Push. |
|
remoteUrl |
string |
Remote-URL-Pfad zum Commit. |
statuses |
Eine Liste mit status Metadaten von Diensten und Erweiterungen, die dem Commit möglicherweise zusätzliche Informationen zuordnen. |
|
url |
string |
REST-URL für diese Ressource. |
workItems |
Eine Liste von Arbeitselementen, die diesem Commit zugeordnet sind. |
GitHistoryMode
Welcher Git-Verlaufsmodus verwendet werden soll. Dies gilt nur für die Suchkriterien, wenn ids = null und ein itemPath angegeben wird.
Name | Typ | Beschreibung |
---|---|---|
firstParent |
string |
Der von verwendete Verlaufsmodus |
fullHistory |
string |
Der von verwendete Verlaufsmodus |
fullHistorySimplifyMerges |
string |
Der von verwendete Verlaufsmodus |
simplifiedHistory |
string |
Der von verwendete Verlaufsmodus |
GitPushRef
Name | Typ | Beschreibung |
---|---|---|
_links |
Die Klasse, die eine Auflistung von REST-Verweislinks darstellt. |
|
date |
string |
|
pushId |
integer |
|
pushedBy | ||
url |
string |
GitStatus
Diese Klasse enthält die Metadaten eines Diensts/einer Erweiterung, die eine status.
Name | Typ | Beschreibung |
---|---|---|
_links |
Verweislinks. |
|
context |
Kontext des status. |
|
createdBy |
Identität, die den status erstellt hat. |
|
creationDate |
string |
Erstellungsdatum und -uhrzeit des status. |
description |
string |
Statusbeschreibung. Beschreibt in der Regel den aktuellen Zustand des status. |
id |
integer |
Statusbezeichner. |
state |
Zustand des status. |
|
targetUrl |
string |
URL mit status Details. |
updatedDate |
string |
Datum und Uhrzeit der letzten Aktualisierung des status. |
GitStatusContext
Statuskontext, der die status eindeutig identifiziert.
Name | Typ | Beschreibung |
---|---|---|
genre |
string |
Genre der status. In der Regel kann der Name des Diensts/Tools, der die status generiert, leer sein. |
name |
string |
Der Namensbezeichner des status darf nicht NULL oder leer sein. |
GitStatusState
Zustand des status.
Name | Typ | Beschreibung |
---|---|---|
error |
string |
Status mit einem Fehler. |
failed |
string |
Fehler beim Status. |
notApplicable |
string |
Der Status gilt nicht für das Zielobjekt. |
notSet |
string |
Statusstatus nicht festgelegt. Standardzustand. |
pending |
string |
Status ausstehend. |
succeeded |
string |
Status erfolgreich. |
GitTemplate
Name | Typ | Beschreibung |
---|---|---|
name |
string |
Name der Vorlage |
type |
string |
Typ der Vorlage |
GitUserDate
Benutzerinformationen und Datum für Git-Vorgänge.
Name | Typ | Beschreibung |
---|---|---|
date |
string |
Datum des Git-Vorgangs. |
string |
Email Adresse des Benutzers, der den Git-Vorgang ausführt. |
|
imageUrl |
string |
URL für den Avatar des Benutzers. |
name |
string |
Name des Benutzers, der den Git-Vorgang ausführt. |
GitVersionOptions
Versionsoptionen: Geben Sie zusätzliche Modifizierer für die Version an (z. B. Vorherige)
Name | Typ | Beschreibung |
---|---|---|
firstParent |
string |
Erstes übergeordnetes Element des Commits (HEAD^) |
none |
string |
Nicht angegeben |
previousChange |
string |
Commit für das geänderte Element vor der aktuellen Version |
GitVersionType
Versionstyp (Branch, Tag oder Commit). Bestimmt, wie die ID interpretiert wird.
Name | Typ | Beschreibung |
---|---|---|
branch |
string |
Interpretieren der Version als Branchname |
commit |
string |
Interpretieren der Version als Commit-ID (SHA1) |
tag |
string |
Interpretieren der Version als Tagname |
IdentityRef
Name | Typ | Beschreibung |
---|---|---|
_links |
Dieses Feld enthält null oder interessantere Links zum Diagrammthema. Diese Links können aufgerufen werden, um zusätzliche Beziehungen oder ausführlichere Informationen zu diesem Graph-Thema zu erhalten. |
|
descriptor |
string |
Der Deskriptor ist die primäre Möglichkeit, auf den Graphengegenstand zu verweisen, während das System ausgeführt wird. In diesem Feld wird derselbe Graph-Betreff sowohl für Konten als auch für Organisationen eindeutig identifiziert. |
directoryAlias |
string |
|
displayName |
string |
Dies ist der nicht eindeutige Anzeigename des Diagrammsubjekts. Um dieses Feld zu ändern, müssen Sie seinen Wert im Quellanbieter ändern. |
id |
string |
|
imageUrl |
string |
|
inactive |
boolean |
|
isAadIdentity |
boolean |
|
isContainer |
boolean |
|
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
url |
string |
Diese URL ist die vollständige Route zur Quellressource dieses Graph-Betreffs. |
ItemContent
Name | Typ | Beschreibung |
---|---|---|
content |
string |
|
contentType |
ItemContentType
Name | Typ | Beschreibung |
---|---|---|
base64Encoded |
string |
|
rawText |
string |
ReferenceLinks
Die Klasse, die eine Auflistung von REST-Verweislinks darstellt.
Name | Typ | Beschreibung |
---|---|---|
links |
object |
Die schreibgeschützte Ansicht der Links. Da Verweislinks schreibgeschützt sind, möchten wir sie nur als schreibgeschützt verfügbar machen. |
ResourceRef
Name | Typ | Beschreibung |
---|---|---|
id |
string |
|
url |
string |
VersionControlChangeType
Der Typ der Änderung, die am Element vorgenommen wurde.
Name | Typ | Beschreibung |
---|---|---|
add |
string |
|
all |
string |
|
branch |
string |
|
delete |
string |
|
edit |
string |
|
encoding |
string |
|
lock |
string |
|
merge |
string |
|
none |
string |
|
property |
string |
|
rename |
string |
|
rollback |
string |
|
sourceRename |
string |
|
targetRename |
string |
|
undelete |
string |