Skip to content

List a branch's drafts

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

Uncommitted edits made on wrktr (in the web app, or by the chat assistant).

org
required
string
project
required
string
branch
required
string

BranchDrafts

Media typeapplication/json
object
branch
required
string
headSha
required
string
drafts
required
Array<object>
object
path
required
string
content
required
Any of:
string
original
required
Any of:
string
stale
required
boolean
author
required
string
updatedAt
required
Any of:
number
Example
{
"drafts": [
{
"updatedAt": "Infinity"
}
]
}

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"
}