다음을 통해 공유


Commits - Get Commits

프로젝트에 대한 git 커밋 검색

이름에 searchCriteria 접두사를 사용하는 매개 변수는 쿼리 매개 변수(예: 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 매개 변수

Name In(다음 안에) 필수 형식 Description
organization
path True

string

Azure DevOps 조직의 이름입니다.

repositoryId
path True

string

리포지토리의 ID 또는 식별 이름입니다. 이름을 사용하려면 projectId도 지정해야 합니다.

project
path

string

프로젝트 ID 또는 프로젝트 이름

api-version
query True

string

사용할 API의 버전입니다. 이 버전의 api를 사용하려면 '5.0'으로 설정해야 합니다.

searchCriteria.$skip
query

integer

int32

건너뛸 항목 수

searchCriteria.$top
query

integer

int32

검색할 최대 항목 수

searchCriteria.author
query

string

작성자의 별칭 또는 표시 이름

searchCriteria.compareVersion.version
query

string

버전 문자열 식별자(태그/분기 이름, 커밋의 SHA1)

searchCriteria.compareVersion.versionOptions
query

GitVersionOptions

버전 옵션 - 버전에 대한 추가 한정자 지정(예: 이전)

searchCriteria.compareVersion.versionType
query

GitVersionType

버전 유형(분기, 태그 또는 커밋). ID가 해석되는 방법을 결정합니다.

searchCriteria.excludeDeletes
query

boolean

itemPath를 지정한 경우에만 적용됩니다. 지정된 경로의 삭제 항목을 제외할지 여부를 결정합니다.

searchCriteria.fromCommitId
query

string

제공된 경우 필터링에 대한 하한은 사전순으로 커밋됩니다.

searchCriteria.fromDate
query

string

제공된 경우 이 날짜(문자열) 이후에 만든 기록 항목만 포함합니다.

searchCriteria.historyMode
query

GitHistoryMode

사용해야 하는 Git 기록 모드입니다. Ids = null 및 itemPath를 지정한 경우에만 검색 조건에 적용됩니다.

searchCriteria.ids
query

string[]

제공된 경우 가져올 커밋의 정확한 커밋 ID를 지정합니다. 다른 매개 변수와 결합되지 않을 수 있습니다.

searchCriteria.includeLinks
query

boolean

얕은 참조에 _links 필드를 포함할지 여부

searchCriteria.includePushData
query

boolean

푸시 정보를 포함할지 여부

searchCriteria.includeUserImageUrl
query

boolean

커밋자 및 작성자에 대한 이미지 URL을 포함할지 여부

searchCriteria.includeWorkItems
query

boolean

연결된 작업 항목을 포함할지 여부

searchCriteria.itemPath
query

string

검색할 항목의 경로

searchCriteria.itemVersion.version
query

string

버전 문자열 식별자(태그/분기 이름, 커밋의 SHA1)

searchCriteria.itemVersion.versionOptions
query

GitVersionOptions

버전 옵션 - 버전에 대한 추가 한정자 지정(예: 이전)

searchCriteria.itemVersion.versionType
query

GitVersionType

버전 유형(분기, 태그 또는 커밋). ID가 해석되는 방법을 결정합니다.

searchCriteria.toCommitId
query

string

제공된 경우 커밋 필터링을 위한 상한이 사전순으로 커밋됩니다.

searchCriteria.toDate
query

string

제공된 경우 이 날짜(문자열) 이전에 만든 기록 항목만 포함합니다.

searchCriteria.user
query

string

커밋자의 별칭 또는 표시 이름

응답

Name 형식 Description
200 OK

GitCommitRef[]

성공적인 작업

보안

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 Description
vso.code 커밋, 변경 집합, 분기 및 기타 버전 제어 아티팩트에 대한 소스 코드 및 메타데이터를 읽을 수 있는 기능을 부여합니다. 또한 서비스 후크를 통해 코드를 검색하고 버전 제어 이벤트에 대한 알림을 받을 수 있는 기능을 부여합니다.

예제

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"
    }
  ]
}

