GET
/
repos
/
{repo_id}
/
tree_content
/
{ref_id}
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/tree_content/{ref_id} \
  --header 'Authorization: Bearer <token>'
This response does not have an example.

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"

Query Parameters

path
string

Optional path to an item inside the repository.

Example:

"/path/to/file"

recurse
boolean
default:true

Specifies if to recursively iterate file tree to next directory levels

offset
string

Offset item name in directory when iterating its entries (non-inclusive)

Example:

"file.ext"

include_deleted
boolean
default:false

Should the tree contain also deleted items or omit them from response

item_name_query
string

A query string to test against item name, only matching items will be collected

Required string length: 3 - 128
Example:

"abcd"

dirs_only
boolean
default:false

Return only directories in the file tree walk

use_selective_sync
boolean
default:true

Return the results filtered by the workspace preferences for selective sync

max_depth
integer
default:1
include_blobs
boolean
default:false

Whether to include blobs in the response or not, defaults to false

Response

200
application/x-ndjson

Stream of file tree entries

A newline delimited json, each line is a FileEntry