Skip to content

Read a file

GET
/api/orgs/{org}/projects/{project}/file
curl --request GET \
--url 'https://api.wrktr.com/api/orgs/example/projects/example/file?branch=example&path=example' \
--header 'Authorization: Bearer <token>'

The file at the branch head, or its draft if there is one.

org
required
string
project
required
string
branch
required
string
path
required
string

FileAtHead

Media typeapplication/json
object
path
required
string
headSha
required
string
content
required
Any of:
string
binary
required
boolean
drafted
required
boolean
Examplegenerated
{
"path": "example",
"headSha": "example",
"content": "example",
"binary": true,
"drafted": true
}

Unauthorized

Media typeapplication/json
object
_tag
required
string
Allowed values: Unauthorized
message
required
string
Example
{
"_tag": "Unauthorized"
}

ProjectNotFound | BranchNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ProjectNotFound
project
required
string
Example
{
"_tag": "ProjectNotFound"
}