Check preview slug availability
GET
/api/v1/projects/check-preview-slug
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/check-preview-slug?preview_slug=example';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/check-preview-slug?preview_slug=example' \ --header 'Authorization: <Authorization>'Checks if a preview slug is available as the label of a project’s preview hostnames ({branch}-{preview_slug}.previews.deploybase.eu). Uniqueness is global across all teams, because the previews zone is shared.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ” preview_slug
required
string
Preview slug to check
Responses
Section titled “ Responses ”OK
Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "data": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}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" }}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" }}