Skip to content

Get site access

GET
/api/v1/projects/{id}/access
curl --request GET \
--url https://api.deploybase.eu/api/v1/api/v1/projects/example/access \
--header 'Authorization: <Authorization>'

Returns who may view the project’s preview and production sites. A project without a policy is public. preview.status is public, protecting (the gate is set but the cache purge of every preview host is not confirmed yet, so a stale copy may still be served) or protected. Production is always public for now. writes_enabled is false while the write routes are switched off platform-wide. The guest password is never returned here.

id
required
string

Project ID

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
preview
object
gate_epoch

GateEpoch increments whenever every visitor session is invalidated.

integer
has_password

HasPassword is true when guests can unlock the surface with a password.

boolean
level

Level is public, team or team_guests.

string
password_set_at

PasswordSetAt is when the current guest password was set; null without one.

string
status

Status is public, protecting (gate set, cache purge not yet confirmed) or protected.

string
production
object
level
string
status
string
writes_enabled

WritesEnabled mirrors PREVIEW_ACCESS_ENABLED: false means the write routes answer 404.

boolean

Example

{
"data": {
"preview": {
"gate_epoch": 3,
"level": "team_guests",
"status": "protected"
},
"production": {
"level": "public",
"status": "public"
}
}
}

Bad Request

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Forbidden

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Not Found

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Internal Server Error

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Live a8b7eb1d built