Pull Request Iterations - Get
Get the specified iteration for a pull request.
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}?api-version=4.1
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
iteration
|
path | True |
integer (int32) |
ID of the pull request iteration to return. |
|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
|
pull
|
path | True |
integer (int32) |
ID of the pull request. |
|
repository
|
path | True |
string |
ID or name of the repository. |
|
project
|
path |
string |
Project ID or project name |
|
|
api-version
|
query | True |
string |
Version of the API to use. This should be set to '4.1' to use this version of the api. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
successful operation |
Security
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 | Grants the ability to read source code and metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to get notified about version control events via service hooks. |
Definitions
| Name | Description |
|---|---|
|
Change |
|
|
Git |
|
|
Git |
Provides properties that describe a Git commit and associated metadata. |
|
Git |
Change made in a pull request. |
|
Git |
Provides properties that describe a Git pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. |
|
Git |
|
|
Git |
This class contains the metadata of a service/extension posting a status. |
|
Git |
Status context that uniquely identifies the status. |
|
Git |
State of the status. |
|
Git |
|
|
Git |
User info and date for Git operations. |
|
Identity |
|
|
Item |
|
|
Item |
|
|
Iteration |
The reason for which the pull request iteration was created. |
|
Reference |
The class to represent a collection of REST reference links. |
|
Resource |
|
|
Version |
The type of change that was made to the item. |
ChangeCountDictionary
GitChange
| Name | Type | Description |
|---|---|---|
| changeId |
integer (int32) |
ID of the change within the group of changes. |
| changeType |
The type of change that was made to the item. |
|
| item |
string (T) |
Current version. |
| newContent |
Content of the item after the change. |
|
| newContentTemplate |
New Content template to be used when pushing new changes. |
|
| originalPath |
string |
Original path of item if different from current path. |
| sourceServerItem |
string |
Path of the item on the server. |
| url |
string |
URL to retrieve the item. |
GitCommitRef
Provides properties that describe a Git commit and associated metadata.
| Name | Type | Description |
|---|---|---|
| _links |
A collection of related REST reference links. |
|
| author |
Author of the commit. |
|
| changeCounts |
Counts of the types of changes (edits, deletes, etc.) included with the commit. |
|
| changes |
An enumeration of the changes included with the commit. |
|
| comment |
string |
Comment or message of the commit. |
| commentTruncated |
boolean |
Indicates if the comment is truncated from the full Git commit comment message. |
| commitId |
string |
ID (SHA-1) of the commit. |
| committer |
Committer of the commit. |
|
| parents |
string[] |
An enumeration of the parent commit IDs for this commit. |
| remoteUrl |
string |
Remote URL path to the commit. |
| statuses |
A list of status metadata from services and extensions that may associate additional information to the commit. |
|
| url |
string |
REST URL for this resource. |
| workItems |
A list of workitems associated with this commit. |
GitPullRequestChange
Change made in a pull request.
| Name | Type | Description |
|---|---|---|
| changeId |
integer (int32) |
ID of the change within the group of changes. |
| changeTrackingId |
integer (int32) |
ID used to track files through multiple changes. |
| changeType |
The type of change that was made to the item. |
|
| item |
string (T) |
Current version. |
| newContent |
Content of the item after the change. |
|
| newContentTemplate |
New Content template to be used when pushing new changes. |
|
| originalPath |
string |
Original path of item if different from current path. |
| sourceServerItem |
string |
Path of the item on the server. |
| url |
string |
URL to retrieve the item. |
GitPullRequestIteration
Provides properties that describe a Git pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request.
| Name | Type | Description |
|---|---|---|
| _links |
A collection of related REST reference links. |
|
| author |
Author of the pull request iteration. |
|
| changeList |
Changes included with the pull request iteration. |
|
| commits |
The commits included with the pull request iteration. |
|
| commonRefCommit |
The first common Git commit of the source and target refs. |
|
| createdDate |
string (date-time) |
The creation date of the pull request iteration. |
| description |
string |
Description of the pull request iteration. |
| hasMoreCommits |
boolean |
Indicates if the Commits property contains a truncated list of commits in this pull request iteration. |
| id |
integer (int32) |
ID of the pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. |
| push |
The Git push information associated with this pull request iteration. |
|
| reason |
The reason for which the pull request iteration was created. |
|
| sourceRefCommit |
The source Git commit of this iteration. |
|
| targetRefCommit |
The target Git commit of this iteration. |
|
| updatedDate |
string (date-time) |
The updated date of the pull request iteration. |
GitPushRef
| Name | Type | Description |
|---|---|---|
| _links |
The class to represent a collection of REST reference links. |
|
| date |
string (date-time) |
|
| pushId |
integer (int32) |
|
| pushedBy | ||
| url |
string |
GitStatus
This class contains the metadata of a service/extension posting a status.
| Name | Type | Description |
|---|---|---|
| _links |
Reference links. |
|
| context |
Context of the status. |
|
| createdBy |
Identity that created the status. |
|
| creationDate |
string (date-time) |
Creation date and time of the status. |
| description |
string |
Status description. Typically describes current state of the status. |
| id |
integer (int32) |
Status identifier. |
| state |
State of the status. |
|
| targetUrl |
string |
URL with status details. |
| updatedDate |
string (date-time) |
Last update date and time of the status. |
GitStatusContext
Status context that uniquely identifies the status.
| Name | Type | Description |
|---|---|---|
| genre |
string |
Genre of the status. Typically name of the service/tool generating the status, can be empty. |
| name |
string |
Name identifier of the status, cannot be null or empty. |
GitStatusState
State of the status.
| Value | Description |
|---|---|
| notSet |
Status state not set. Default state. |
| pending |
Status pending. |
| succeeded |
Status succeeded. |
| failed |
Status failed. |
| error |
Status with an error. |
| notApplicable |
Status is not applicable to the target object. |
GitTemplate
| Name | Type | Description |
|---|---|---|
| name |
string |
Name of the Template |
| type |
string |
Type of the Template |
GitUserDate
User info and date for Git operations.
| Name | Type | Description |
|---|---|---|
| date |
string (date-time) |
Date of the Git operation. |
|
string |
Email address of the user performing the Git operation. |
|
| name |
string |
Name of the user performing the Git operation. |
IdentityRef
| Name | Type | Description |
|---|---|---|
| _links |
This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. |
|
| descriptor |
string |
The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. |
| directoryAlias |
string |
|
| displayName |
string |
This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. |
| id |
string |
|
| imageUrl |
string |
|
| inactive |
boolean |
|
| isAadIdentity |
boolean |
|
| isContainer |
boolean |
|
| profileUrl |
string |
|
| uniqueName |
string |
|
| url |
string |
This url is the full route to the source resource of this graph subject. |
ItemContent
| Name | Type | Description |
|---|---|---|
| content |
string |
|
| contentType |
ItemContentType
| Value | Description |
|---|---|
| rawText | |
| base64Encoded |
IterationReason
The reason for which the pull request iteration was created.
| Value | Description |
|---|---|
| push | |
| forcePush | |
| create | |
| rebase | |
| unknown |
ReferenceLinks
The class to represent a collection of REST reference links.
| Name | Type | Description |
|---|---|---|
| links |
object |
The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. |
ResourceRef
| Name | Type | Description |
|---|---|---|
| id |
string |
|
| url |
string |
VersionControlChangeType
The type of change that was made to the item.
| Value | Description |
|---|---|
| none | |
| add | |
| edit | |
| encoding | |
| rename | |
| delete | |
| undelete | |
| branch | |
| merge | |
| lock | |
| rollback | |
| sourceRename | |
| targetRename | |
| property | |
| all |