Git - Update From Git
Updates the workspace with commits pushed to the connected branch.
This API supports long running operations (LRO).
The update only affects items in the workspace that were changed in those commits. If called after the Connect and Initialize Connection APIs, it will perform a full update of the entire workspace.
Permissions
The caller must have a contributor or higher role for the workspace.
Required Delegated Scopes
Workspace.GitUpdate.All
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
Identity | Support |
---|---|
User | Yes |
Service principal and Managed identities | No |
Interface
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/git/updateFromGit
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
workspace
|
path | True |
string uuid |
The workspace ID. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
remoteCommitHash | True |
string |
Remote full SHA commit hash. |
conflictResolution |
Conflict resolution to be used in the update from Git operation. If items are in conflict and a conflict resolution is not specified, the update operation will not start. |
||
options |
Options to be used in the update from Git operation |
||
workspaceHead |
string |
Full SHA hash that the workspace is synced to. This value may be null only after Initialize Connection. In other cases, the system will validate that the given value is aligned with the head known to the system. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Request completed successfully. |
|
202 Accepted |
Request accepted, update from Git in progress. Headers
|
|
Other Status Codes |
Common error codes:
|
Examples
Update a workspace using data from a Git example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/1565e6a3-c020-4c0c-dda7-92bafe99eec5/git/updateFromGit
{
"workspaceHead": "eaa737b48cda41b37ffefac772ea48f6fed3eac4",
"remoteCommitHash": "7d03b2918bf6aa62f96d0a4307293f3853201705",
"conflictResolution": {
"conflictResolutionType": "Workspace",
"conflictResolutionPolicy": "PreferWorkspace"
},
"options": {
"allowOverrideItems": true
}
}
Sample response
Location: https://api.fabric.microsoft.com/v1/operations/431e8d7b-4a95-4c02-8ccd-6faef5ba1bd7
x-ms-operation-id: 431e8d7b-4a95-4c02-8ccd-6faef5ba1bd7
Retry-After: 30
Definitions
Name | Description |
---|---|
Conflict |
Conflict resolution policy. Additional conflict resolution policies may be added over time. |
Conflict |
Conflict resolution type. Additional conflict resolution types may be added over time. |
Error |
The error related resource details object. |
Error |
The error response. |
Error |
The error response details. |
Update |
Contains the update from Git request data. |
Update |
Contains the options that are enabled for the update from Git. |
Workspace |
The basic conflict resolution data. |
ConflictResolutionPolicy
Conflict resolution policy. Additional conflict resolution policies may be added over time.
Name | Type | Description |
---|---|---|
PreferRemote |
string |
Prefer remote Git side content. |
PreferWorkspace |
string |
Prefer workspace side content. |
ConflictResolutionType
Conflict resolution type. Additional conflict resolution types may be added over time.
Name | Type | Description |
---|---|---|
Workspace |
string |
Conflict resolution representing the workspace level. |
ErrorRelatedResource
The error related resource details object.
Name | Type | Description |
---|---|---|
resourceId |
string |
The resource ID that's involved in the error. |
resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
moreDetails |
List of additional error details. |
|
relatedResource |
The error related resource details. |
|
requestId |
string |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
relatedResource |
The error related resource details. |
UpdateFromGitRequest
Contains the update from Git request data.
Name | Type | Description |
---|---|---|
conflictResolution |
Conflict resolution to be used in the update from Git operation. If items are in conflict and a conflict resolution is not specified, the update operation will not start. |
|
options |
Options to be used in the update from Git operation |
|
remoteCommitHash |
string |
Remote full SHA commit hash. |
workspaceHead |
string |
Full SHA hash that the workspace is synced to. This value may be null only after Initialize Connection. In other cases, the system will validate that the given value is aligned with the head known to the system. |
UpdateOptions
Contains the options that are enabled for the update from Git.
Name | Type | Description |
---|---|---|
allowOverrideItems |
boolean |
User consent to override incoming items during the update from Git process. When incoming items are present and the allow override items is not specified or is provided as false, the update operation will not start. Default value is false. |
WorkspaceConflictResolution
The basic conflict resolution data.
Name | Type | Description |
---|---|---|
conflictResolutionPolicy |
Conflict resolution policy. Additional conflict resolution policies may be added over time. |
|
conflictResolutionType |
Conflict resolution type. Additional conflict resolution types may be added over time. |