Get project screenshot
GET
/api/v1/projects/{id}/screenshot
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/example/screenshot';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/screenshot \ --header 'Authorization: <Authorization>'Returns a JPEG screenshot of the project’s live (production) deployment, 640 px wide. 404 when the project has no live deployment or it has not been captured yet; a project’s screenshot_deployment_id says whether one exists. Pass d = that id to make the response cacheable for a day (the URL then names one immutable image); without it the response must be revalidated. The ETag is the deployment id, and If-None-Match answers 304.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” id
required
string
Project ID (UUID)
Query Parameters
Section titled “ Query Parameters ” d
string
Live deployment id, used as a cache key (screenshot_deployment_id)
Header Parameters
Section titled “ Header Parameters ” If-None-Match
string
ETag from a previous response
Responses
Section titled “ Responses ”JPEG image
Media type image/jpeg
file
Not modified
Media type image/jpeg
Unauthorized
Media type image/jpeg
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Forbidden
Media type image/jpeg
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Not Found
Media type image/jpeg
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Internal Server Error
Media type image/jpeg
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Live 174db30c built