Skip to content

Mint a git token

POST
/api/orgs/{org}/projects/{project}/git-token
curl --request POST \
--url https://api.wrktr.com/api/orgs/example/projects/example/git-token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "scope": "read" }'

A short-lived token for the project’s git remote (what wrktr credential hands git). With no scope: write for the organization’s members, read for anyone else reading a public project.

org
required
string
project
required
string
Media typeapplication/json
object
scope
Any of:
string
Allowed values: read write

GitToken

Media typeapplication/json
object
token
required
string
expiresAt
required
string
Examplegenerated
{
"token": "example",
"expiresAt": "example"
}

Unauthorized

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

Forbidden

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

ProjectNotFound

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