Get site access
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/example/access';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Project ID
Responses
Section titled “ Responses ”OK
object
object
object
object
GateEpoch increments whenever every visitor session is invalidated.
HasPassword is true when guests can unlock the surface with a password.
Level is public, team or team_guests.
PasswordSetAt is when the current guest password was set; null without one.
Status is public, protecting (gate set, cache purge not yet confirmed) or protected.
object
WritesEnabled mirrors PREVIEW_ACCESS_ENABLED: false means the write routes answer 404.
Example
{ "data": { "preview": { "gate_epoch": 3, "level": "team_guests", "status": "protected" }, "production": { "level": "public", "status": "public" } }}Bad Request
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Forbidden
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Not Found
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Internal Server Error
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Live a8b7eb1d built