Set the team's default preview access
PATCH
/api/v1/team/preview-access
const url = 'https://api.deploybase.eu/api/v1/api/v1/team/preview-access';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"default_preview_access":"public"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.deploybase.eu/api/v1/api/v1/team/preview-access \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "default_preview_access": "public" }'Sets who may view the previews of projects the team creates from now on: public, team or team_guests. A new project has no guest password yet, so team_guests starts it at team. Existing projects keep their own access.
Authorizations
Section titled “ Authorizations ”Request Body
Section titled “ Request Body ”New default
Media type application/json
object
default_preview_access
required
DefaultPreviewAccess is the preview level NEW projects of the team start at. A new project has no guest password, so team_guests starts it at team.
string
Example
teamResponses
Section titled “ Responses ”OK
Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
default_preview_access
string
Example
{ "data": { "default_preview_access": "team" }}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