Get project 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 ”Project ID (UUID)
Query Parameters
Section titled “ Query Parameters ”Live deployment id, used as a cache key (screenshot_deployment_id)
Header Parameters
Section titled “ Header Parameters ”ETag from a previous response
Responses
Section titled “ Responses ”JPEG image
Not modified
Unauthorized
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Forbidden
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Not Found
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Internal Server Error
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Live 582ac705 built