Skip to content

List a Worker's branches

GET
/api/v1/sites/{site}/branches
curl --request GET \
--url https://digize.com/api/v1/sites/example/branches \
--header 'x-api-key: <x-api-key>'

The branches and tags in a Worker’s git repo with the commit each is at, and the branch it deploys from.

Needs the sites:read permission.

site
required
string
>= 1 characters <= 64 characters

Done

Media typeapplication/json
object
branch
required

The branch it deploys from.

string
branches
required
Array<object>
object
name
required
string
sha
required
string
tags
required
Array<object>
object
name
required
string
sha
required
string

Example generated

{
"branch": "example",
"branches": [
{
"name": "example",
"sha": "example"
}
],
"tags": [
{
"name": "example",
"sha": "example"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}