GET
/
repos
/
{repo_id}
/
files
/
{ref_id}
/
{path}
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/files/{ref_id}/{path} \
  --header 'Authorization: Bearer <token>'
{
  "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>"
  }
}

Authorizations

Authorization
string
header
required

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.

Required string length: 3 - 128
Example:

"example_id"

ref_id
string
required

An ID of a workspace, branch or commit.

Required string length: 3 - 128
Example:

"example_id"

path
string
required

A path to a file inside the repository.

Example:

"/path/to/file"

Response

200
application/json
File information

The response is of type object.