Git - Get Status

Returns the Git status of items in the workspace, that can be committed to Git.

This API supports long running operations (LRO).

The status indicates changes to the item(s) since the last workspace and remote branch sync. If both locations were modified, the API flags a conflict.

Permissions

The caller must have a contributor or higher workspace role.

Required Delegated Scopes

Workspace.GitUpdate.All or Workspace.GitCommit.All

Interface

GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/git/status

URI Parameters

Name In Required Type Description
workspaceId
path True

string

uuid

The workspace ID.

Responses

Name Type Description
200 OK

GitStatusResponse

Request completed successfully.

202 Accepted

Request accepted, get status in progress.

Headers

  • Location: string
  • x-ms-operation-id: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

Common error codes:

  • WorkspaceNotConnectedToGit - Workspace is not connected to git.

  • WorkspaceHasNoCapacityAssigned - Workspace is not on capacity.

  • InsufficientPrivileges - The caller does not have sufficient workspace permissions.

Examples

Get status example
Get status no changes example
Get status with conflict example

Get status example

Sample request

GET https://api.fabric.microsoft.com/v1/workspaces/1455b6a2-c120-4c1c-dda7-92bafe99bec3/git/status

Sample response

{
  "workspaceHead": "eaa737b48cda41b37ffefac772ea48f6fed3eac4",
  "remoteCommitHash": "7d03b2918bf6aa62f96d0a4307293f3853201705",
  "changes": [
    {
      "itemMetadata": {
        "itemIdentifier": {
          "objectId": "7753f3b4-dbb8-44c1-a94f-6ae4d776369e"
        },
        "itemType": "SemanticModel",
        "displayName": "My new dataset in the workspace"
      },
      "workspaceChange": "Added",
      "conflictType": "None"
    },
    {
      "itemMetadata": {
        "itemIdentifier": {
          "logicalId": "1423f3b4-dba5-44c1-a94f-6ae4d776369a"
        },
        "itemType": "Report",
        "displayName": "My deleted report in Git"
      },
      "remoteChange": "Deleted",
      "conflictType": "None"
    },
    {
      "itemMetadata": {
        "itemIdentifier": {
          "logicalId": "111e8d7b-4a95-4c02-8ccd-6faef5ba1bd1",
          "objectId": "1153f3b4-dbb8-33c1-a84f-6ae4d776362d"
        },
        "itemType": "SemanticModel",
        "displayName": "Modified dataset in the workspace"
      },
      "workspaceChange": "Modified",
      "conflictType": "None"
    }
  ]
}
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

Get status no changes example

Sample request

GET https://api.fabric.microsoft.com/v1/workspaces/1455b6a2-c120-4c1c-dda7-92bafe99bec3/git/status

Sample response

{
  "workspaceHead": "eaa737b48cda41b37ffefac772ea48f6fed3eac4",
  "remoteCommitHash": "eaa737b48cda41b37ffefac772ea48f6fed3eac4",
  "changes": []
}
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

Get status with conflict example

Sample request

GET https://api.fabric.microsoft.com/v1/workspaces/1455b6a2-c120-4c1c-dda7-92bafe99bec3/git/status

Sample response

{
  "workspaceHead": "eaa737b48cda41b37ffefac772ea48f6fed3eac4",
  "remoteCommitHash": "7d03b2918bf6aa62f96d0a4307293f3853201705",
  "changes": [
    {
      "itemMetadata": {
        "itemIdentifier": {
          "logicalId": "222e8d7b-4a95-4c02-8ccd-6faef5ba1bd2",
          "objectId": "8853f3b4-dbb8-33c1-a84f-6ae4d776362a"
        },
        "itemType": "Report",
        "displayName": "Modified report on both sides"
      },
      "remoteChange": "Modified",
      "workspaceChange": "Modified",
      "conflictType": "Conflict"
    }
  ]
}
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
ChangeType

A change of an item. Additional changed types may be added over time.

ConflictType

A change of an item in both workspace and remote. Additional changed types may be added over time.

ErrorRelatedResource

The error related resource details object.

ErrorResponse

The error response.

ErrorResponseDetails

The error response details.

GitStatusResponse

Contains the status response.

ItemChange

Contains the item's change information.

ItemIdentifier

Contains the item identifier. At least one of the properties must be defined.

ItemMetadata

Contains the item metadata.

ItemType

The type of the item. Additional item types may be added over time.

ChangeType

A change of an item. Additional changed types may be added over time.

Name Type Description
Added

string

A newly created item.

Deleted

string

Item has been deleted.

Modified

string

Item content has been modified.

ConflictType

A change of an item in both workspace and remote. Additional changed types may be added over time.

Name Type Description
Conflict

string

There are different changes to the item in the workspace and in remote Git.

None

string

There are no changes to the item.

SameChanges

string

There are identical changes to the item in the workspace and in remote Git.

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

ErrorResponseDetails[]

List of additional error details.

relatedResource

ErrorRelatedResource

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

ErrorRelatedResource

The error related resource details.

GitStatusResponse

Contains the status response.

Name Type Description
changes

ItemChange[]

A list of changes in remote Git that are not applied to the given workspace, and changes in the workspace that are not applied to remote Git.

remoteCommitHash

string

Remote full SHA commit hash.

workspaceHead

string

Full SHA hash that the workspace is synced to.

ItemChange

Contains the item's change information.

Name Type Description
conflictType

ConflictType

When there are changes on both the workspace side and the remote Git side.

itemMetadata

ItemMetadata

The item metadata.

remoteChange

ChangeType

Change on the remote Git side.

workspaceChange

ChangeType

Change on the workspace side.

ItemIdentifier

Contains the item identifier. At least one of the properties must be defined.

Name Type Description
logicalId

string

The logical ID of the item. When the logical ID isn't available because the item is not yet added to the workspace, you can use the object ID.

objectId

string

The object ID of the item. When the object ID isn't available because the item was deleted from the workspace, you can use the logical ID.

ItemMetadata

Contains the item metadata.

Name Type Description
displayName

string

The display name of the item. Prefers the workspace item's display name if it exists, otherwise displayName uses the remote item's display name.

itemIdentifier

ItemIdentifier

The item identifier.

itemType

ItemType

The item type.

ItemType

The type of the item. Additional item types may be added over time.

Name Type Description
Dashboard

string

PowerBI dashboard.

DataPipeline

string

A data pipeline.

Datamart

string

PowerBI datamart.

Environment

string

An environment.

Eventhouse

string

An eventhouse.

Eventstream

string

An eventstream.

KQLDatabase

string

A KQL database.

KQLQueryset

string

A KQL queryset.

Lakehouse

string

A lakehouse.

MLExperiment

string

A machine learning experiment.

MLModel

string

A machine learning model.

MirroredWarehouse

string

A mirrored warehouse.

Notebook

string

A notebook.

PaginatedReport

string

PowerBI paginated report.

Report

string

PowerBI report.

SQLEndpoint

string

An SQL endpoint.

SemanticModel

string

PowerBI semantic model.

SparkJobDefinition

string

A spark job definition.

Warehouse

string

A warehouse.