Skip to main content
GET
/
repos
/
{repo_id}
/
tree_snapshot
/
{ref_id}
Download file tree snapshot
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/tree_snapshot/{ref_id} \
  --header 'Authorization: Bearer <token>'
{
  "url": "<string>",
  "commit_id": "example_id"
}

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"

Response

Pre-signed URL for downloading the tree snapshot stored in S3-compatible storage. The commit_id indicates which commit's snapshot is being returned - this may be an older ancestor commit if the requested commit doesn't have a snapshot available.

A pre-signed URL to download a file from S3

url
string<uri>
required

Pre-signed URL to download the file

commit_id
string
required
Required string length: 3 - 128
Example:

"example_id"