GET
/
repos
/
{repo_id}
/
files
/
history
/
{ref_id}
/
{path}
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/files/history/{ref_id}/{path} \
  --header 'Authorization: Bearer <token>'
{
  "entries": [
    {
      "entry": {
        "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>"
        }
      },
      "commit": {
        "commit_id": "example_id",
        "created_ts": 123,
        "commit_message": "<string>",
        "branch_id": "<string>",
        "author": {
          "image": "<string>",
          "email": "jsmith@example.com",
          "full_name": "<string>",
          "id": "<string>",
          "name": "<string>"
        },
        "parents": [
          "<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.

ref_id
string
required

An ID of a workspace, branch or commit.

path
string
required

A path to a file inside the repository.

Query Parameters

limit
integer
default: 100

Limit the number or items returned from a listing api

skip
integer

Skip a number of items returned from a listing api

Response

200 - application/json
entries
object[]
required