GET
/
repos
/
{repo_id}
/
workspaces
/
{workspace_id}
/
status
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/workspaces/{workspace_id}/status \
  --header 'Authorization: Bearer <token>'
{
  "changed_items_count": 123,
  "changed_files_count": 123,
  "incomplete_result": true,
  "items": {
    "new": [
      {
        "path": "hello.cc",
        "prev_path": "<string>",
        "status": 1,
        "mode": 16877,
        "mtime": "2023-11-07T05:31:56Z",
        "blob": {
          "storage_uri": "repo_id/2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
          "storage_backend": 1,
          "size": 123,
          "sha": "<string>"
        }
      }
    ],
    "modified": [
      {
        "path": "hello.cc",
        "prev_path": "<string>",
        "status": 1,
        "mode": 16877,
        "mtime": "2023-11-07T05:31:56Z",
        "blob": {
          "storage_uri": "repo_id/2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
          "storage_backend": 1,
          "size": 123,
          "sha": "<string>"
        }
      }
    ],
    "deleted": [
      {
        "path": "hello.cc",
        "prev_path": "<string>",
        "status": 1,
        "mode": 16877,
        "mtime": "2023-11-07T05:31:56Z",
        "blob": {
          "storage_uri": "repo_id/2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
          "storage_backend": 1,
          "size": 123,
          "sha": "<string>"
        }
      }
    ]
  },
  "conflicts": [
    "<string>"
  ]
}

Authorizations

Authorization
string
headerrequired

This API uses OAuth 2 with the implicit grant flow

Path Parameters

repo_id
string
required

The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.

workspace_id
string
required

The repo ID of the workspace.

Query Parameters

detail_items
boolean
default: true

Should detail all the changed items in status response

limit
integer

Limit the number of entries returned from walk

recurse
boolean
default: true

Specifies if to recursively iterate file tree to next directory levels

path_prefix
string

A path prefix in the file tree to walk under

Response

200 - application/json
changed_items_count
number
required

Number of changed items of all types

changed_files_count
number
required

Number of changed files

incomplete_result
boolean

The result list was trimmed and the counts are a lower bound only

items
object

Drill down into modified items by change type

conflicts
string[] | null

List of conflicted file paths, compared to the base branch, if applicable