정의

Name Description
ChangeCountDictionary
GitChange
GitCommitRef

Git 커밋 및 연결된 메타데이터를 설명하는 속성을 제공합니다.

GitHistoryMode

사용해야 하는 Git 기록 모드입니다. Ids = null 및 itemPath를 지정한 경우에만 검색 조건에 적용됩니다.

GitPushRef
GitStatus

이 클래스에는 상태 게시하는 서비스/확장의 메타데이터가 포함됩니다.

GitStatusContext

상태 고유하게 식별하는 상태 컨텍스트입니다.

GitStatusState

상태 상태입니다.

GitTemplate
GitUserDate

Git 작업의 사용자 정보 및 날짜입니다.

GitVersionOptions

버전 옵션 - 버전에 대한 추가 한정자 지정(예: 이전)

GitVersionType

버전 유형(분기, 태그 또는 커밋). ID가 해석되는 방법을 결정합니다.

IdentityRef
ItemContent
ItemContentType
ReferenceLinks

REST 참조 링크의 컬렉션을 나타내는 클래스입니다.

ResourceRef
VersionControlChangeType

항목에 적용된 변경 유형입니다.

ChangeCountDictionary

GitChange

Name 형식 Description
changeId

integer

변경 내용 그룹 내의 변경 내용 ID입니다.

changeType

VersionControlChangeType

항목에 적용된 변경 유형입니다.

item

string

현재 버전입니다.

newContent

ItemContent

변경 후 항목의 콘텐츠입니다.

newContentTemplate

GitTemplate

새 변경 내용을 푸시할 때 사용할 새 콘텐츠 템플릿입니다.

originalPath

string

현재 경로와 다른 경우 항목의 원래 경로입니다.

sourceServerItem

string

서버에서 항목의 경로입니다.

url

string

항목을 검색할 URL입니다.

GitCommitRef

Git 커밋 및 연결된 메타데이터를 설명하는 속성을 제공합니다.

Name 형식 Description
_links

ReferenceLinks

관련 REST 참조 링크의 컬렉션입니다.

author

GitUserDate

커밋의 작성자입니다.

changeCounts

ChangeCountDictionary

커밋에 포함된 변경 형식(편집, 삭제 등)의 수입니다.

changes

GitChange[]

커밋에 포함된 변경 내용의 열거형입니다.

comment

string

커밋의 주석 또는 메시지입니다.

commentTruncated

boolean

주석이 전체 Git 커밋 주석 메시지에서 잘렸는지 나타냅니다.

commitId

string

커밋의 ID(SHA-1)입니다.

committer

GitUserDate

커밋의 커밋자입니다.

parents

string[]

이 커밋에 대한 부모 커밋 ID의 열거형입니다.

push

GitPushRef

이 커밋과 연결된 푸시입니다.

remoteUrl

string

커밋에 대한 원격 URL 경로입니다.

statuses

GitStatus[]

추가 정보를 커밋에 연결할 수 있는 서비스 및 확장의 상태 메타데이터 목록입니다.

url

string

이 리소스에 대한 REST URL입니다.

workItems

ResourceRef[]

이 커밋과 연결된 작업 영역 목록입니다.

GitHistoryMode

사용해야 하는 Git 기록 모드입니다. Ids = null 및 itemPath를 지정한 경우에만 검색 조건에 적용됩니다.

Name 형식 Description
firstParent

string

에 사용되는 기록 모드 git log --first-parent

fullHistory

string

에 사용되는 기록 모드 git log --full-history

fullHistorySimplifyMerges

string

에 사용되는 기록 모드 git log --full-history --simplify-merges

simplifiedHistory

string

에서 사용하는 git log기록 모드입니다. 이것이 기본값입니다.

GitPushRef

Name 형식 Description
_links

ReferenceLinks

REST 참조 링크의 컬렉션을 나타내는 클래스입니다.

date

string

pushId

integer

pushedBy

IdentityRef

url

string

GitStatus

이 클래스에는 상태 게시하는 서비스/확장의 메타데이터가 포함됩니다.

