Skip to content

Discard a draft

POST
/api/orgs/{org}/projects/{project}/drafts/discard
curl --request POST \
--url https://api.wrktr.com/api/orgs/example/projects/example/drafts/discard \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "example", "path": "example" }'
org
required
string
project
required
string
Media typeapplication/json
object
branch
required
string
path
required
string
Examplegenerated
{
"branch": "example",
"path": "example"
}

Success

Media typeapplication/json
object
discarded
required
boolean
Examplegenerated
{
"discarded": 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"
}