Skip to content
GitHub

A project's previews, newest first.

GET
/api/v1/projects/{project}/previews
curl --request GET \
--url https://example.com/api/v1/projects/example/previews
project
required
string

Project name

all
boolean

Include closed previews.

Media typeapplication/json
Array<object>
object
environment
required

The preview’s environment (pr<n>-<epoch>).

string
repository
required
string
pullRequest
required
integer format: int64
epoch
required
integer format: int64
headRepository
required
string
branch
required
string
commit
required
string
trusted
required

False for a fork’s preview: it gets no secrets.

boolean
state
required

active or closed.

string
autoDelete
required
boolean
expiresAt
required
string
remainingSeconds
required

Seconds until it expires (0 once it has).

integer format: int64
createdAt
required
string
closedAt
string | null
closeReason

closed, expired, manual or deleted.

string | null
Examplegenerated
[
{
"environment": "example",
"repository": "example",
"pullRequest": 1,
"epoch": 1,
"headRepository": "example",
"branch": "example",
"commit": "example",
"trusted": true,
"state": "example",
"autoDelete": true,
"expiresAt": "example",
"remainingSeconds": 1,
"createdAt": "example",
"closedAt": "example",
"closeReason": "example"
}
]
Media typeapplication/json

Problem Details body.

object
code
required

Stable machine-readable code, e.g. forbidden.

string
title
required

Short human readable title.

string
status
required

HTTP status.

integer format: int32
detail

Details, if safe to expose.

string | null
Example
{
"code": "forbidden"
}