Name 형식 Description
_links

ReferenceLinks

참조 링크입니다.

context

GitStatusContext

상태 컨텍스트입니다.

createdBy

IdentityRef

상태 만든 ID입니다.

creationDate

string

상태 생성 날짜 및 시간입니다.

description

string

상태 설명입니다. 일반적으로 상태 현재 상태를 설명합니다.

id

integer

상태 식별자입니다.

state

GitStatusState

상태 상태입니다.

targetUrl

string

상태 세부 정보가 있는 URL입니다.

updatedDate

string

상태 마지막 업데이트 날짜 및 시간입니다.

GitStatusContext

상태 고유하게 식별하는 상태 컨텍스트입니다.

Name 형식 Description
genre

string

상태 장르. 일반적으로 상태 생성하는 서비스/도구의 이름은 비어 있을 수 있습니다.

name

string

상태 이름 식별자는 null이거나 비워 둘 수 없습니다.

GitStatusState

상태 상태입니다.

Name 형식 Description
error

string

오류가 있는 상태입니다.

failed

string

상태가 실패했습니다.

notApplicable

string

상태는 대상 개체에 적용되지 않습니다.

notSet

string

상태 상태가 설정되지 않았습니다. 기본 상태입니다.

pending

string

보류 중인 상태입니다.

succeeded

string

상태가 성공했습니다.

GitTemplate

Name 형식 Description
name

string

템플릿의 이름

type

string

템플릿 유형

GitUserDate

Git 작업의 사용자 정보 및 날짜입니다.

Name 형식 Description
date

string

Git 작업의 날짜입니다.

email

string

Git 작업을 수행하는 사용자의 주소를 Email.

imageUrl

string

사용자의 아바타에 대한 URL입니다.

name

string

Git 작업을 수행하는 사용자의 이름입니다.

GitVersionOptions

버전 옵션 - 버전에 대한 추가 한정자 지정(예: 이전)

Name 형식 Description
firstParent

string

커밋의 첫 번째 부모(HEAD^)

none

string

지정되지 않음

previousChange

string

현재 버전 이전에 변경된 항목을 커밋합니다.

GitVersionType

버전 유형(분기, 태그 또는 커밋). ID가 해석되는 방법을 결정합니다.

Name 형식 Description
branch

string

버전을 분기 이름으로 해석

commit

string

버전을 SHA1(커밋 ID)으로 해석

tag

string

버전을 태그 이름으로 해석

IdentityRef

Name 형식 Description
_links

ReferenceLinks

이 필드에는 그래프 제목에 대한 0개 이상의 흥미로운 링크가 포함되어 있습니다. 이러한 링크를 호출하여 이 그래프 제목에 대한 추가 관계 또는 자세한 정보를 얻을 수 있습니다.

descriptor

string

설명자는 시스템이 실행되는 동안 그래프 제목을 참조하는 기본 방법입니다. 이 필드는 계정과 조직 모두에서 동일한 그래프 제목을 고유하게 식별합니다.

directoryAlias

string

displayName

string

그래프 주체의 고유하지 않은 표시 이름입니다. 이 필드를 변경하려면 원본 공급자에서 해당 값을 변경해야 합니다.

id

string

imageUrl

string

inactive

boolean

isAadIdentity

boolean

isContainer

boolean

isDeletedInOrigin

boolean

profileUrl

string

uniqueName

string

url

string

이 URL은 이 그래프 주체의 원본 리소스에 대한 전체 경로입니다.

ItemContent

Name 형식 Description
content

string

contentType

ItemContentType

ItemContentType

Name 형식 Description
base64Encoded

string

rawText

string

REST 참조 링크의 컬렉션을 나타내는 클래스입니다.

Name 형식 Description
links

object

링크의 읽기 전용 보기입니다. 참조 링크는 읽기 전용이므로 읽기 전용으로만 노출하려고 합니다.

ResourceRef

Name 형식 Description
id

string

url

string

VersionControlChangeType

항목에 적용된 변경 유형입니다.

Name 형식 Description
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